Lecture1

advertisement
Process Algebra (2IF45)
Dr. Suzana Andova
Practical issues
• Lecturer
- Suzana Andova
- Group: Software Engineering and Technology group
- Section: Model Driven Software Engineering
• My coordinates:
• office HG 5.36
• email s.andova@tue.nl
• phone: 5089
1
Process Algebra (2IF45)
Organization
• Course information
- http://www.win.tue.nl/~andova/education/2IF45/201112/201112.html
• Course material
• book:
− Jos C.M. Baeten, T. Basten, M.A. Reniers “Process Algebra:
Equational Theories of Communicating Processes”
• lecture notes “Probabilistic Process Algebra” available at
http://www.win.tue.nl/~andova/education/2IF45/lnpa.pdf
• distributed papers
• slides
2
Process Algebra (2IF45)
Organization
Lectures
• Quarter 3 (06-02-2012 – 02-04-2012): laplace-gebouw -1.19
• Quarter 4 (23-04-2012 – 18-06-2012): HG 6.09
Course activities
• group assignments
− 3 assignments = 40% of the final grade
• exam = 60% of the final grade
• home works
− not compulsory but useful
• active participation, discussion
• few questionnaires – evaluation
3
Process Algebra (2IF45)
Content of the course
• Equational theories and Operational semantics
• Equational theory of communication processes
• Equational theories for probabilistic processes
Learning objectives:
• be able to develop extensions of a process algebraic language,
axiomatically and semantically
• be able to establish and analyze relations and discover
"inconsistencies" between a given equational theory and its
operational semantics
• be able to decide the most suitable construct(s) to specify particular
system behavior
• be able to specify and analyze probabilistic process specifications
4
Process Algebra (2IF45)
Questions for you
• Where did you do your bachelor:
• TU/e (CS, ES, WIN)
• TU/e (Mechanical eng., Electrical eng. )
• HBO
• Manipal
• other university?
• Who knows what formal methods are about?
• Who is familiar with labeled transition systems?
• Who is familiar with (any level) mCRL2, Chi?
• Who has knowledge (any level) on model checking?
• Who has knowledge on bisimulation relations?
• Who is acquainted with probability theory?
5
Process Algebra (2IF45)
Questions for me?
6
Process Algebra (2IF45)
Process Algebra (2IF45)
Introduction
Dr. Suzana Andova
Foundations (Example)
• Natural numbers N = {0, 1, 2, …}
• Operations: + and •
The Peano axioms define the arithmetical properties of natural numbers
• “ingredients” to build the set of natural numbers N
− 0 constant and
− s unary operator (successor function)
Axiom
If n is a natural number then s(n) is natural number,
n N  s(n) N
8
Process Algebra (2IF45)
Foundations (Example - cont.)
Addition of natural numbers
• “addition” a: N x N → N is axiomatized as
− a(x,0) = x
− a(x,s(y)) = s(a(x,y))
Multiplication of natural numbers
• “multiplication” m: N x N → N is axiomatized as
− m(x,0) = 0
− m(x,s(y)) = a(m(x,y),x)
9
Process Algebra (2IF45)
Foundations (Example - cont.)
Derivation of other equalities
• use the axioms
• derive more equalities using the following rules:
− reflexivity x = x
− symmetry x= y  y = x
− transitivity x = y  y = z  x = z
Example of a theorem: s(s(0)) = m(s(s(0)), s(0))
10
Process Algebra (2IF45)
Foundations (Example – recap )
The Peano axioms define the arithmetical properties of natural numbers
−
−
−
−
0 constant and
S unary operator
“addition” a: N x N → N binary function
“multiplication” m: N x N → N binary function
Signature
− Terms: s(s(0)), a(s(0),m(s(0),s(s(s(0))))), 0,
−
−
−
−
−
n N  s(n) N
a(x,0) = x
a(x,s(y)) = s(a(x,y))
m(x,0) = 0
m(x,s(y)) = a(m(x,y),x)
Axioms
− reflexivity x = x
− symmetry x= y  y = x
− transitivity x = y  y = z  x = z
11
Process Algebra (2IF45)
Relation (derivation rules)
Foundation
• Axiom is any mathematical statement that serves as a starting
point from which other statements are logically derived
“absolute truth”
• Derivation rules are also part of the theory used to form new
“truths” from the old once.
• Theorems are mathematical statements that can be derived
from the axioms by derivation.
• Interpretation and models of an equational theory
12
Process Algebra (2IF45)
Alternative Representation of numbers:
unary semantics
• If we would like to represent numbers as
s(s(0))
1
s(0)
1
0
13
Process Algebra (2IF45)
Alternative Representation of numbers:
unary semantics
1
s(x) 
x
0 
1
y
y’

1
a(x,y)  a(x, y’)
1
x
x’ , y
1
a(x,y) 
x’
x, y
a(x,y) 
a( s(s(0)), s(s(s(0))) )
1

14
1

a( s(s(0)), 0 )
1
s(0)


a( s(s(0)), s(s(0)) )


1

a( s(s(0)), s(0) )

1
0 

Alternative Representation of numbers:
unary semantics
a( s(s(0)), s(s(s(0))) )
1

a( s(0), s(s(s(0))) )
1

a( s(s(0)), s(s(0)) )

a( s(0), s(s(0)) )
1


a( s(0), s(0) )
1


1

1

1
a( s(0), 0 )

15
1
1
1

a( s(s(0)), 0 )

1
1

a( s(s(0)), s(0) )
1
a( 0, s(s(s(0))) )

1
a(0, s(s(0)) )
1

a(0, s(0) )
1
1


a(0,0)  
Process Algebra (2IF45)
Representation of Reactive systems
Dr. Suzana Andova
Reactive systems
• Reactive systems execute by reacting to stimuli from its
environment
• Many of them are control crucial and/or safety critical
• These systems are large and usually consist of a number of
components which interact with each other
• Modeling reactive systems
• abstract model of the system
• unambiguous description
• methods and tools for model analysis (verification of
qualitative properties, performance analysis)
17
Process Algebra (2IF45)
Representation as Labeled transition systems
x:= 1;
y:= x+1;
out(y).
in(x);
y:= x+1;
while (true) {
out(y);
}.
?x
?x
!x
y:=x+1
?y
y:=x+1
!y
!y
18
out(x);
in(y).
Process Algebra (2IF45)
Representation as Labeled transition systems
VM1
VM2
VM3
?return
?coin
!coffee
?coin
?return
!tea
?coin
!coffee
!tea
!tea
!coffee
User
!coin
19
error
?coffee
Process Algebra (2IF45)
Representation as Labeled transition systems
VM1
!coffee
?coin
!tea
composition
VM1 and User
User
coin
!coin
?coffee
coffee
!coffee
20
?coin
!tea
Process Algebra (2IF45)
Representation as Labeled transition systems
VM2
VM2’
?return
?return
?coin
!coffee
?coin
?coffee
?tea
!coffee
!tea
!tea
User
!coin
21
!coffee
?coffee
Process Algebra (2IF45)
Representation as Labeled transition systems
VM1’’
VM1’
?coin
!coffee
Using VM1’
!tea
?coin
?coin
!coffee
!tea
Using VM1’’
coin
coin
coffee
coffee
22
Process Algebra (2IF45)
coin
Questions
• When modeling a system, is an LTS a model to start with or is it
something to be obtained as a final or side product?
• What entities do we need to have predefined, to be able to produce an
LTS?
• What is a state?
• What is a transition?
• How do we know drawing a transition from a state s to a state s’ is
right? How do we know which label to assign to it?
• How do we combine LTSs?
23
Process Algebra (2IF45)
Use of LTS representations
In (model checking) tools
manipulating
the state space (LTSs):
UPPAAL, Prism, MRMC
manipulating
the specification (language):
mCRL2, Chi, CADP, FDR, PEPA,
MRMC +IMC
reduction
on specification
components’ specifications
…
reduction
on specification
the whole system specification
No!
reduction
on LTSs
verification
model checking
the state space
SSpace generation
property specification
Yes!
24
Process Algebra (2IF45)
composition by axiom
Equational theory in place
In (model checking) tools
manipulating
the state space (LTSs):
UPPAAL, Prism, MRMC
manipulating
the specification (language):
mCRL2, Chi, CADP, FDR, PEPA,
MRMC updated IMC
reduction
on specification
components’ specifications
…
reduction
on specification
the whole system specification
No!
reduction
on LTSs
verification
model checking
25
Yes!
the state space
composition by axiom
SS generation by the SOS rules
property specification
Process Algebra (2IF45)
Equational theory in place
In (model checking) tools
manipulating
the state space (LTSs):
UPPAAL, Prism, MRMC
manipulating
the specification (language):
mCRL2, Chi, CADP, FDR, PEPA,
MRMC updated IMC
reduction
on specification
components’ specifications
consistent
…
reduction
on specification
the whole system specification
No!
reduction
on LTSs
verification
model checking
26
Yes!
the state space
composition by axiom
SS generation by the SOS rules
property specification
Process Algebra (2IF45)
Equational theory in place
In this course we will learn HOW to build a consistent
Process Algebra
= checking)
specification
In (model
tools language
+ axioms
manipulating
manipulating
+
SOS
rules
the state space (LTSs):
the specification (language):
+ reduction equivalence
relations
UPPAAL, Prism, MRMC
mCRL2, Chi, CADP,
FDR, PEPA,
MRMC
updated
IMC
so that the initial specification and the model checked
LTS,
they both
reduction
describe the same system!
on specification
components’ specifications
consistent
…
reduction
on specification
the whole system specification
No!
reduction
on LTSs
verification
model checking
27
Yes!
the state space
composition by axiom
SS generation by the SOS rules
property specification
Process Algebra (2IF45)
Download