dynamic logic semantics for uml consistency
play

Dynamic Logic Semantics for UML Consistency Greg OKeefe Computer - PowerPoint PPT Presentation

Dynamic Logic Semantics for UML Consistency Greg OKeefe Computer Sciences Laboratory Australian National University The Big Picture a model is a statement about systems The Big Picture a model is a statement about systems but its meaning


  1. Dynamic Logic Semantics for UML Consistency Greg O’Keefe Computer Sciences Laboratory Australian National University

  2. The Big Picture a model is a statement about systems

  3. The Big Picture a model is a statement about systems but its meaning is only approximate

  4. The Big Picture a model is a statement about systems but its meaning is only approximate so we can not say if it is consistent

  5. The Big Picture a model is an approximate statement about systems

  6. The Big Picture a model is an approximate statement about systems a dynamic logic formula is also a statement about systems

  7. The Big Picture a model is an approximate statement about systems a dynamic logic formula is also a statement about systems its meaning is exact

  8. The Big Picture a model is an approximate statement about systems a dynamic logic formula is also a statement about systems its meaning is exact and we can automatically determine its consistency

  9. The Big Picture a model is an approximate statement about systems a dynamic logic formula is also a statement about systems its meaning is exact and we can automatically determine its consistency (undecidable, but most of the time)

  10. The Big Picture a model is an approximate statement about systems a dynamic logic formula is a precise statement about systems

  11. The Big Picture a model is an approximate statement about systems a dynamic logic formula is a precise statement about systems so we translate models into dynamic logic ...

  12. Consistency (Logic 101) In a situation, each statement is true or false. The circle is red. true The circle is red. false

  13. Consistency (Logic 101) In a situation, each statement is true or false. The circle is red. true The circle is red. false A statement is consistent if it is true in some situation. The circle is red. consistent The circle is square. inconsistent

  14. A model is a statement about systems Given a system, each model is true or false. situation/system statement/model true? false?

  15. A model is a statement about systems Given a system, each model is true or false. situation/system statement/model true? false? To answer model consistency questions, we need definitions of:

  16. A model is a statement about systems Given a system, each model is true or false. situation/system statement/model true? false? To answer model consistency questions, we need definitions of: model (syntax) system (semantic domain)

  17. A model is a statement about systems Given a system, each model is true or false. situation/system statement/model true? false? To answer model consistency questions, we need definitions of: model (syntax) system (semantic domain) when a model is true of a system (semantics)

  18. A model is a statement about systems Given a system, each model is true or false. situation/system statement/model true? false? To answer model consistency questions, we need definitions of: model (syntax) system (semantic domain) when a model is true of a system (semantics) Do we have this in the OMG documents?

  19. A model is a statement about systems Given a system, each model is true or false. situation/system statement/model true? false? To answer model consistency questions, we need definitions of: model (syntax) system (semantic domain) when a model is true of a system (semantics) Do we have this in the OMG documents? To answer the questions automatically, we need a procedure to search the (infinte) space of systems.

  20. Mellor’s Challenge Class Diagram State Machine for Class A Entry Action for State s ′ send X to self.ex

  21. Mellor’s Challenge Class Diagram Sequence Diagram State Machine for Class A Entry Action for State s ′ send X to self.ex

  22. Mellor’s Challenge We want semantics to say this is Class Diagram inconsistent Sequence Diagram State Machine for Class A Entry Action for State s ′ send X to self.ex

  23. Mellor’s Challenge We want semantics to say this is Class Diagram inconsistent tools to detect it Sequence Diagram State Machine for Class A Entry Action for State s ′ send X to self.ex

  24. Dynamic Logic (Logic 201) First Order Logic syntax example: ∀ x • f ( x ) = y

  25. Dynamic Logic (Logic 201) First Order Logic syntax example: ∀ x • f ( x ) = y interpretation M gives us a function f M

  26. Dynamic Logic (Logic 201) First Order Logic syntax example: ∀ x • f ( x ) = y interpretation M gives us a function f M valuation u gives us individuals x u , y u

  27. Dynamic Logic (Logic 201) First Order Logic syntax example: ∀ x • f ( x ) = y interpretation M gives us a function f M valuation u gives us individuals x u , y u ∀ x needs truth of f ( x ) = y under all x -variants of u

  28. Dynamic Logic (Logic 201) First Order Logic syntax example: ∀ x • f ( x ) = y interpretation M gives us a function f M valuation u gives us individuals x u , y u ∀ x needs truth of f ( x ) = y under all x -variants of u example formula is true iff f M is constant with value y u

  29. Dynamic Logic (Logic 201) First Order Logic syntax example: ∀ x • f ( x ) = y interpretation M gives us a function f M valuation u gives us individuals x u , y u ∀ x needs truth of f ( x ) = y under all x -variants of u example formula is true iff f M is constant with value y u Dynamic Logic syntax example: � y := f ( x ) � x = y

  30. Dynamic Logic (Logic 201) First Order Logic syntax example: ∀ x • f ( x ) = y interpretation M gives us a function f M valuation u gives us individuals x u , y u ∀ x needs truth of f ( x ) = y under all x -variants of u example formula is true iff f M is constant with value y u Dynamic Logic syntax example: � y := f ( x ) � x = y � program � ϕ means ϕ might be true after program runs

  31. Dynamic Logic (Logic 201) First Order Logic syntax example: ∀ x • f ( x ) = y interpretation M gives us a function f M valuation u gives us individuals x u , y u ∀ x needs truth of f ( x ) = y under all x -variants of u example formula is true iff f M is constant with value y u Dynamic Logic syntax example: � y := f ( x ) � x = y � program � ϕ means ϕ might be true after program runs program means binary relation over valuations

  32. Dynamic Logic (Logic 201) First Order Logic syntax example: ∀ x • f ( x ) = y interpretation M gives us a function f M valuation u gives us individuals x u , y u ∀ x needs truth of f ( x ) = y under all x -variants of u example formula is true iff f M is constant with value y u Dynamic Logic syntax example: � y := f ( x ) � x = y � program � ϕ means ϕ might be true after program runs program means binary relation over valuations x := t relates u to the x -variant with x �→ t M , u

  33. Dynamic Logic (Logic 201) First Order Logic syntax example: ∀ x • f ( x ) = y interpretation M gives us a function f M valuation u gives us individuals x u , y u ∀ x needs truth of f ( x ) = y under all x -variants of u example formula is true iff f M is constant with value y u Dynamic Logic syntax example: � y := f ( x ) � x = y � program � ϕ means ϕ might be true after program runs program means binary relation over valuations x := t relates u to the x -variant with x �→ t M , u ρ ; ρ ′ ρ ∪ ρ ′ ρ ∗ more syntax: ϕ ? [ ρ ] ϕ

  34. System States and Evolution Statics: What is a system state?

  35. System States and Evolution Statics: What is a system state? a system state is a valuation

  36. System States and Evolution Statics: What is a system state? a system state is a valuation objects are individuals, they persist

  37. System States and Evolution Statics: What is a system state? a system state is a valuation objects are individuals, they persist attributes, association ends are “array” variables

  38. System States and Evolution Statics: What is a system state? a system state is a valuation objects are individuals, they persist attributes, association ends are “array” variables Dynamics: How can a system evolve? Objects do actions, if conditions allow:

  39. System States and Evolution Statics: What is a system state? a system state is a valuation objects are individuals, they persist attributes, association ends are “array” variables Dynamics: How can a system evolve? Objects do actions, if conditions allow: guard ?; action

  40. System States and Evolution Statics: What is a system state? a system state is a valuation objects are individuals, they persist attributes, association ends are “array” variables Dynamics: How can a system evolve? Objects do actions, if conditions allow: ε ≡ (( sc ( x , M , y )?; x . send M to y ) ∪ ( ac ( x )?; x . accept )) ∗

  41. System States and Evolution Statics: What is a system state? a system state is a valuation objects are individuals, they persist attributes, association ends are “array” variables Dynamics: How can a system evolve? Objects do actions, if conditions allow: ε ≡ (( sc ( x , M , y )?; x . send M to y ) ∪ ( ac ( x )?; x . accept )) ∗ sc ( x , M , y ) ≡ x . class = ExternalEntity ∨ ( head ( x . todo ) = send M to y ) x . send M to y ≡ y . intray := append ( y . intray , M ); x . todo := tail ( x . todo )

  42. Class Diagram For each diagram, a range of interpretations is possible, even desirable. Here we give rather weak ones.

Recommend


More recommend