
















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of Design Verification and Test are: Basic Operations On Temporal Logic, Represented, Collection, Output Function, Boolean Function, Decision Diagram, Reduced Order Binary, Design Process, Detailed Level, Equivalence Checking
Typology: Study notes
1 / 56
This page cannot be seen from the preview
Don't miss anything!

















































1. Introduction As discussed in the third module of the “Design” part of the course, any digital system can be represented by a collection of Boolean expressions. Each Boolean expression represents one output function/signal of the system. In the previous module (of the “Verification” part of the course) we have discussed one data structure by which we can represent the Boolean function in an efficient way. It is also mentioned that ROBDD (Reduced Order Binary Decision Diagram) provides the canonical representation of a Boolean function. Due to this, the checking for validity, satisfiability of Boolean expressions has become easy. During the design process, we move through different levels of abstractions, starting from very high level to detailed level. While moving from one level to other level of abstraction, sometime it is needed to check for their equivalence. BDD representation provides an efficient method for equivalence checking mainly at the Boolean level. During the design phase, it is always not required to go for Boolean expression for each function. We may go for design at the functional level and represent the whole system with some abstracted model. But while going through the design phases, it is better to check for correctness of design in every stage. While conceiving the idea of a digital system, we know the system should meet some specifications or properties. While designing the system, we must always ensure that the design will always meet those specification or requirements. One way of checking for the correctness of specification is logical reasoning. We may use some logical formalism to represent the specification and use the underlying theory of that logical framework to reason about it. In this lecture we will look for some logical framework by which we can formally represent the specification. We will start with propositional logic and predicate logic. Then we will see why we need some other logic to capture the specifications. The aim of logic in computer science is to develop languages to model the situations we encounter as computer science professionals, in such a way that we can reason about
them formally. Reasoning about situations means constructing arguments about them; we want to do this formally, so that the arguments are valid and can be defended rigorously, or executed on a machine.
2.1 The Need for a Richer Language: The propositional logic is not powerful enough to represent all types of assertions that are used in computer science and mathematics, or to express certain types of relationship between the propositions such as equivalence. For example, the assertion ‘ x is greater than 1’, where x is a variable, is not a proposition because you cannot tell whether it is true or false unless you know the value of x. Thus, propositional logic cannot deal with such sentences. However, such assertions appear quite often in mathematics and we want to do inferencing on those assertions. Also the pattern involved in the following logical equivalences cannot be captured by the propositional logic: ‘Not all objects that glitter is gold’ is equivalent to ‘Some objects that glitter are not gold’. ‘Not all integers are prime’ is equivalent to ‘Some integers are not prime’ ‘Not all cars are driven by petrol’ is equivalent to ‘Some cars are not driven by petrol’ Each of the above propositions are treated independently of the others in propositional logic. For example, if P represents ‘Not all objects that glitter is gold’ and Q represents ‘Some integers are not prime’, then there is no mechanism in propositional logic to find out whether or not P is equivalent to Q. Hence, to be used in inferencing, each of these equivalences must be listed individually rather than dealing with a general formula that covers all these equivalences collectively and instantiating these become necessary, if only propositional logic is used. Thus we need more powerful logic to deal with these and other problems. Predicate logic is one type of such logic family.
3. Predicate Logic A predicate is a generalization of a propositional variable. Suppose we have three propositions R : ‘He is working hard’, U : ‘He gets good marks’, and W : ‘He gets fail grade’. Suppose, further we have three hypotheses or expressions that we assume are true: R→ U ‘If he is working hard, then he gets good marks’, U→ ¬W ‘If he gets good marks, then he doesn’t get fail grade’, and ¬R→¬U ‘If he is not working hard, then he doesn’t get good marks’ What is true for “He” is also true for Ram, and Shyam, and Madhu, and so on. We can define symbol U to be a predicate that takes an argument X. The expression: U(X): ‘X gets good marks’ Possibly, for some values of X, U(X) is true, and for other values of X, U(X) is false. Similarly, W(X): ‘ X gets fail grade.” R(X) : “ X is working hard”, In predicate logic, we also use two quantifiers, one is universal quantifier, for all ( ), and the other is existential quantifier, there exists ( ). We can write: x [R(x) → U(x)] for all those who work hard will get good marks. Also, x [U(x)] There exists someone who gets good marks.
Propositional/predicate logic, can represent statements whose truth value is constant in time. However, there are statements and we need to reason about them whose truth values change over time, e.g., there is peace in the country. This truth of the statement may vary with time. To represent such statements we need a more powerful logic namely, temporal logic.
4.1 Temporal Operators: Temporal logic has two kinds of operators namely, (i) logical and modal and (ii) temporal. Logical operators are usual truth-functional operators ( ) (used for propositional and predicate logic). The basic temporal operators are of two types namely (i) future and (ii) past; the details are as follows. Operator (^) Textual Explanation Future Operators
○ (^) X φ neXt: φ holds at the next state.
◊ (^) F φ Future : φ eventually holds (somewhere on the subsequent path).
□ (^) G φ Globally: φ holds on the entire subsequent path.
U φ U ψ
Until: ψ holds at the current or a future position, and φ has to hold until that position. At that position φ does not have to hold any more.
R φ^ R^ ψ^ Release: φ is true (or forever if such a position does not exist).^ φ^ releases^ ψ^ if^ ψ^ is true until the first position in which
Past Operators
β (^) φ β ψ Back to:^ φ^ holds in all previous positions (including the present) starting at the last position ψ held.
Temporal formulas are interpreted over a model, which is an infinite sequence of states. Given a model M and a temporal formula φ, we define an inductive definition for the notion of φ holding at a position Sj for j 0 in M and denoted
A. Next: φ has to hold at the next state. Symbol:
Definition:
Example:
Figure 1. Example of X In Figure 1, state S (^) j satisfies X as its next state Sj+1 satisfies φ.
B. Future: φ eventually has to hold (somewhere on the subsequent path). Symbol: F φ Definition: ( M S , (^) j ) | F k k , j , ( M S , (^) k ) | Example:
Figure 2. Example of F In Figure 2, state S (^) j satisfies F as future state Sk satisfies φ.
E. Release: φ releases ψ if ψ is true until the first position in which φ is true (or forever if such a position does not exist). Symbol:
Definition: ( , ) | , ( , ) | and ( , ) | OR ( , ) |
j j k j
M S j j k M S M S j M S
Example
...........
Figure 5. Example of (φ R ψ)
In Figure 5, Sj satisfies ( φ R ψ) because ψ is true for all states Sj through Sk and then ψ is true for states starting from Sk.
F. Previous: φ has to hold at the previous state. Symbol:
Definition: ( M S , (^) j ) | ( M S , (^) j 1 ) | Example:
...........
In Figure 6, state S (^) j satisfies ●φ as its previous state Sj-1 satisfies φ.
G. Eventually in past: φ eventually has to hold in the past. Symbol:
Definition:
Example:
s 0 s (^) j ...........
H. Globally in past: φ has to hold on the entire previous path. Symbol:
Definition:
Example:
...........
I. Back to: φ holds in all previous states (including the present) starting at the last position ψ held. Symbol:
............
is true.
there is no need for any constraints.
s 0 s^ j s^ k ...........
C. (P (Q U R): Either P holds in a state or Q U R ( Q until R ) holds
Figure 11. (P (Q U R) holds in all states
Here P (Q U R) is true for all states because P is true for S 0 and for others (Q U R) is true. D. (P (Q U R) : P holds in a state and also Q U R ( Q until R ) holds in the state
............ Figure 12. (P (Q U R) holds in all sates
Here P (Q U R) is true for all states because P is true for all state and (Q U R) is also true for all the states.
E. (P ● Q): P holds in a state and in the previous state Q holds
........... Figure 13. (P (^) ● Q) holds in all sates Here every state satisfy P and^ ● Q^ (i.e., Q holds in the previous state).
5. Conclusions
[1]. Michael Huth and Mark Ryan, “Logic in Computer Science: Modelling and Reasoning about Systems”, 2nd^ edition, Cambridge University Press, New York, NY, USA.
Question and Answers
Question : What does the temporal formula (P→ ◆ Q) mean? Give an example where this formula is valid in all the states.
Answer: (P→ ◆ Q) means that “If P holds in a state then eventually in past Q holds”. In the example given below, (P→ ◆ Q) holds in all states because (i) in all states except Sk, (P→ ◆ Q) is vacuously true because P does not hold, (ii)At state Sk, P is true and eventually in past Q holds at Sj.
............
Figure 14. (P→ ◆ Q) holds in all sates
s
s1 s2 s
s4 s5 s6 s7 s
There exists a path from s3 where.... Path: Either through C or D
C D
In all paths from s1 where....
Path: Both through A and B
A (^) B Figure 2. Statements over ALL paths and a SINGLE path in branching time temporal logic
2. Syntax of CTL A CTL formula comprises 1. Atomic propositions such as {p, q, r…..} 2. Path Quantifiers {A,E} a. A : all paths starting from a given state. b. E : there exists at least one path from a given state. 3. Propositional logic operators such as AND ( ), OR ( ), NOT ( ) 4. Temporal operators {X,F,G,U} a. NE X T: next states of current state. b. F UTURE: any one of future states from the current state. c. G LOBAL: all future states from the current state. d. U NTIL: Some CTL formula holds until another CTL formula, from the current state. X,F,G are unary operators and U is binary operator. These temporal operators are illustrated using an example in Figure. 3.