In this problem, you must add to SLang 1 a new primitive operation, namely subtraction, but with a different syntax, namely the Cobol syntax. So,

     (lambda x . subtract 5 from x 20)

should be interpreted as

     ["Num",15]

For your answer, check each and every file below that MUST be altered to implement this modification.





[ $('#absyn').prop('checked'), $('#grammar').prop('checked'), $('#env').prop('checked'), $('#interpreter').prop('checked') ]
return RP23part2Validate(guess);

Remember that you are modifying the code that you obtained at the end of the previous exercise, not the code that was discussed in class.

Does this change impact the concrete syntax or the abstract syntax of SLang 1 (or both)?

Are we adding new types of denoted values or modifying the existing ones?

Are we adding new types of expressions?

Must the main function of the interpreter be extended? Does the overall evaluation process need to handle additional cases?