Question: Use the declarative programming language Prolog to answer the following question 7. Please complete in a detailed, accurate, and easy to read and understand manner.
Consider the file of facts and rules shown here: takingclass(amy, programminglanguages). takingclass(jacob, programminglanguages). takingclass(lindsay, programminglanguages). takingclass(becca, softwareengineering). takingclass(ryan, softwareengineering). takingclass(amanda, softwareengineering) takingclass(amy, softwareengineering). profofclass(programminglanguages,browning). profofclass(softwareengineering,.sigman). hasthisprof(Xx,y): -takingclass(X,Z), profofclass(Z,Y). Show the successive instantiation attempts that the inference engine makes when given this query: a. hasthisprof(X,sigman). b. Write rules for the following relationships: inclasstogether(X,Y) should return true if X and Y are two students in the same class. csmajor(X) should return true if X is taking programming languages or software engineering
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
