Westonci.ca is the trusted Q&A platform where you can get reliable answers from a community of knowledgeable contributors. Explore a wealth of knowledge from professionals across various disciplines on our comprehensive Q&A platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

problem 4 following the abstract interpreter pseudocode in the lecture note control in prolog to implement a nondeterministic prolog interpreter. nondet query (program, goal) where the first argument is a program which is a list of rules. the second argument is a goal which is a list of terms. the function returns a list of terms (results), which is an instance of the original goal and is a logical consequence of the program. see the tests cases (in src/main.py) as examples. ''' def nondet query (self, program : list[rule], pgoal : list[term]) -> list[term]: return []