<< Chapter < Page Chapter >> Page >

So far, we've seen some of the built-in checks performed by SPIN: assertions, deadlock, non-progress, and one notion of fairness.But what about other properties we'd like to check for? We might be interested in properties which the implementors ofour particular tool weren't interested in, or hadn't thought of. Fortunately, SPIN does includea general property-checking mechanism: If we can state our property in a particularformal temporal logic , then SPIN will allow us to check the property.

First, we'll introduce the syntax and semantics of one particular temporal logic, LTL . Then , we'll return we'll return to SPIN and howit uses temporal logic for verification.

First, we reflect that some propertiessafety propertiescan be phrased in terms of ``some particular state is unreachable''.For example, a state where two processes are sending information to the printer simultaneously never occurs.Failed assertions can be viewed as a transition to a fail-state, and we require that this state is unreachable.Deadlock can be viewed as a state with no legal outgoing transition, and not all processes sitting in an end-state.

Similarly we reflect that other propertiesliveness propertiesare about entire traces, not just some state in a trace. For instance, non-progress cycles is a cycle which does not containany states labeled as progress states.

We want a richer language to have a way of talking about traces, but that is precise and not subject to English's vagaries.We'll work towards using logica temporal logic specifically designed to beconducive to expressing concepts which arise in concurrent programming. But before we can even do that, we need a clear model ofconcurrent programs, and more formal definitions of some ideas we've already seen.

Concurrent programs as state space automata

The notions we've seen of states , traces , and state spaces aren't specific to Promela, but are useful in any formalization of concurrent systems.In fact, we are ready to give one precise definition of a ``concurrent system'' in terms states and traces.It is similar to many conventional automata definitions , but includes a way to relate the current state to propositions , which we can later construct formulas out of.

State Space Automaton
A State Space Automaton A is a tuple S s 0 T Prop P where:
  • S is a set of states. As before , a state is an assignment to all program variables (both local an global),including the program counter (line number) for each process.
  • s 0 S is the initial state or start state .
  • T S S is the transition relation . Equivalently, this is the edge relation of the state space .
  • Prop , a set of propositions.
  • P : S 2 Prop is a mapping which, given a state, indicates all the properties that are true in that state.

It is the set Prop which will allow us to talk about our program variables in our logic formulas.The elements of Prop are simple propositions involving program variables. For example,

  • philosopher_2_has_fork
  • ( ctr 3 )
  • (in[].size() == max_buffer_size) (that is, the buffer in[] is full)
Each of these might be true in some states and false in other states; the function P gives a truth assignment to the propositions(a different truth assignment for each state).

Questions & Answers

what are components of cells
ofosola Reply
twugzfisfjxxkvdsifgfuy7 it
Sami
58214993
Sami
what is a salt
John
the difference between male and female reproduction
John
what is computed
IBRAHIM Reply
what is biology
IBRAHIM
what is the full meaning of biology
IBRAHIM
what is biology
Jeneba
what is cell
Kuot
425844168
Sami
what is biology
Inenevwo
what is cytoplasm
Emmanuel Reply
structure of an animal cell
Arrey Reply
what happens when the eustachian tube is blocked
Puseletso Reply
what's atoms
Achol Reply
discuss how the following factors such as predation risk, competition and habitat structure influence animal's foraging behavior in essay form
Burnet Reply
cell?
Kuot
location of cervical vertebra
KENNEDY Reply
What are acid
Sheriff Reply
define biology infour way
Happiness Reply
What are types of cell
Nansoh Reply
how can I get this book
Gatyin Reply
what is lump
Chineye Reply
what is cell
Maluak Reply
what is biology
Maluak
what is vertibrate
Jeneba
what's cornea?
Majak Reply
what are cell
Achol
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Model checking concurrent programs. OpenStax CNX. Oct 27, 2005 Download for free at http://cnx.org/content/col10294/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Model checking concurrent programs' conversation and receive update notifications?

Ask