Book : Concept of Programming Languages(tenth edition)
By : Robert W. Sebesta
1. What are the three primary uses of symbolic logic in formal logic?
– Express propositions
– Express relationships between propositions
– Describe how new propositions can be inferred from other propositions
2. What are the two parts of a compound term?
– Functor: function symbol that names the relationship
– Ordered list of parameters (tuple)
3. What are the two modes in which a proposition can be stated?
Fact and query.
4. What is the general form of a proposition in clausal form?
B1 u B2 u … u Bn c A1 n A2 n … n Am
means if all the As are true, then at least one B is true
5. What are antecedents? Consequents?
Antecedents are right side of a clausal form proposition. Consequent is left side of a clausal form propositions
6. Give general definitions of resolution and unification
– Resolution : inference rule that allows inferred propositions to be computed from given propositions, thus providing a method with potential application to automatic theorem proving.
– Unification : Process of determining useful values for variables.
7. What are the forms of Horn clauses?
Headed and headless.
9. What does it mean for a language to be nonprocedural?
Programs do not state now a result is to be computed, but rather the form of the result.
2. Describe how a multiple-processor machine could be used to implement resolution. Could Prolog, as currently defined, use this method?
On a single processor machine, the resolution process takes place on the rule base, one rule at a time, starting with the first rule, and progressing toward the last until a match is found. Because the process on each rule is independent of the process on the other rules, separate processors could concurrently operate on separate rules. When any of the processors finds a match, all resolution processing could terminate.
9. From a book on Prolog, learn and write a description of a monkey-banana prolem. Why does Prolog allow this problem to exist in its implementation ?
The problem is defined as this : a monkey is in a room. Suspended from the ceiling is a bunch of bananas, beyond the monkey’s reach. However, in the room there are also a chair and a stick. The ceiling is just the right height so that a monkey standing on a chair could knock the bananas down with the stick. The monkey knows how to move around, carry other things around, reach for the bananas, and wave a stick in the air. What is the best sequence of actions for the monkey?
It exists to create a variation in output of Prolog. As Prolog is an AI programming language, a variation might be needed in AI output to make them respond relevant to the situation.
10. Using the internet for reference, find some of the applications of expert systems.
• Expert system in healthcare: The Electronic health record (EHR) is designed to replace the traditional medical and bring together a more versatile, expansive and robust expert system to provide greater quality care.
• Expert systems in the financial field: Loan departments are interested in expert systems for morgages because of the growing cost of labour, which makes the handling and acceptance of relatively small loans less profitable.
• A new application for expert systems is automated computer program generation. Funded by a US Air Force grant, an expert system-based application (hprcARCHITECT) that generates computer programs for mixed processor technology (FPGA/GPU/Multicore) systems without a need for technical specialists has recently been commercially introduced.