Concepts of programming language – Chapter 16

1.   What are the three primary uses of symbolic logic in formal logic?

• to express propositions

• to express the relationships between propositions, and

• to describe how new propositions can be inferred from other propositions that are assumed to be true.

2.   Two parts of a compound term are:  a functor, which is the function symbol that names the relation, and an ordered list of parameters, which together represent an element of the relation.

3.   Propositions can be stated in two modes: one in which the proposition is defined to be true, and one in which the truth of the proposition is something that is to be determined. In other words, propositions can be stated to be facts or queries.

5.   Antecedents are the right side of clausal form propositions, whereas Consequents are the left side of clausal form propositions, because it is the consequence of the truth of the antecedent.

7. What are the forms of Horn clauses ?
• Have a single atomic proposition on the left side
• empty left side.

9. What does it mean for a language to be nonprocedural ?
– Language in which the programs do not exactly state how a result is to be computed but rather describe the form of the result.

11. An uninstantiated variable is a variable that has not been assigned a value.

13.  Conjunctions contain multiple terms that are separated by logical AND operations.

PROBLEM SET

1.”All predicate calculus propositions can be algorithmically converted to clausal form”. Is this statement true or false?

This statement is true. Nilsson (1971) gives proof that this can be done, as well as a simple conversion algorithm for doing it.

2. Describe how a logic programming language is different from a general programming language.

Programming that uses a form of symbolic logic as a programming language, unlike other general programming language, is often called logic programming; languages based on symbolic logic are called logic programming languages, or declarative languages.

7.   Horn clauses can be in only two forms: They have either a single atomic proposition on the left side or an empty left side. The left side of a clausal form proposition is sometimes called the head, and Horn clauses with left sides are called headed Horn clauses. Headed Horn clauses are used to state relationships, such as

likes( bob, trout ) likes( bob, fish ) x fish( trout )

8. Critically comment on the following statement : “ Logic programs are nonprocedural”
– It is true, because logical programs use lots of different processes based on its conditions. If a certain logical requirement is true, then a program will execute the corresponding process, instead of procedurally executing the statements.

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

Leave a comment