形式化方法0051

形式化方法0051

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 5.2 Temporal Logic In this chapter, we introduce the language of temporal logic as a tool for the specification of reactive systems. By specification we mean the description of the desired behavior or operation of the system, while avoiding references to the method or details of its implementation. Viewing a program as a generator of a set of computations. The language of temporal logic defines predicates over infinite sequences of states. Thus each formula of temporal logic is satisfied by some sequences and falsified by some other sequences. Interpreted over a computation, such a formula expresses a property of the computation. Example Consider a program P implementing mutual exclusion between processes P1 and P2. p : For all states of the computation, it is never the case that P1 and P2 occupy their critical sections at the same state. p 1 : If a computation contains a state at position j 0 in which P1 is waiting to enter. the critical section, then also contains a state at a position k j in which P 1 is inside the critical section. That is, whenever P 1 wishes to enter its critical section, it will eventually do so. p 2 : The same requirement as p 1 but for process P 2 . These properties are true of some sequences and false of others. If a property p is true of all computations generated by a program P, then we call p a valid property of P. If p , p 1 , p 2 are valid properties of a program P, then P should be considered an acceptable solution to the mutual exclusion program. This suggests that the set of properties p , p 1 , p 2 can be viewed as a specification of the mutual exclusion program. P Satisfies p p 1 p 2 . We may view a property ( a set of properties) as a specification for a program. It specifies any program all of whose computations satisfy (or have) the property. Let sat(p) be the set of all sequences that satisfy property p and (P) the set of all sequences that are computations of P. We say that P implements the specification p , or P satisfies p , if the set of computation of P is contained in the set of sequences satisfying p , i.e., (P) sat(p) . State Formulas A state formula can be evaluated at a certain position j 0 in a sequence, and it expresses properties of the state s j occurring at this position. State Language Vocabulary : a countable set of typed variables; Data variables ( booleans, integers, lists, and sets.); Control variables ( values locations in programs). Other Symbols...
View Full Document

This note was uploaded on 10/20/2009 for the course CS G22 taught by Professor Sam during the Fall '06 term at Academy of Art University.

Page1 / 116

形式化方法0051

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online