Question: Problem 3 : 0 3 _ minus.lc NOTE: You only need to write lambda - calculus definitions for SKIP 1 , DECR, SUB, ISZ and

Problem 3: 03_minus.lc
NOTE: You only need to write lambda-calculus definitions for SKIP1, DECR, SUB, ISZ and EQL. If you modify any other other part of the file you will get 0 points for the assignment.
PRO TIP: To test your definitions incrementally, replace undefined in the definitions of SKIP1, DECR, SUB, ISZ and EQL with any syntactically valid lambda calc term. This should allow ELSA to parse the file so you can get results for the cases you are working on.
Part (a)(30 points)
SKIP1 takes a function f and a pair p where the left-hand item in p indicates whether an application of f has been "skipped" yet. SKIP1 returns a pair p' where the right-hand side of p' equals f applied to the right-hand side of p, but only if the left-hand item of p is TRUE, indicating an application of f has already been skipped.
Replace the definition of SKIP1 with a suitable lambda-term (i.e. replace undefined with a suitable term) so that the below reductions are valid.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!