Yay last chapter! And that concludes T0152 assignment complete!
Taken from Robert Sebesta’s “Concepts of Programming Language” chapter 16 (yay, last chapter! ^^V) for T0152 assignment
Review: 33% of 25 (rounded down to 8) and 33% of 10 (rounded down to 3)
1. What are the three primary uses of symbolic logic in formal logic?
They are used to:
- Express propositions
- Express the relationships between propositions
- Describe how new propositions can be inferred from other propositions that are assumed to be true.
2. What are the two parts of a compound term?
One of them is functor, which is the function symbol tha tnames the relation, and the other one is an ordered list of parameters, which together represent an element of the relation.
4. What is the general form of a proposition in a clausal form?
That is B1 U B2 U … U Bn ⊂ A1 ∩ A2 ∩ … ∩ An
5. What are antecedents? Consequents?
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?
There are two forms: They have either a single atomic proposition on the left side or an empty left side.
8. What is the basic concept of declarative semantics?
The basic concept of declarative semantics is there is a simple way to determine the meaning of each statement, and it does not depend on how the statement might be used to solve a problem.
11. What is an uninstantiated variable?
An uninstantiated variable is a variable that has not been assigned a value.
13. What is a conjunction?
A conjunction is a container of multiple terms that are separated by logical AND operations.
1. “All predicate calculus propositions can be algorithmically converted to clausal form”. Is this statement true or false? Explain.
In my opinion, it’s true, because Nillson (1971) gives proof that this can be done along with one simple conversion algorithm for doing such thing.
2. Describe how a logic programming language is different from a general programming language.
Logical programming language uses a form of symbolic logic as a programming language, unlike other general programming language. Languages based on symbolic logic are called logic programming languages, or declarative languages.
8. Critically comment on the following statement : “ Logic programs are nonprocedural”.
I think it’s true, since 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.