Frequently Asked Questions about Project 2 1. Q: For Part A, question 2, the predicate is called "next" or "pascal". A: It is called "next". Consider that the word "pascal" in the examples for this question is replaced with the word "next". ?- next([1],X). X = [1, 1] ; No ?- next([1,4,6,4,1],X). X = [1, 5, 10, 10, 5, 1] Yes 2. Q: Is there a typo in the handout in the drawing of the example parse tree? A: Yes. It should have an extra np before person: question / | \ who is np / /\ \ / / \ \ the reln of np | | brother person | anna 3. Q: How do we treat brother-in-law when we have the query: ?- parse(Tree,[who,is,the,brother,in,law,of,anna]). A: You consume three words from the input. Something like: reln(reln(brother_in_law)) --> [brother],[in],[law]. or: reln(reln(brother_in_law)) --> [brother, in, law]. The parse tree contains one relation brother_in_law: question / | \ who is np / /\ \ / / \ \ the reln of np | | brother_in_law person | anna 4. Q: Is "?" included in the parse trees? A: No. Example: ?- parse(Tree,[who,is,the,brother,of,anna,?]). Tree = question(who, is, np(the, reln(brother), of, np(person(anna)))) Yes 5. Q: Is there a way to not have to type ";" when producing the testing script? A: Yes. You are allowed to use other ways, but you have to figure out by yourself how. Hint: check the Prolog manual for "findall" which finds all solutions, and "tell" which redirects in a file everything printed with "write". Make sure that the grader can see both the test case and the result, not only the result.