
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions for two lisp functions: 'derive' and 'parsetrees'. The 'derive' function takes a list of context-free grammar production rules, a start symbol, and a list of integers as input, and returns the parse tree resulting from applying the productions in the order indicated by the list. The 'parsetrees' function takes the same inputs as 'derive' and an additional integer, and returns a list of all parse trees reached after the integer or fewer production rules have been applied. The document also includes a test for the 'derive' function and an example of a core program.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Due Thursday, February 24, 2005
input x; input y; u := 1; v := 0; while (v < y) loop u := u * x; v := v + 1; end loop; output u;
Assuming that the input file contains the integers 10 and 2 (i.e., the list <10, 2>), use the denotational semantics of Core to trace the interpretation of the program.