Compositional Action System Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Compositional Action System Derivation Introduction Using Enforced Properties Action systems Enforced properties Example Brijesh Dongol and Ian J. Hayes School of Information Technology and Electrical Engineering, The University of Queensland MPC 2010
Compositional Action System Outline Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction Introduction 1 Action systems Enforced properties Action systems 2 Example 3 Enforced properties Example 4
Compositional Action System History Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction • Sequential program derivation (Dijkstra, 1975) Action systems Enforced • Safety-based concurrent program derivation (Feijen and properties van Gasteren, 1999) Example • Progress-based concurrent program derivation (Dongol and Mooij, 2006 & 2008) • Enforced properties (Dongol and Hayes, 2009), (Dongol, 2009) - PhD thesis
Compositional Action System This paper Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction Action systems Goals Techniques Enforced 1. Calculational development properties Example 2. Incremental trace refinement 3. Compositionally address safety and progress 4. Simplify existing rules
Compositional Action System This paper Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction Action systems Goals Techniques Enforced 1. Calculational development Weakest precondition properties Example 2. Incremental trace refinement 3. Compositionally address safety and progress 4. Simplify existing rules
Compositional Action System This paper Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction Action systems Goals Techniques Enforced 1. Calculational development Weakest precondition properties Example 2. Incremental trace refinement Enforced properties and frames 3. Compositionally address safety and progress 4. Simplify existing rules
Compositional Action System This paper Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction Action systems Goals Techniques Enforced 1. Calculational development Weakest precondition properties Example 2. Incremental trace refinement Enforced properties and frames 3. Compositionally address Temporal logic on relations safety and progress 4. Simplify existing rules
Compositional Action System This paper Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction Action systems Goals Techniques Enforced 1. Calculational development Weakest precondition properties Example 2. Incremental trace refinement Enforced properties and frames 3. Compositionally address Temporal logic on relations safety and progress 4. Simplify existing rules Action systems framework
Compositional Action System Syntax Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction Action systems Statements and actions Enforced S :: = diverge | skip | x : = E | x : ∈ V | S 1 ; S 2 | x · [[ S ]] properties :: = b → S | A 1 ⊓ A 2 | x · [[ A ]] A Example Action systems = A 0 ; do A od is an action system with initialisation action A ˆ A 0 and main action A
Compositional Action System Frames Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction • If x is a variable of type T : Action systems Enforced properties x · [[ S ]] = S ; x : ∈ T Example x · [[ b → S ]] = b → x · [[ S ]] x · [[ A 1 ⊓ A 2 ]] = x · [[ A 1 ]] ⊓ x · [[ A 2 ]]
Compositional Action System Frames Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction • If x is a variable of type T : Action systems Enforced properties x · [[ S ]] = S ; x : ∈ T Example x · [[ b → S ]] = b → x · [[ S ]] x · [[ A 1 ⊓ A 2 ]] = x · [[ A 1 ]] ⊓ x · [[ A 2 ]] • Frames allow introduction of new (internal) variables
Compositional Action System Frames Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction • If x is a variable of type T : Action systems Enforced properties x · [[ S ]] = S ; x : ∈ T Example x · [[ b → S ]] = b → x · [[ S ]] x · [[ A 1 ⊓ A 2 ]] = x · [[ A 1 ]] ⊓ x · [[ A 2 ]] • Frames allow introduction of new (internal) variables • Frames can be turned into statements by refinement
Compositional Action System Refinement Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Suppose s ∈ seq. Σ . We assume Introduction Action systems • rL . s removes local variables from each state in s Enforced • rS . s removes stuttering in s properties Example Definition (Trace refinement) A ⊑ Tr C = ∀ t : Tr . C • ∃ s : Tr . A • rS . ( rL . s ) = rS . ( rL . t ) ˆ
Compositional Action System Refinement Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Suppose s ∈ seq. Σ . We assume Introduction Action systems • rL . s removes local variables from each state in s Enforced • rS . s removes stuttering in s properties Example Definition (Trace refinement) A ⊑ Tr C = ∀ t : Tr . C • ∃ s : Tr . A • rS . ( rL . s ) = rS . ( rL . t ) ˆ Lemma If Tr . C ⊆ Tr . A , then A ⊑ Tr C .
Compositional Action System A temporal logic on relations Derivation Using Enforced Properties Brijesh Dongol and Ian J. Linear temporal logic (LTL) Hayes (Manna and Pnueli, 1992) Introduction always ( � ), eventually ( � ), until ( U ), unless ( W ) defined for Action systems formulas on single-state predicates Enforced properties Example Relational linear temporal logic (RLTL) Defined over two-state relations • Semantics mostly the same as LTL • Difference: For sequence of states s and RLTL formula Q , ( s , u ) ⊢ � Q ⇐ ⇒ ∀ v : dom. s • v ≥ u ∧ v + 1 ∈ dom. s ⇒ ( s , v ) ⊢ Q
Compositional Action System Enforced properties Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes Introduction Action systems Definition (Enforced property) Enforced Suppose, A is an action system and R is a RLTL formula. properties Example Action system A with enforced property R , denoted A ? R , is an action system such that Tr . ( A ? R ) ˆ = { s : Tr . A | s ⊢ R }
Compositional Action System Enforced properties Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes • Given an initial action system A , suppose we want to Introduction derive an action system that satisfies RLTL property R Action systems Enforced properties Example
Compositional Action System Enforced properties Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes • Given an initial action system A , suppose we want to Introduction derive an action system that satisfies RLTL property R Action systems 1. Enforce property R on A to obtain A ? R Enforced properties Example
Compositional Action System Enforced properties Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes • Given an initial action system A , suppose we want to Introduction derive an action system that satisfies RLTL property R Action systems 1. Enforce property R on A to obtain A ? R Enforced 2. Derive B such that A ? R ⊑ Tr B and Tr . B | = R properties Example
Compositional Action System Enforced properties Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes • Given an initial action system A , suppose we want to Introduction derive an action system that satisfies RLTL property R Action systems 1. Enforce property R on A to obtain A ? R Enforced 2. Derive B such that A ? R ⊑ Tr B and Tr . B | = R properties 3. Hence, B satisfies R and furthermore does not need to Example enforce R
Compositional Action System Enforced properties Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes • Given an initial action system A , suppose we want to Introduction derive an action system that satisfies RLTL property R Action systems 1. Enforce property R on A to obtain A ? R Enforced 2. Derive B such that A ? R ⊑ Tr B and Tr . B | = R properties 3. Hence, B satisfies R and furthermore does not need to Example enforce R • We have rules that allow • introduction of new enforced properties • manipulation of existing enforced properties • introduction of new variables (via frames) • introduction and modification of actions
Compositional Action System Enforced properties Derivation Using Enforced Properties Brijesh Dongol and Ian J. Hayes • Given an initial action system A , suppose we want to Introduction derive an action system that satisfies RLTL property R Action systems 1. Enforce property R on A to obtain A ? R Enforced 2. Derive B such that A ? R ⊑ Tr B and Tr . B | = R properties 3. Hence, B satisfies R and furthermore does not need to Example enforce R • We have rules that allow • introduction of new enforced properties • manipulation of existing enforced properties • introduction of new variables (via frames) • introduction and modification of actions • Each rule ensures trace refinement
Recommend
More recommend