SlideShare a Scribd company logo
1 of 74
Download to read offline
Encoding Object-oriented Datatypes in HOL:
Extensible Records Revisited
The HOL-OCL Expierence
Achim D. Brucker
achim@brucker.ch http://www.brucker.ch/
Isabelle Developers Workshop (IDW )
Cambridge, UK, th June 
Outline
 Introduction
 An extensible Encoding of Object-oriented Data Models in HOL
 HOL-OCL
 Outlook and Conclusion
Introduction Tool Supported Formal Methods
Our Vision:
Tool Supported Formal Methods for (Model-driven) Software Development
1..∗
Role
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Model TransformationDesign
Phase Phase
Verification and
Code−generation Phase Deployment Phase
Testing and
UML/OCL
(XMI)
or
SecureUML/OCL
Code
Generator
Repository
Model
(su4sml)
Model−Analysis
and Verification
(HOL−OCL)
Transformation
Model
HOL−TestGen
ArgoUML
AC
Config
C#
+OCL
Test
Harness
manual
Code
Proof
Obligations
Test Data
Program
Generation
Validation
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Introduction Tool Supported Formal Methods
Our Vision:
Tool Supported Formal Methods for (Model-driven) Software Development
1..∗
Role
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Model TransformationDesign
Phase Phase
Verification and
Code−generation Phase Deployment Phase
Testing and
UML/OCL
(XMI)
or
SecureUML/OCL
Code
Generator
Repository
Model
(su4sml)
Model−Analysis
and Verification
(HOL−OCL)
Transformation
Model
HOL−TestGen
ArgoUML
AC
Config
C#
+OCL
Test
Harness
manual
Code
Proof
Obligations
Test Data
Program
Generation
Validation
Generic
SecureUML
ArgoUML−plugin
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Introduction Tool Supported Formal Methods
Our Vision:
Tool Supported Formal Methods for (Model-driven) Software Development
1..∗
Role
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Model TransformationDesign
Phase Phase
Verification and
Code−generation Phase Deployment Phase
Testing and
UML/OCL
(XMI)
or
SecureUML/OCL
Code
Generator
Repository
Model
(su4sml)
Model−Analysis
and Verification
(HOL−OCL)
Transformation
Model
HOL−TestGen
ArgoUML
AC
Config
C#
+OCL
Test
Harness
manual
Code
Proof
Obligations
Test Data
Program
Generation
Validation
Code Generator
SecureUML, UML, OCL
Java, C#, Junit, XACML, USE, ...
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Introduction Tool Supported Formal Methods
Our Vision:
Tool Supported Formal Methods for (Model-driven) Software Development
1..∗
Role
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Model TransformationDesign
Phase Phase
Verification and
Code−generation Phase Deployment Phase
Testing and
UML/OCL
(XMI)
or
SecureUML/OCL
Code
Generator
Repository
Model
(su4sml)
Model−Analysis
and Verification
(HOL−OCL)
Transformation
Model
HOL−TestGen
ArgoUML
AC
Config
C#
+OCL
Test
Harness
manual
Code
Proof
Obligations
Test Data
Program
Generation
Validation
Transformations:
SecureUML −> UML/OCL
UML/OCL −> UML/OCL
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Introduction Tool Supported Formal Methods
Our Vision:
Tool Supported Formal Methods for (Model-driven) Software Development
1..∗
Role
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Model TransformationDesign
Phase Phase
Verification and
Code−generation Phase Deployment Phase
Testing and
UML/OCL
(XMI)
or
SecureUML/OCL
Code
Generator
Repository
Model
(su4sml)
Model−Analysis
and Verification
(HOL−OCL)
Transformation
Model
HOL−TestGen
ArgoUML
AC
Config
C#
+OCL
Test
Harness
manual
Code
Proof
Obligations
Test Data
Program
Generation
Validation
Methodologies:
Well−formedness checking
Proof−obligation generation
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Introduction Tool Supported Formal Methods
Our Vision:
Tool Supported Formal Methods for (Model-driven) Software Development
1..∗
Role
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Model TransformationDesign
Phase Phase
Verification and
Code−generation Phase Deployment Phase
Testing and
UML/OCL
(XMI)
or
SecureUML/OCL
Code
Generator
Repository
Model
(su4sml)
Model−Analysis
and Verification
(HOL−OCL)
Transformation
Model
HOL−TestGen
ArgoUML
AC
Config
C#
+OCL
Test
Harness
manual
Code
Proof
Obligations
Test Data
Program
Generation
Validation
HOL−OCL
formal analysis
formal verification
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Introduction Tool Supported Formal Methods
Our Vision:
Tool Supported Formal Methods for (Model-driven) Software Development
1..∗
Role
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Model TransformationDesign
Phase Phase
Verification and
Code−generation Phase Deployment Phase
Testing and
UML/OCL
(XMI)
or
SecureUML/OCL
Code
Generator
Repository
Model
(su4sml)
Model−Analysis
and Verification
(HOL−OCL)
Transformation
Model
HOL−TestGen
ArgoUML
AC
Config
C#
+OCL
Test
Harness
manual
Code
Proof
Obligations
Test Data
Program
Generation
Validation
HOL−TestGen
model−based unit test
sequence testing
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Introduction Tool Supported Formal Methods
Our Vision:
Tool Supported Formal Methods for (Model-driven) Software Development
1..∗
Role
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Class
+ Public Method
# Protected Method
attribute: Type
− Private Method
Model TransformationDesign
Phase Phase
Verification and
Code−generation Phase Deployment Phase
Testing and
UML/OCL
(XMI)
or
SecureUML/OCL
Code
Generator
Repository
Model
(su4sml)
Model−Analysis
and Verification
(HOL−OCL)
Transformation
Model
HOL−TestGen
ArgoUML
AC
Config
C#
+OCL
Test
Harness
manual
Code
Proof
Obligations
Test Data
Program
Generation
Validation
Foundations of
of an interactive theorem prover
for object−oriented models.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Introduction Tool Supported Formal Methods
UML/OCL in a Nutshell
UML
Visual modeling language
Object-oriented development
Industrial tool support
OMG standard
Many diagram types, e. g.,
activity diagrams
class diagrams
...
OCL
Textual extension of the UML
Allows for annotating UML
diagrams
In the context of class–diagrams:
invariants
preconditions
postconditions
Account
balance:Integer
id:Integer
getId():Integer
getBalance():Integer
deposit(a:Integer):Boolean
withdraw(a:Integer):Boolean
accounts
1..*
context Account
inv: 0 <= id
context Account::deposit(a:Integer):Boolean
pre: 0 < a
post: balance = balance@pre+a
and id = id@pre
context Account
inv: 0 <= id
context Account::deposit(a:Integer):Boolean
pre: 0 < a
post: balance = balance@pre+a
and id = id@pre
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Introduction Tool Supported Formal Methods
Developing Formals Tools for UML/OCL?
Turning UML/OCL into a formal method
 A formal semantics of object-oriented data models (UML)
typed path expressions
inheritance
...
 A formal semantics of object-oriented constraints (OCL)
a logic reasoning over path expressions
large libraries
three-valued logic
...
 And of course, we want a tool (- )
a formal, machine-checked semantics for OO specifications,
an interactive proof environment for OO specifications.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Challenges (for a shallow embedding)
Challenge :
Can we find a injective, type preserving mapping of
an object-oriented language (and datatypes) into HOL
e:T → e T
(including subtyping)?
Challenge :
Can we support verification in a modular way
(i. e., no replay of proof scripts after extending specifications)?
Challenge :
Can we ensure consistency of our representation?
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Representing Class Types
The “extensible records” approach
We assume a common superclass (O).
A tag type guarantees uniquenessby (Otag = classO).
Construct class type as tuple along inheritance hierarchy:
O
A
s:String
B
b:Integer
Advantages:
it allows for extending class types (inheritance),
subclasses are type instances of superclasses
⇒ it allows for modular proofs, i. e.,
a statement ϕ(x (α B)) proven for class B is still valid after extending
class B.
However, it has a major disadvantage:
modular proofs are only supported for one extension per class
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Representing Class Types
The “extensible records” approach
We assume a common superclass (O).
A tag type guarantees uniquenessby (Otag = classO).
Construct class type as tuple along inheritance hierarchy:
B =
O
A
s:String
B
b:Integer
Advantages:
it allows for extending class types (inheritance),
subclasses are type instances of superclasses
⇒ it allows for modular proofs, i. e.,
a statement ϕ(x (α B)) proven for class B is still valid after extending
class B.
However, it has a major disadvantage:
modular proofs are only supported for one extension per class
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Representing Class Types
The “extensible records” approach
We assume a common superclass (O).
A tag type guarantees uniquenessby (Otag = classO).
Construct class type as tuple along inheritance hierarchy:
B = (Otag ×oid)
O
A
s:String
B
b:Integer
Advantages:
it allows for extending class types (inheritance),
subclasses are type instances of superclasses
⇒ it allows for modular proofs, i. e.,
a statement ϕ(x (α B)) proven for class B is still valid after extending
class B.
However, it has a major disadvantage:
modular proofs are only supported for one extension per class
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Representing Class Types
The “extensible records” approach
We assume a common superclass (O).
A tag type guarantees uniquenessby (Otag = classO).
Construct class type as tuple along inheritance hierarchy:
B = (Otag ×oid) × ((Atag ×String) )
O
A
s:String
B
b:Integer
Advantages:
it allows for extending class types (inheritance),
subclasses are type instances of superclasses
⇒ it allows for modular proofs, i. e.,
a statement ϕ(x (α B)) proven for class B is still valid after extending
class B.
However, it has a major disadvantage:
modular proofs are only supported for one extension per class
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Representing Class Types
The “extensible records” approach
We assume a common superclass (O).
A tag type guarantees uniquenessby (Otag = classO).
Construct class type as tuple along inheritance hierarchy:
B = (Otag ×oid) × ((Atag ×String) × ((Btag ×Integer) ))
O
A
s:String
B
b:Integer
Advantages:
it allows for extending class types (inheritance),
subclasses are type instances of superclasses
⇒ it allows for modular proofs, i. e.,
a statement ϕ(x (α B)) proven for class B is still valid after extending
class B.
However, it has a major disadvantage:
modular proofs are only supported for one extension per class
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Representing Class Types
The “extensible records” approach
We assume a common superclass (O).
A tag type guarantees uniquenessby (Otag = classO).
Construct class type as tuple along inheritance hierarchy:
α B = (Otag ×oid) × ((Atag ×String) × ((Btag ×Integer) × α))
O
A
s:String
B
b:Integer
α
Advantages:
it allows for extending class types (inheritance),
subclasses are type instances of superclasses
⇒ it allows for modular proofs, i. e.,
a statement ϕ(x (α B)) proven for class B is still valid after extending
class B.
However, it has a major disadvantage:
modular proofs are only supported for one extension per class
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Idea: A General Universe Type
A universe type representing all classes of a class model
supports modular proofs with arbitrary extensions
provides a formalization of a extensible typed object store
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
An Extensible Object Store
O O
αO
U
(αO) = O × αO
⊥
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
An Extensible Object Store
O O
αO
U
(αO) = O × αO
⊥
A
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
An Extensible Object Store
O O
αO
U
(αO) = O × αO
⊥
A A βO
αA
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
An Extensible Object Store
O O
αO
U
(αO) = O × αO
⊥
A A βO
αA
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
B B βA
αB
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
U
(αB ,βO,βA)
= O × (A × (B × αB
⊥ + βA
)⊥ + βO
)⊥
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
An Extensible Object Store
O O
αO
U
(αO) = O × αO
⊥
A A βO
αA
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
B B βA
αB
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
U
(αB ,βO,βA)
= O × (A × (B × αB
⊥ + βA
)⊥ + βO
)⊥C C βA
αC
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
An Extensible Object Store
O O
αO
U
(αO) = O × αO
⊥
A A βO
αA
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
B B βA
αB
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
U
(αB ,βO,βA)
= O × (A × (B × αB
⊥ + βA
)⊥ + βO
)⊥C C βA
αC
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
U
(αB ,βO,βA)
= O × (A × (B × αB
⊥ + βA
)⊥ + βO
)⊥
U
(αB ,αC ,βO,βA)
= O × (A × (B × αB
⊥ + (C × αC
⊥ + βA
))⊥ + βO
)⊥
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
An Extensible Object Store
O O
αO
U
(αO) = O × αO
⊥
A A βO
αA
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
B B βA
αB
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
U
(αB ,βO,βA)
= O × (A × (B × αB
⊥ + βA
)⊥ + βO
)⊥C C βA
αC
U
(αO) = O × αO
⊥
U
(αA,βO)
= O × (A × αA
⊥ + βO
)⊥
U
(αB ,βO,βA)
= O × (A × (B × αB
⊥ + βA
)⊥ + βO
)⊥
U
(αB ,αC ,βO,βA)
= O × (A × (B × αB
⊥ + (C × αC
⊥ + βA
))⊥ + βO
)⊥
U
(αB,αC ,βO,βA)
≺ U
(αB,βO,βA)
≺ U
(αA,βO)
≺ U
(αO)
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Merging Universes
U
:
A
Ua
:
A
C
Ub
:
A B
D
U
:
A B
C D
Non-conflicting Merges
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Merging Universes
U
:
A
Ua
:
A
C
Ub
:
A B
D
U
:
A B
C D
Non-conflicting Merges
U
:
A
Ua
:
A
C
Ub
:
A
B
U
:
A
BC
Conflicting Merges
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Operations Accessing the Object Store
injections
mkO o = Inl o with type αO
O → U
αO
projections
getO u = u with type U
αO → αO
O
type casts
A[O] = getO ○mkA with type αA
A → (A × αA
⊥ + βO
) O
O[A] = getA ○mkO with type (A × αA
⊥ + βO
) O → αA
A
...
All definitions are generated automatically
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Does This Really Model Object-orientation?
For each UML model, we have to show several properties:
O
A
s:String
B
b:Integer
subclasses are of the superclasses kind:
isTypeB self
isKindA self
“re-casting”:
isTypeB self
self [A][B]
≠ ∧ isTypeB (self [A][B][A]
)
monotonicity of invariants, ...
All rules are derived automatically
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
This is only the beginning ...
Type-safety of “object-type accessors” needs further processing.
Encoding invariants requires (co-)-inductive definitions.
Solution: encoding based on three levels:
 weakly typed data types
 strongly typed data types (and support for operations)
 constrained data modes
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Encoding Attribute Accessors
Assume a class Node with an attribute next:
 Unsafe access (reference, value, or ):
self . next()
≡ (fst○snd○snd○fst) ⌜base self ⌝
 Type-safe access (typed object, value, or ):
self . next()
≡ λ σ.
⎧⎪⎪
⎨
⎪⎪⎩
get
()
Node u if σ(self . next()
) = ⌞u⌟,
otherwise.
 Semantically-safe access (object satisfying invariant, value, or ):
self . next()
≡ λ σ.
⎧⎪⎪
⎨
⎪⎪⎩
self . next()
if σ ⊧ self . next()
∈KNode
otherwise.
where KNode is the (co-) inductively defined characteristic kind set of class
Node.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
An multi-level object-oriented datatype-package
Level
New Datatypes
Datatype Adaption
Object store
(universe)
 Datatypes
(library)
Level
Functional Adaption
Embedding Adaption
Objects with
Operations
 Formulae
Level
Combining
Embeddings
Objects with Invariants, Preconditions
and Postconditions
Extensible
Object Store
Datatypes
with Un-
defindness
Object Store with
Method
Invocation
Three-valued
Logic
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Case Studies (Datatype Package)
Importing object-oriented models:
Invoice eBank Company R&L
classes    
specification (lines)    
generated theorems    
time (in seconds)    
The core library takes about  minutes ( secconds) to built
Extensionality saves about  minutes on each import
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
An extensible Encoding of Object-oriented Data Models in HOL
Challenges (Revisited)
Challenge : Can we find a injective, type preserving mapping of an
object-oriented language (and datatypes) into HOL?
Yes, our encoding is even bijective.
Challenge : Can we support verification in a modular way (i. e., no replay
of proof scripts after extending specifications)?
Yes, a specific form of extensionality can be supported.
Challenge : Can we ensure consistency of our representation?
Yes, by using a conservative embedding (deriving all rules).
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
HOL-OCL
HOL-OCL
- provides:
a formal, machine-checked semantics for OO specifications,
an interactive proof environment for OO specifications.
- is integrated into a toolchain providing:
extended well-formedness checking,
proof-obligation generation,
methodology support for UML/OCL,
a transformation framework (including PO generation),
code generators,
support for SecureUML.
- is publicly available:
http://www.brucker.ch/projects/hol-ocl/.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
HOL-OCL
The HOL-OCL User Interface
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
HOL-OCL
The HOL-OCL High-level Language
The - proof language is an extension of Isabelle’s Isar language:
importing UML/OCL:
import_model "SimpleChair.zargo" "AbstractSimpleChair.ocl"
include_only "AbstractSimpleChair"
check well-formedness and generate proof obligations for refinement:
analyze_consistency [data_refinement] "AbstractSimpleChair"
starting a proof for a generated proof obligation:
po "AbstractSimpleChair.findRole_enabled"
generating code:
generate_code "java"
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
HOL-OCL
The HOL-OCL Architecture
Standard ML (PolyML, sml/NJ)
HOL-OCL
Isabelle/HOL
susml
HOL-OCL User Interface (extended Proof General)
Repository
UML/OCL
PO-Manager
Encoder
Code-Gen.
WF-Checks
Model-Trans.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Outlook and Conclusion
The HOL-OCL Architecture (Next Generation)
PO-ManagerL-EncoderIsabelle/HOL
Scala-Interface SML-Interface
UML/OCL
Modelling
Tool
HOL-OCL
Interface
+
Repository
Generator
Code
WF-Checks
Model-Trans.
UML/OCL
Encoder
HOL-OCL
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Outlook and Conclusion
Conclusion
Technical challenges:
parsing and typing (!) concrete syntax can be slow
debugging simplifier setups is painful
defining new X-Symbol syntax is quite limited (compared to LATEX)
Best practice for communicating with external tools is missing
...
Conclusion
Isabelle is a framework for developing formal tools
(even for tools where Isabelle not seen by the end-user)
The Scala-Layer enables many new features, e.g.,
Integration of new interaction paradigms
Isabelle can be (smoothly) integrated with external tools and libraries
...
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Thank you for your attention!
Any questions or remaks?
Bibliography
Bibliography I
Achim D. Brucker, Jürgen Doser, and Burkhart Wolff.
An MDA framework supporting OCL.
Electronic Communications of the EASST, , .
Achim D. Brucker.
An Interactive Proof Environment for Object-oriented Specifications.
PhD thesis, ETH Zurich, March .
ETH Dissertation No. .
Achim D. Brucker and Burkhart Wolff.
- – A Formal Proof Environment for UML/OCL.
In José Fiadeiro and Paola Inverardi, editors, Fundamental Approaches to
Software Engineering (FASE), number  in Lecture Notes in Computer
Science, pages –. Springer-Verlag, .
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Bibliography
Bibliography II
Achim D. Brucker and Burkhart Wolff.
An extensible encoding of object-oriented data models in HOL.
Journal of Automated Reasoning, :–, .
Achim D. Brucker and Burkhart Wolff.
Extensible universes for object-oriented data models.
In Jan Vitek, editor, ECOOP  – Object-Oriented Programming, number 
in Lecture Notes in Computer Science, pages –. Springer-Verlag, .
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Part I
Appendix
The HOL-OCL Architecture (Details)
The Encoder
The model encoder is the main interface between susml and the Isabelle
based part of -. The encoder
declarers HOL types for the classifiers of the model,
encodes
type-casts,
attribute accessors, and
dynamic type and kind tests implicitly declared in the imported data
model,
encodes the OCL specification, i. e.,
class invariants
operation specifications
and combines it with the core data model, and
proves (automatically) methodology and analysis independent properties
of the model.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
The HOL-OCL Architecture (Details)
The Library
The - library
formalizes the built-in operations of UML/OCL,
comprises over  definitions and theorems,
build the basis for new, OCL specific, proof procedures,
provides proof support for (formal) development methodologies.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
The HOL-OCL Architecture (Details)
Tactics (Proof Procedures)
OCL, as logic, is quite different from HOL (e. g., three-valuedness)
Major Isabelle proof procedures, like simp and auto,
cannot handle OCL efficiently.
- provides several UML/OCL specific proof procedures:
embedding specific tactics (e. g., unfolding a certain level)
a OCL specific context-rewriter
a OCL specific tableaux-prover
...
These language specific variants increase the degree of proof for OCL.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
The HOL-OCL Architecture (Details) susml
susml – Overview
susml is a UML/OCL (and SecureUML) model repository providing
a database for syntactic elements of UML core, namely class models and
state machines as well as OCL expressions.
support for SecureUML.
import of UML/OCL models in different formats:
XMI and ArgoUML (class models and state machines)
OCL (plain text files)
USE (plain text files describing class models with OCL annotations)
a template-based code generator (export) mechanism.
an integrated framework for model transformations.
a framework for checking well-formedness conditions.
a framework for generating proof obligations.
an interface to - (encoder, po manager).
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
The HOL-OCL Architecture (Details) susml
susml – Code Generators
susml provides a template-based code generator for
Java, supporting
class models and state machines
OCL runtime enforcement
SecureUML
C#, supporting
class models and state machines
SecureUML
USE
...
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
The HOL-OCL Architecture (Details) susml
susml – Model Transformations
susml provides a framework for model transformation that
supports the generation of proof obligations
can be programmed in SML.
Currently, the following transformations are provided:
a family of semantic preserving transformations for converting
associations ( e. g., n-ary into binary ones)
a transformation from SecureUML/ComponentUML to UML/OCL.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
The HOL-OCL Architecture (Details) susml
susml – Well-formedness Checks
susml provides an framework for extended well-formedness checking:
Checks if a given model satisfies certain syntactic constraints,
Allows for defining dependencies between different checks
Examples for well-formedness checks are:
restricting the inheritance depth
restringing the use of private class members
checking class visibilities with respect to member visibilities
...
Can be easily extended (at runtime).
Is integrated with the generation of proof obligations.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
The HOL-OCL Architecture (Details) susml
susml – Proof Obligation Generator
susml provides an framework for proof obligation generation:
Generates proof obligation in OCL plus minimal meta-language.
Only minimal meta-language necessary:
Validity: ⊧ _, _ ⊧ _
Meta level quantifiers: ∃_. _, ∃_. _
Meta level logical connectives: _ ∨ _, _ ∧ _, ¬_
Examples for proof obligations are:
(semantical) model consistency
Liskov’s substitution principle
refinement conditions
...
Can be easily extended (at runtime).
Builds, together with well-formedness checking, the basis for
tool-supported methodologies.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Outline
 The HOL-OCL Architecture (Details)
 Mechanized Support for Model Analysis Methods
 Applications of HOL-OCL
Mechanized Support for Model Analysis Methods
Motivation
Observation:
UML/OCL is a generic modeling language:
usually, only a sub-set of UML is used and
there is no standard UML-based development process.
Successful usage of UML usually comprises
a well-defined development process and
tools that integrate into the development process.
Conclusion:
Formal methods for UML-based development should
support the local UML development methodologies and
integrate smoothly into the local toolchain.
A toolchain for formal methods should provide
tool-support for methodologies.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Well-formedness Checking: Enforcing Syntactical Requirements
Well-formedness of Models
Well-formedness Checking
Enforce syntactical restriction on (valid) UML/OCL models.
Ensure a minimal quality of models.
Can be easily supported by automated tools.
Example
There should be at maximum five inheritance levels.
The Specification of public operations may only refer to public class
members.
...
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Proof Obligations: Enforcing Syntactical Requirements
Proof Obligations for Models
Proof Obligation Generation
Enforce semantical restriction on (valid) UML/OCL models.
Build the basis for formal development methodologies.
Require formal tools (theorem prover, model checker, etc).
Example
Liskov’s substitution principle.
Model consistency
Refinement.
...
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Proof Obligations: Enforcing Syntactical Requirements
Proof Obligations: Liskov’s Substitution Principle
Liskov substitution principle
Let q(x) be a property provable about objects x of type T. Then q(y) should
be true for objects y of type S where S is a subtype of T.
For constraint languages, like OCL, this boils down to:
pre-conditions of overridden methods must be weaker.
post-conditions of overridden methods must be stronger.
Which can formally expressed as implication:
Weakening the pre-condition:
oppre → opsub
pre
Strengthening the post-condition:
opsub
post → oppost
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Proof Obligations: Enforcing Syntactical Requirements
Proof Obligations: Liskov’s Substitution Principle
Example
Rectangle
width:Integer
height:Integer
setHeight(h:Integer):OclVoid
setWidth(w:Integer):OclVoid
context Rectangle::setWidth(w:Integer):OclVoid
pre: w >= 0
post: self.width = w
context Square::setWidth(w:Integer):OclVoid
pre: w >= 0
post: self.width = w and self.height=w
Square
setHeight(h:Integer):OclVoid
setWidth(w:Integer):OclVoid
Weakening the pre-condition:
(w >= 0) → (w >= 0)
Strengthening the post-condition:
(self.width = w and self.height = w) → (self.width = w)
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL
Methodology
A tool-supported methodology should
integrate into existing toolchains and processes,
provide a unified approach, integrating ,
syntactic requirements (well-formedness checks),
generation of proof obligations,
means for verification (proving) or validation, and of course
all phases should be supported by tools.
Example
A package-based object-oriented refinement methodology.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL
Refinement – Motivation
Support top-down development from an abstract model to
a more concrete one.
We start with an abstract transition system
sysabs = (σabs, initabs, opabs)
We refine each abstract operation opabs
to a more concrete one: opconc.
Resulting in a more concrete transition system
sysconc = (σconc, initconc, opconc)
Such refinements can be chained:
sys ↝ sys ↝ ⋯ ↝ sysn
E.g., from an abstract model to one that supports code generation.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL
Refinement: Well-formedness
If package B refines a package A, then
one should be able to
substitute every usage of package A with package B.
 For each public class c of A, B must provide a corresponding public class
c′
.
 Types of public attributes and public operations (arguments and return
type) must be either basic datatypes or public classes.
 For each public class c of A, we require that the corresponding class c′
of
B provides at least
 public attributes with the same name and
 public operations with the same name.
 The types of corresponding and attributes and operations are compatible.
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL
Refinement: Proof Obligations – Consistency
A transition system is consistent if:
The set of initial states is non-empty, i. e.,
∃σ. σ ∈ init
The state invariant is satisfiable, i. e.,
the conjunction of all invariants is invariant-consistent:
∃σ. σ ⊧ inv ∧ ∃σ. σ ⊧ inv ∧ ⋯ ∧ ∃σ. σ ⊧ invn
All operations op are implementable, i. e.,
for each satisfying pre-state there exists a satisfying post-state:
∀ σpre ∈ Σ, self , i, . . . , in. σpre ⊧ preop →
∃ σpost ∈ Σ, result. (σpre, σpost) ⊧ postop
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL
Refinement: Proof Obligations – Implements
Given an abstraction relation R P(σabs × σconc)
relating a concrete state S and an abstract states T.
A forward refinement S ⊑R
FS T ≡ po(S, R, T) ∧ po(S, R, T)
requires two proof obligations po and po.
Preserve Implementability (po):
σa
σc
σa
R
opa
=⇒
σa
σc σc
σa
R
opa
opc
po(S, R, T) ≡ ∀σa ∈ pre(S), σc ∈ V.
(σa, σc) ∈ R → σc ∈ pre(T)
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL
Refinement: Proof Obligations – Refines
Given an abstraction relation R P(σabs × σconc)
relating a concrete state S and an abstract states T.
A forward refinement S ⊑R
FS T ≡ po(S, R, T) ∧ po(S, R, T)
requires two proof obligations po and po.
Refinement (po):
σa
σc σc
R
opc
=⇒
σa
σc σc
σa
R R
opa
opc
po(S, R, T) ≡ ∀σa ∈ pre(S), σc ∈ V. σc′ . (σa, σc) ∈ R
∧ (σc, σ′
c) ⊧M T → ∃σ′
a ∈ V. (σa, σ′
a) ⊧M S ∧ (σa′ , σc′ ) ∈ R
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL
Refinement Example: Abstract Model
Role
Hearer
Speaker
CoChair
Chair
Person
name:String
Session
name:String
findRole(p:Person):Role
Participant
AbstractSimpleChair
Person
name:String
Role
Participant
Hearer CoChair
ChairSpeaker
Session
name:String
findRole(p:Person):Role
person
0..*
role
0..*
0..*
session0..1
context Session::findRole(person:Person):Role
pre: self.participates.person->includes(person)
post: result=self.participants->one(p:Participant |
p.person ≐ person ).role
and self.participants ≐ self.participants@pre
and self.name ≐ self.name@pre
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL
Refinement Example: Concrete Model
Role
Hearer
Speaker
CoCair
Chair
Person
name:String
Session
name:String
findRole(p:Person):Role
ConcreteSimpleChair
Person
name:String
Role
Hearer CoCair
ChairSpeaker
Session
name:String
findRole(p:Person):Role
participants
{ordered}
0..*
sessions0..*
sessions
0..*
{ordered}
roles
0..*
context Session::findRole(person:Person):Role
pre: self.participants->includes(peson)
post: result ≐ roles.at(participants.indexOf(p))
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL
Refinement Example: Theory Sketch
theory SimpleChairRefinement imports OCL_methodology begin
import_model "SimpleChair.zargo" "SimpleChair.ocl"
refine "AbstractSimpleChair" "ConcreteSimpleChair"
po Refinement.findRole
∀σ ∈ pre S, σ′
∈ pre T. RSession σ σ′
self self ′
∀σ ∈ pre S, σ ∈ pre T. RPerson σ σ′
p p′
∀σ ∈ pre S, σ ∈ pre T. RRole σ σ′
result result′
AbstractSimpleChair. Session. findRole self p result
⊑R
FS ConcreteSimpleChair. Session. findRole self ′
p′
result′
apply( ... )
discharged
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Outline
 The HOL-OCL Architecture (Details)
 Mechanized Support for Model Analysis Methods
 Applications of HOL-OCL
Applications of HOL-OCL Consistency Analysis
Simple Consistency Analysis I
DriversLicense
licenseClass:String
Person
age:Integer
context Person
inv AllPersonsWithDriversLicenseAdult:
self.driversLicense->notEmpty()
implies self.age > 17
context DriversLicense
inv AllLicenseOwnersAdult:
person.age > 17
person
driversLicense 0..1
Figure: A simple model of vehicles and licenses
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Applications of HOL-OCL Consistency Analysis
Simple Consistency Analysis II
lemma
assumes "τ ⊧ (Vehicles.Person.driversLicense(
Vehicles.DriversLicense.person self)).IsDefined()"
and "τ ⊧ (Vehicles.Person.age
(Vehicles.DriversLicense.person self)).IsDefined() "
shows "τ ⊧ Person.inv.AllPersonsWithDriversLicenseAdult (
Vehicles.DriversLicense.person self)
→ τ ⊧ DriversLicense.inv.AllLicenseOwnersAdult self"
apply(auto elim!: OclImpliesE)
apply(cut_tac prems)
apply(auto simp: inv.AllPersonsWithDriversLicenseAdult_def
inv.AllLicenseOwnersAdult_def
elim!: OclImpliesE SingletonSetDefined)
done
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Applications of HOL-OCL Liskov’s Substitution Principle
Liskov’s Substitution Principle I
context A::m(p:Integer):Integer
pre: p > 0
post: result > 0
context A::m(p:Integer):Integer
pre: p >= 0
post: result = p*p + 5
-- The following constraints overrides the specification for
-- m(p:Integer):Integer that was originally defined in
-- class A, i.e., C is a subclass of A.
context C::m(p:Integer):Integer
pre: p >= 0
post: result > 1 and result = p*p+5
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
Applications of HOL-OCL Liskov’s Substitution Principle
Liskov’s Substitution Principle II
import_model "overriding.zargo" "overriding.ocl"
generate_po_liskov "pre"
generate_po_liskov "post"
po "overriding.OCL_liskov−po_lsk_pre−"
apply(simp add: A.m_Integer_Integer.pre_def
A.m_Integer_Integer.pre.pre__def
C.m_Integer_Integer.pre_def
C.m_Integer_Integer.pre.pre__def
A.m_Integer_Integer.pre.pre__def)
apply(ocl_auto)
discharged
Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  

More Related Content

What's hot

Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented TechnologiesUmesh Nikam
 
VHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLVHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLRevathi Subramaniam
 
A Taxonomy for Program Metamodels in Program Reverse Engineering
A Taxonomy for Program Metamodels in Program Reverse EngineeringA Taxonomy for Program Metamodels in Program Reverse Engineering
A Taxonomy for Program Metamodels in Program Reverse EngineeringHironori Washizaki
 
C++ OOP Implementation
C++ OOP ImplementationC++ OOP Implementation
C++ OOP ImplementationFridz Felisco
 
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuPrologLabelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuPrologRoberta Calegari
 
Dependency Breaking Techniques
Dependency Breaking TechniquesDependency Breaking Techniques
Dependency Breaking Techniqueshyun soomyung
 
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13Multi-dimensional exploration of API usage - ICPC13 - 21-05-13
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13Coen De Roover
 
HDR Defence - Software Abstractions for Parallel Architectures
HDR Defence - Software Abstractions for Parallel ArchitecturesHDR Defence - Software Abstractions for Parallel Architectures
HDR Defence - Software Abstractions for Parallel ArchitecturesJoel Falcou
 

What's hot (16)

Object Oriented Technologies
Object Oriented TechnologiesObject Oriented Technologies
Object Oriented Technologies
 
Lecture1
Lecture1Lecture1
Lecture1
 
VHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLVHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDL
 
A Taxonomy for Program Metamodels in Program Reverse Engineering
A Taxonomy for Program Metamodels in Program Reverse EngineeringA Taxonomy for Program Metamodels in Program Reverse Engineering
A Taxonomy for Program Metamodels in Program Reverse Engineering
 
C++ OOP Implementation
C++ OOP ImplementationC++ OOP Implementation
C++ OOP Implementation
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuPrologLabelled Variables in Logic Programming: A First Prototipe in tuProlog
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
 
java vs C#
java vs C#java vs C#
java vs C#
 
VHDL
VHDLVHDL
VHDL
 
Dependency Breaking Techniques
Dependency Breaking TechniquesDependency Breaking Techniques
Dependency Breaking Techniques
 
Lec4
Lec4Lec4
Lec4
 
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13Multi-dimensional exploration of API usage - ICPC13 - 21-05-13
Multi-dimensional exploration of API usage - ICPC13 - 21-05-13
 
Topic 1 PBO
Topic 1 PBOTopic 1 PBO
Topic 1 PBO
 
HDR Defence - Software Abstractions for Parallel Architectures
HDR Defence - Software Abstractions for Parallel ArchitecturesHDR Defence - Software Abstractions for Parallel Architectures
HDR Defence - Software Abstractions for Parallel Architectures
 
ICPC08b.ppt
ICPC08b.pptICPC08b.ppt
ICPC08b.ppt
 
STAMP
STAMPSTAMP
STAMP
 

Viewers also liked

From Declarative to Imperative Operation Specifications (ER 2007)
From Declarative to Imperative Operation Specifications (ER 2007)From Declarative to Imperative Operation Specifications (ER 2007)
From Declarative to Imperative Operation Specifications (ER 2007)Jordi Cabot
 
Towards Domain Refinement for UML/OCL Bounded Verification
Towards Domain Refinement for UML/OCL Bounded VerificationTowards Domain Refinement for UML/OCL Bounded Verification
Towards Domain Refinement for UML/OCL Bounded Verificationrclariso
 
From UML/OCL to natural language (using SBVR as pivot)
From UML/OCL to natural language (using SBVR as pivot)From UML/OCL to natural language (using SBVR as pivot)
From UML/OCL to natural language (using SBVR as pivot)Jordi Cabot
 
On the verification of UML/OCL class diagrams using constraint programming
On the verification of UML/OCL class diagrams using constraint programmingOn the verification of UML/OCL class diagrams using constraint programming
On the verification of UML/OCL class diagrams using constraint programmingUOC Universitat Oberta de Catalunya
 
Extracting UML/OCL Integrity Constraints and Derived Types from Relational Da...
Extracting UML/OCL Integrity Constraints and Derived Types from Relational Da...Extracting UML/OCL Integrity Constraints and Derived Types from Relational Da...
Extracting UML/OCL Integrity Constraints and Derived Types from Relational Da...Valerio Cosentino
 
Master Thesis presentation
Master Thesis presentationMaster Thesis presentation
Master Thesis presentationBogdan Vasilescu
 
My Thesis Defense Presentation
My Thesis Defense PresentationMy Thesis Defense Presentation
My Thesis Defense PresentationDavid Onoue
 
Thesis Power Point Presentation
Thesis Power Point PresentationThesis Power Point Presentation
Thesis Power Point Presentationriddhikapandya1985
 

Viewers also liked (8)

From Declarative to Imperative Operation Specifications (ER 2007)
From Declarative to Imperative Operation Specifications (ER 2007)From Declarative to Imperative Operation Specifications (ER 2007)
From Declarative to Imperative Operation Specifications (ER 2007)
 
Towards Domain Refinement for UML/OCL Bounded Verification
Towards Domain Refinement for UML/OCL Bounded VerificationTowards Domain Refinement for UML/OCL Bounded Verification
Towards Domain Refinement for UML/OCL Bounded Verification
 
From UML/OCL to natural language (using SBVR as pivot)
From UML/OCL to natural language (using SBVR as pivot)From UML/OCL to natural language (using SBVR as pivot)
From UML/OCL to natural language (using SBVR as pivot)
 
On the verification of UML/OCL class diagrams using constraint programming
On the verification of UML/OCL class diagrams using constraint programmingOn the verification of UML/OCL class diagrams using constraint programming
On the verification of UML/OCL class diagrams using constraint programming
 
Extracting UML/OCL Integrity Constraints and Derived Types from Relational Da...
Extracting UML/OCL Integrity Constraints and Derived Types from Relational Da...Extracting UML/OCL Integrity Constraints and Derived Types from Relational Da...
Extracting UML/OCL Integrity Constraints and Derived Types from Relational Da...
 
Master Thesis presentation
Master Thesis presentationMaster Thesis presentation
Master Thesis presentation
 
My Thesis Defense Presentation
My Thesis Defense PresentationMy Thesis Defense Presentation
My Thesis Defense Presentation
 
Thesis Power Point Presentation
Thesis Power Point PresentationThesis Power Point Presentation
Thesis Power Point Presentation
 

Similar to Encoding Object-oriented Datatypes in HOL

Software variability management - 2019
Software variability management - 2019Software variability management - 2019
Software variability management - 2019XavierDevroey
 
Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)wesley chun
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceAntonio García-Domínguez
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languagesppd1961
 
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...DataWorks Summit
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iTaymoor Nazmy
 
Runtime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreEsha Yadav
 
Basics of Verilog.ppt
Basics of Verilog.pptBasics of Verilog.ppt
Basics of Verilog.pptCoEBMSITM
 
Verilog Hardware Description Language.ppt
Verilog Hardware Description Language.pptVerilog Hardware Description Language.ppt
Verilog Hardware Description Language.pptMrRRThirrunavukkaras
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital.AI
 
The secret life of rules in Software Engineering
The secret life of rules in Software EngineeringThe secret life of rules in Software Engineering
The secret life of rules in Software EngineeringJordi Cabot
 
How to Create Your Own Product-Modeling Environment
How to Create Your Own Product-Modeling EnvironmentHow to Create Your Own Product-Modeling Environment
How to Create Your Own Product-Modeling EnvironmentTim Geisler
 
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Fwdays
 

Similar to Encoding Object-oriented Datatypes in HOL (20)

Software variability management - 2019
Software variability management - 2019Software variability management - 2019
Software variability management - 2019
 
Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)Easy path to machine learning (2023-2024)
Easy path to machine learning (2023-2024)
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
 
Sw Software Design
Sw Software DesignSw Software Design
Sw Software Design
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languages
 
Object Oriented Programming using C++ - Part 1
Object Oriented Programming using C++ - Part 1Object Oriented Programming using C++ - Part 1
Object Oriented Programming using C++ - Part 1
 
Verification Challenges and Methodologies
Verification Challenges and MethodologiesVerification Challenges and Methodologies
Verification Challenges and Methodologies
 
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-i
 
Runtime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya Rathore
 
OODPunit1.pdf
OODPunit1.pdfOODPunit1.pdf
OODPunit1.pdf
 
Basics of Verilog.ppt
Basics of Verilog.pptBasics of Verilog.ppt
Basics of Verilog.ppt
 
Verilog Hardware Description Language.ppt
Verilog Hardware Description Language.pptVerilog Hardware Description Language.ppt
Verilog Hardware Description Language.ppt
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
 
The secret life of rules in Software Engineering
The secret life of rules in Software EngineeringThe secret life of rules in Software Engineering
The secret life of rules in Software Engineering
 
How to Create Your Own Product-Modeling Environment
How to Create Your Own Product-Modeling EnvironmentHow to Create Your Own Product-Modeling Environment
How to Create Your Own Product-Modeling Environment
 
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
 

More from Achim D. Brucker

Usable Security for Developers: A Nightmare
Usable Security for Developers: A NightmareUsable Security for Developers: A Nightmare
Usable Security for Developers: A NightmareAchim D. Brucker
 
Formalizing (Web) Standards: An Application of Test and Proof
Formalizing (Web) Standards: An Application of Test and ProofFormalizing (Web) Standards: An Application of Test and Proof
Formalizing (Web) Standards: An Application of Test and ProofAchim D. Brucker
 
Your (not so) smart TV is currently busy with taking down the Internet
Your (not so) smart TV is currently busy  with taking down the InternetYour (not so) smart TV is currently busy  with taking down the Internet
Your (not so) smart TV is currently busy with taking down the InternetAchim D. Brucker
 
Combining the Security Risks of Native and Web Development: Hybrid Apps
Combining the Security Risks of Native and Web Development: Hybrid AppsCombining the Security Risks of Native and Web Development: Hybrid Apps
Combining the Security Risks of Native and Web Development: Hybrid AppsAchim D. Brucker
 
The Evil Friend in Your Browser
The Evil Friend in Your BrowserThe Evil Friend in Your Browser
The Evil Friend in Your BrowserAchim D. Brucker
 
How to Enable Developers to Deliver Secure Code
How to Enable Developers to Deliver Secure CodeHow to Enable Developers to Deliver Secure Code
How to Enable Developers to Deliver Secure CodeAchim D. Brucker
 
Developing Secure Software: Experiences From an International Software Vendor
Developing Secure Software: Experiences From an International Software VendorDeveloping Secure Software: Experiences From an International Software Vendor
Developing Secure Software: Experiences From an International Software VendorAchim D. Brucker
 
Using Third Party Components for Building an Application Might be More Danger...
Using Third Party Components for Building an Application Might be More Danger...Using Third Party Components for Building an Application Might be More Danger...
Using Third Party Components for Building an Application Might be More Danger...Achim D. Brucker
 
On the Static Analysis of Hybrid Mobile Apps: A Report on the State of Apache...
On the Static Analysis of Hybrid Mobile Apps: A Report on the State of Apache...On the Static Analysis of Hybrid Mobile Apps: A Report on the State of Apache...
On the Static Analysis of Hybrid Mobile Apps: A Report on the State of Apache...Achim D. Brucker
 
Isabelle: Not Only a Proof Assistant
Isabelle: Not Only a Proof AssistantIsabelle: Not Only a Proof Assistant
Isabelle: Not Only a Proof AssistantAchim D. Brucker
 
Agile Secure Software Development in a Large Software Development Organisatio...
Agile Secure Software Development in a Large Software Development Organisatio...Agile Secure Software Development in a Large Software Development Organisatio...
Agile Secure Software Development in a Large Software Development Organisatio...Achim D. Brucker
 
Bringing Security Testing to Development: How to Enable Developers to Act as ...
Bringing Security Testing to Development: How to Enable Developers to Act as ...Bringing Security Testing to Development: How to Enable Developers to Act as ...
Bringing Security Testing to Development: How to Enable Developers to Act as ...Achim D. Brucker
 
Security Testing: Myths, Challenges, and Opportunities - Experiences in Integ...
Security Testing: Myths, Challenges, and Opportunities - Experiences in Integ...Security Testing: Myths, Challenges, and Opportunities - Experiences in Integ...
Security Testing: Myths, Challenges, and Opportunities - Experiences in Integ...Achim D. Brucker
 
Industrial Challenges of Secure Software Development
Industrial Challenges of Secure Software DevelopmentIndustrial Challenges of Secure Software Development
Industrial Challenges of Secure Software DevelopmentAchim D. Brucker
 
SAST for JavaScript: A Brief Overview of Commercial Tools
SAST for JavaScript: A Brief Overview of Commercial ToolsSAST for JavaScript: A Brief Overview of Commercial Tools
SAST for JavaScript: A Brief Overview of Commercial ToolsAchim D. Brucker
 
A Collection of Real World (JavaScript) Security Problems: Examples from 2 1/...
A Collection of Real World (JavaScript) Security Problems: Examples from 2 1/...A Collection of Real World (JavaScript) Security Problems: Examples from 2 1/...
A Collection of Real World (JavaScript) Security Problems: Examples from 2 1/...Achim D. Brucker
 
Deploying Static Application Security Testing on a Large Scale
Deploying Static Application Security Testing on a Large ScaleDeploying Static Application Security Testing on a Large Scale
Deploying Static Application Security Testing on a Large ScaleAchim D. Brucker
 
Model-based Conformance Testing of Security Properties
Model-based Conformance Testing of Security PropertiesModel-based Conformance Testing of Security Properties
Model-based Conformance Testing of Security PropertiesAchim D. Brucker
 
Service Compositions: Curse or Blessing for Security?
Service Compositions: Curse or Blessing for Security?Service Compositions: Curse or Blessing for Security?
Service Compositions: Curse or Blessing for Security?Achim D. Brucker
 
A Framework for Secure Service Composition
A Framework for Secure Service CompositionA Framework for Secure Service Composition
A Framework for Secure Service CompositionAchim D. Brucker
 

More from Achim D. Brucker (20)

Usable Security for Developers: A Nightmare
Usable Security for Developers: A NightmareUsable Security for Developers: A Nightmare
Usable Security for Developers: A Nightmare
 
Formalizing (Web) Standards: An Application of Test and Proof
Formalizing (Web) Standards: An Application of Test and ProofFormalizing (Web) Standards: An Application of Test and Proof
Formalizing (Web) Standards: An Application of Test and Proof
 
Your (not so) smart TV is currently busy with taking down the Internet
Your (not so) smart TV is currently busy  with taking down the InternetYour (not so) smart TV is currently busy  with taking down the Internet
Your (not so) smart TV is currently busy with taking down the Internet
 
Combining the Security Risks of Native and Web Development: Hybrid Apps
Combining the Security Risks of Native and Web Development: Hybrid AppsCombining the Security Risks of Native and Web Development: Hybrid Apps
Combining the Security Risks of Native and Web Development: Hybrid Apps
 
The Evil Friend in Your Browser
The Evil Friend in Your BrowserThe Evil Friend in Your Browser
The Evil Friend in Your Browser
 
How to Enable Developers to Deliver Secure Code
How to Enable Developers to Deliver Secure CodeHow to Enable Developers to Deliver Secure Code
How to Enable Developers to Deliver Secure Code
 
Developing Secure Software: Experiences From an International Software Vendor
Developing Secure Software: Experiences From an International Software VendorDeveloping Secure Software: Experiences From an International Software Vendor
Developing Secure Software: Experiences From an International Software Vendor
 
Using Third Party Components for Building an Application Might be More Danger...
Using Third Party Components for Building an Application Might be More Danger...Using Third Party Components for Building an Application Might be More Danger...
Using Third Party Components for Building an Application Might be More Danger...
 
On the Static Analysis of Hybrid Mobile Apps: A Report on the State of Apache...
On the Static Analysis of Hybrid Mobile Apps: A Report on the State of Apache...On the Static Analysis of Hybrid Mobile Apps: A Report on the State of Apache...
On the Static Analysis of Hybrid Mobile Apps: A Report on the State of Apache...
 
Isabelle: Not Only a Proof Assistant
Isabelle: Not Only a Proof AssistantIsabelle: Not Only a Proof Assistant
Isabelle: Not Only a Proof Assistant
 
Agile Secure Software Development in a Large Software Development Organisatio...
Agile Secure Software Development in a Large Software Development Organisatio...Agile Secure Software Development in a Large Software Development Organisatio...
Agile Secure Software Development in a Large Software Development Organisatio...
 
Bringing Security Testing to Development: How to Enable Developers to Act as ...
Bringing Security Testing to Development: How to Enable Developers to Act as ...Bringing Security Testing to Development: How to Enable Developers to Act as ...
Bringing Security Testing to Development: How to Enable Developers to Act as ...
 
Security Testing: Myths, Challenges, and Opportunities - Experiences in Integ...
Security Testing: Myths, Challenges, and Opportunities - Experiences in Integ...Security Testing: Myths, Challenges, and Opportunities - Experiences in Integ...
Security Testing: Myths, Challenges, and Opportunities - Experiences in Integ...
 
Industrial Challenges of Secure Software Development
Industrial Challenges of Secure Software DevelopmentIndustrial Challenges of Secure Software Development
Industrial Challenges of Secure Software Development
 
SAST for JavaScript: A Brief Overview of Commercial Tools
SAST for JavaScript: A Brief Overview of Commercial ToolsSAST for JavaScript: A Brief Overview of Commercial Tools
SAST for JavaScript: A Brief Overview of Commercial Tools
 
A Collection of Real World (JavaScript) Security Problems: Examples from 2 1/...
A Collection of Real World (JavaScript) Security Problems: Examples from 2 1/...A Collection of Real World (JavaScript) Security Problems: Examples from 2 1/...
A Collection of Real World (JavaScript) Security Problems: Examples from 2 1/...
 
Deploying Static Application Security Testing on a Large Scale
Deploying Static Application Security Testing on a Large ScaleDeploying Static Application Security Testing on a Large Scale
Deploying Static Application Security Testing on a Large Scale
 
Model-based Conformance Testing of Security Properties
Model-based Conformance Testing of Security PropertiesModel-based Conformance Testing of Security Properties
Model-based Conformance Testing of Security Properties
 
Service Compositions: Curse or Blessing for Security?
Service Compositions: Curse or Blessing for Security?Service Compositions: Curse or Blessing for Security?
Service Compositions: Curse or Blessing for Security?
 
A Framework for Secure Service Composition
A Framework for Secure Service CompositionA Framework for Secure Service Composition
A Framework for Secure Service Composition
 

Recently uploaded

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Encoding Object-oriented Datatypes in HOL

  • 1. Encoding Object-oriented Datatypes in HOL: Extensible Records Revisited The HOL-OCL Expierence Achim D. Brucker achim@brucker.ch http://www.brucker.ch/ Isabelle Developers Workshop (IDW ) Cambridge, UK, th June 
  • 2. Outline  Introduction  An extensible Encoding of Object-oriented Data Models in HOL  HOL-OCL  Outlook and Conclusion
  • 3. Introduction Tool Supported Formal Methods Our Vision: Tool Supported Formal Methods for (Model-driven) Software Development 1..∗ Role Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Model TransformationDesign Phase Phase Verification and Code−generation Phase Deployment Phase Testing and UML/OCL (XMI) or SecureUML/OCL Code Generator Repository Model (su4sml) Model−Analysis and Verification (HOL−OCL) Transformation Model HOL−TestGen ArgoUML AC Config C# +OCL Test Harness manual Code Proof Obligations Test Data Program Generation Validation Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 4. Introduction Tool Supported Formal Methods Our Vision: Tool Supported Formal Methods for (Model-driven) Software Development 1..∗ Role Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Model TransformationDesign Phase Phase Verification and Code−generation Phase Deployment Phase Testing and UML/OCL (XMI) or SecureUML/OCL Code Generator Repository Model (su4sml) Model−Analysis and Verification (HOL−OCL) Transformation Model HOL−TestGen ArgoUML AC Config C# +OCL Test Harness manual Code Proof Obligations Test Data Program Generation Validation Generic SecureUML ArgoUML−plugin Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 5. Introduction Tool Supported Formal Methods Our Vision: Tool Supported Formal Methods for (Model-driven) Software Development 1..∗ Role Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Model TransformationDesign Phase Phase Verification and Code−generation Phase Deployment Phase Testing and UML/OCL (XMI) or SecureUML/OCL Code Generator Repository Model (su4sml) Model−Analysis and Verification (HOL−OCL) Transformation Model HOL−TestGen ArgoUML AC Config C# +OCL Test Harness manual Code Proof Obligations Test Data Program Generation Validation Code Generator SecureUML, UML, OCL Java, C#, Junit, XACML, USE, ... Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 6. Introduction Tool Supported Formal Methods Our Vision: Tool Supported Formal Methods for (Model-driven) Software Development 1..∗ Role Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Model TransformationDesign Phase Phase Verification and Code−generation Phase Deployment Phase Testing and UML/OCL (XMI) or SecureUML/OCL Code Generator Repository Model (su4sml) Model−Analysis and Verification (HOL−OCL) Transformation Model HOL−TestGen ArgoUML AC Config C# +OCL Test Harness manual Code Proof Obligations Test Data Program Generation Validation Transformations: SecureUML −> UML/OCL UML/OCL −> UML/OCL Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 7. Introduction Tool Supported Formal Methods Our Vision: Tool Supported Formal Methods for (Model-driven) Software Development 1..∗ Role Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Model TransformationDesign Phase Phase Verification and Code−generation Phase Deployment Phase Testing and UML/OCL (XMI) or SecureUML/OCL Code Generator Repository Model (su4sml) Model−Analysis and Verification (HOL−OCL) Transformation Model HOL−TestGen ArgoUML AC Config C# +OCL Test Harness manual Code Proof Obligations Test Data Program Generation Validation Methodologies: Well−formedness checking Proof−obligation generation Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 8. Introduction Tool Supported Formal Methods Our Vision: Tool Supported Formal Methods for (Model-driven) Software Development 1..∗ Role Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Model TransformationDesign Phase Phase Verification and Code−generation Phase Deployment Phase Testing and UML/OCL (XMI) or SecureUML/OCL Code Generator Repository Model (su4sml) Model−Analysis and Verification (HOL−OCL) Transformation Model HOL−TestGen ArgoUML AC Config C# +OCL Test Harness manual Code Proof Obligations Test Data Program Generation Validation HOL−OCL formal analysis formal verification Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 9. Introduction Tool Supported Formal Methods Our Vision: Tool Supported Formal Methods for (Model-driven) Software Development 1..∗ Role Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Model TransformationDesign Phase Phase Verification and Code−generation Phase Deployment Phase Testing and UML/OCL (XMI) or SecureUML/OCL Code Generator Repository Model (su4sml) Model−Analysis and Verification (HOL−OCL) Transformation Model HOL−TestGen ArgoUML AC Config C# +OCL Test Harness manual Code Proof Obligations Test Data Program Generation Validation HOL−TestGen model−based unit test sequence testing Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 10. Introduction Tool Supported Formal Methods Our Vision: Tool Supported Formal Methods for (Model-driven) Software Development 1..∗ Role Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Class + Public Method # Protected Method attribute: Type − Private Method Model TransformationDesign Phase Phase Verification and Code−generation Phase Deployment Phase Testing and UML/OCL (XMI) or SecureUML/OCL Code Generator Repository Model (su4sml) Model−Analysis and Verification (HOL−OCL) Transformation Model HOL−TestGen ArgoUML AC Config C# +OCL Test Harness manual Code Proof Obligations Test Data Program Generation Validation Foundations of of an interactive theorem prover for object−oriented models. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 11. Introduction Tool Supported Formal Methods UML/OCL in a Nutshell UML Visual modeling language Object-oriented development Industrial tool support OMG standard Many diagram types, e. g., activity diagrams class diagrams ... OCL Textual extension of the UML Allows for annotating UML diagrams In the context of class–diagrams: invariants preconditions postconditions Account balance:Integer id:Integer getId():Integer getBalance():Integer deposit(a:Integer):Boolean withdraw(a:Integer):Boolean accounts 1..* context Account inv: 0 <= id context Account::deposit(a:Integer):Boolean pre: 0 < a post: balance = balance@pre+a and id = id@pre context Account inv: 0 <= id context Account::deposit(a:Integer):Boolean pre: 0 < a post: balance = balance@pre+a and id = id@pre Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 12. Introduction Tool Supported Formal Methods Developing Formals Tools for UML/OCL? Turning UML/OCL into a formal method  A formal semantics of object-oriented data models (UML) typed path expressions inheritance ...  A formal semantics of object-oriented constraints (OCL) a logic reasoning over path expressions large libraries three-valued logic ...  And of course, we want a tool (- ) a formal, machine-checked semantics for OO specifications, an interactive proof environment for OO specifications. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 13. An extensible Encoding of Object-oriented Data Models in HOL Challenges (for a shallow embedding) Challenge : Can we find a injective, type preserving mapping of an object-oriented language (and datatypes) into HOL e:T → e T (including subtyping)? Challenge : Can we support verification in a modular way (i. e., no replay of proof scripts after extending specifications)? Challenge : Can we ensure consistency of our representation? Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 14. An extensible Encoding of Object-oriented Data Models in HOL Representing Class Types The “extensible records” approach We assume a common superclass (O). A tag type guarantees uniquenessby (Otag = classO). Construct class type as tuple along inheritance hierarchy: O A s:String B b:Integer Advantages: it allows for extending class types (inheritance), subclasses are type instances of superclasses ⇒ it allows for modular proofs, i. e., a statement ϕ(x (α B)) proven for class B is still valid after extending class B. However, it has a major disadvantage: modular proofs are only supported for one extension per class Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 15. An extensible Encoding of Object-oriented Data Models in HOL Representing Class Types The “extensible records” approach We assume a common superclass (O). A tag type guarantees uniquenessby (Otag = classO). Construct class type as tuple along inheritance hierarchy: B = O A s:String B b:Integer Advantages: it allows for extending class types (inheritance), subclasses are type instances of superclasses ⇒ it allows for modular proofs, i. e., a statement ϕ(x (α B)) proven for class B is still valid after extending class B. However, it has a major disadvantage: modular proofs are only supported for one extension per class Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 16. An extensible Encoding of Object-oriented Data Models in HOL Representing Class Types The “extensible records” approach We assume a common superclass (O). A tag type guarantees uniquenessby (Otag = classO). Construct class type as tuple along inheritance hierarchy: B = (Otag ×oid) O A s:String B b:Integer Advantages: it allows for extending class types (inheritance), subclasses are type instances of superclasses ⇒ it allows for modular proofs, i. e., a statement ϕ(x (α B)) proven for class B is still valid after extending class B. However, it has a major disadvantage: modular proofs are only supported for one extension per class Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 17. An extensible Encoding of Object-oriented Data Models in HOL Representing Class Types The “extensible records” approach We assume a common superclass (O). A tag type guarantees uniquenessby (Otag = classO). Construct class type as tuple along inheritance hierarchy: B = (Otag ×oid) × ((Atag ×String) ) O A s:String B b:Integer Advantages: it allows for extending class types (inheritance), subclasses are type instances of superclasses ⇒ it allows for modular proofs, i. e., a statement ϕ(x (α B)) proven for class B is still valid after extending class B. However, it has a major disadvantage: modular proofs are only supported for one extension per class Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 18. An extensible Encoding of Object-oriented Data Models in HOL Representing Class Types The “extensible records” approach We assume a common superclass (O). A tag type guarantees uniquenessby (Otag = classO). Construct class type as tuple along inheritance hierarchy: B = (Otag ×oid) × ((Atag ×String) × ((Btag ×Integer) )) O A s:String B b:Integer Advantages: it allows for extending class types (inheritance), subclasses are type instances of superclasses ⇒ it allows for modular proofs, i. e., a statement ϕ(x (α B)) proven for class B is still valid after extending class B. However, it has a major disadvantage: modular proofs are only supported for one extension per class Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 19. An extensible Encoding of Object-oriented Data Models in HOL Representing Class Types The “extensible records” approach We assume a common superclass (O). A tag type guarantees uniquenessby (Otag = classO). Construct class type as tuple along inheritance hierarchy: α B = (Otag ×oid) × ((Atag ×String) × ((Btag ×Integer) × α)) O A s:String B b:Integer α Advantages: it allows for extending class types (inheritance), subclasses are type instances of superclasses ⇒ it allows for modular proofs, i. e., a statement ϕ(x (α B)) proven for class B is still valid after extending class B. However, it has a major disadvantage: modular proofs are only supported for one extension per class Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 20. An extensible Encoding of Object-oriented Data Models in HOL Idea: A General Universe Type A universe type representing all classes of a class model supports modular proofs with arbitrary extensions provides a formalization of a extensible typed object store Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 21. An extensible Encoding of Object-oriented Data Models in HOL An Extensible Object Store O O αO U (αO) = O × αO ⊥ Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 22. An extensible Encoding of Object-oriented Data Models in HOL An Extensible Object Store O O αO U (αO) = O × αO ⊥ A Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 23. An extensible Encoding of Object-oriented Data Models in HOL An Extensible Object Store O O αO U (αO) = O × αO ⊥ A A βO αA U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 24. An extensible Encoding of Object-oriented Data Models in HOL An Extensible Object Store O O αO U (αO) = O × αO ⊥ A A βO αA U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ B B βA αB U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ U (αB ,βO,βA) = O × (A × (B × αB ⊥ + βA )⊥ + βO )⊥ Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 25. An extensible Encoding of Object-oriented Data Models in HOL An Extensible Object Store O O αO U (αO) = O × αO ⊥ A A βO αA U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ B B βA αB U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ U (αB ,βO,βA) = O × (A × (B × αB ⊥ + βA )⊥ + βO )⊥C C βA αC Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 26. An extensible Encoding of Object-oriented Data Models in HOL An Extensible Object Store O O αO U (αO) = O × αO ⊥ A A βO αA U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ B B βA αB U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ U (αB ,βO,βA) = O × (A × (B × αB ⊥ + βA )⊥ + βO )⊥C C βA αC U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ U (αB ,βO,βA) = O × (A × (B × αB ⊥ + βA )⊥ + βO )⊥ U (αB ,αC ,βO,βA) = O × (A × (B × αB ⊥ + (C × αC ⊥ + βA ))⊥ + βO )⊥ Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 27. An extensible Encoding of Object-oriented Data Models in HOL An Extensible Object Store O O αO U (αO) = O × αO ⊥ A A βO αA U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ B B βA αB U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ U (αB ,βO,βA) = O × (A × (B × αB ⊥ + βA )⊥ + βO )⊥C C βA αC U (αO) = O × αO ⊥ U (αA,βO) = O × (A × αA ⊥ + βO )⊥ U (αB ,βO,βA) = O × (A × (B × αB ⊥ + βA )⊥ + βO )⊥ U (αB ,αC ,βO,βA) = O × (A × (B × αB ⊥ + (C × αC ⊥ + βA ))⊥ + βO )⊥ U (αB,αC ,βO,βA) ≺ U (αB,βO,βA) ≺ U (αA,βO) ≺ U (αO) Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 28. An extensible Encoding of Object-oriented Data Models in HOL Merging Universes U : A Ua : A C Ub : A B D U : A B C D Non-conflicting Merges Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 29. An extensible Encoding of Object-oriented Data Models in HOL Merging Universes U : A Ua : A C Ub : A B D U : A B C D Non-conflicting Merges U : A Ua : A C Ub : A B U : A BC Conflicting Merges Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 30. An extensible Encoding of Object-oriented Data Models in HOL Operations Accessing the Object Store injections mkO o = Inl o with type αO O → U αO projections getO u = u with type U αO → αO O type casts A[O] = getO ○mkA with type αA A → (A × αA ⊥ + βO ) O O[A] = getA ○mkO with type (A × αA ⊥ + βO ) O → αA A ... All definitions are generated automatically Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 31. An extensible Encoding of Object-oriented Data Models in HOL Does This Really Model Object-orientation? For each UML model, we have to show several properties: O A s:String B b:Integer subclasses are of the superclasses kind: isTypeB self isKindA self “re-casting”: isTypeB self self [A][B] ≠ ∧ isTypeB (self [A][B][A] ) monotonicity of invariants, ... All rules are derived automatically Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 32. An extensible Encoding of Object-oriented Data Models in HOL This is only the beginning ... Type-safety of “object-type accessors” needs further processing. Encoding invariants requires (co-)-inductive definitions. Solution: encoding based on three levels:  weakly typed data types  strongly typed data types (and support for operations)  constrained data modes Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 33. An extensible Encoding of Object-oriented Data Models in HOL Encoding Attribute Accessors Assume a class Node with an attribute next:  Unsafe access (reference, value, or ): self . next() ≡ (fst○snd○snd○fst) ⌜base self ⌝  Type-safe access (typed object, value, or ): self . next() ≡ λ σ. ⎧⎪⎪ ⎨ ⎪⎪⎩ get () Node u if σ(self . next() ) = ⌞u⌟, otherwise.  Semantically-safe access (object satisfying invariant, value, or ): self . next() ≡ λ σ. ⎧⎪⎪ ⎨ ⎪⎪⎩ self . next() if σ ⊧ self . next() ∈KNode otherwise. where KNode is the (co-) inductively defined characteristic kind set of class Node. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 34. An extensible Encoding of Object-oriented Data Models in HOL An multi-level object-oriented datatype-package Level New Datatypes Datatype Adaption Object store (universe)  Datatypes (library) Level Functional Adaption Embedding Adaption Objects with Operations  Formulae Level Combining Embeddings Objects with Invariants, Preconditions and Postconditions Extensible Object Store Datatypes with Un- defindness Object Store with Method Invocation Three-valued Logic Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 35. An extensible Encoding of Object-oriented Data Models in HOL Case Studies (Datatype Package) Importing object-oriented models: Invoice eBank Company R&L classes     specification (lines)     generated theorems     time (in seconds)     The core library takes about  minutes ( secconds) to built Extensionality saves about  minutes on each import Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 36. An extensible Encoding of Object-oriented Data Models in HOL Challenges (Revisited) Challenge : Can we find a injective, type preserving mapping of an object-oriented language (and datatypes) into HOL? Yes, our encoding is even bijective. Challenge : Can we support verification in a modular way (i. e., no replay of proof scripts after extending specifications)? Yes, a specific form of extensionality can be supported. Challenge : Can we ensure consistency of our representation? Yes, by using a conservative embedding (deriving all rules). Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 37. HOL-OCL HOL-OCL - provides: a formal, machine-checked semantics for OO specifications, an interactive proof environment for OO specifications. - is integrated into a toolchain providing: extended well-formedness checking, proof-obligation generation, methodology support for UML/OCL, a transformation framework (including PO generation), code generators, support for SecureUML. - is publicly available: http://www.brucker.ch/projects/hol-ocl/. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 38. HOL-OCL The HOL-OCL User Interface Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 39. HOL-OCL The HOL-OCL High-level Language The - proof language is an extension of Isabelle’s Isar language: importing UML/OCL: import_model "SimpleChair.zargo" "AbstractSimpleChair.ocl" include_only "AbstractSimpleChair" check well-formedness and generate proof obligations for refinement: analyze_consistency [data_refinement] "AbstractSimpleChair" starting a proof for a generated proof obligation: po "AbstractSimpleChair.findRole_enabled" generating code: generate_code "java" Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 40. HOL-OCL The HOL-OCL Architecture Standard ML (PolyML, sml/NJ) HOL-OCL Isabelle/HOL susml HOL-OCL User Interface (extended Proof General) Repository UML/OCL PO-Manager Encoder Code-Gen. WF-Checks Model-Trans. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 41. Outlook and Conclusion The HOL-OCL Architecture (Next Generation) PO-ManagerL-EncoderIsabelle/HOL Scala-Interface SML-Interface UML/OCL Modelling Tool HOL-OCL Interface + Repository Generator Code WF-Checks Model-Trans. UML/OCL Encoder HOL-OCL Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 42. Outlook and Conclusion Conclusion Technical challenges: parsing and typing (!) concrete syntax can be slow debugging simplifier setups is painful defining new X-Symbol syntax is quite limited (compared to LATEX) Best practice for communicating with external tools is missing ... Conclusion Isabelle is a framework for developing formal tools (even for tools where Isabelle not seen by the end-user) The Scala-Layer enables many new features, e.g., Integration of new interaction paradigms Isabelle can be (smoothly) integrated with external tools and libraries ... Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 43. Thank you for your attention! Any questions or remaks?
  • 44. Bibliography Bibliography I Achim D. Brucker, Jürgen Doser, and Burkhart Wolff. An MDA framework supporting OCL. Electronic Communications of the EASST, , . Achim D. Brucker. An Interactive Proof Environment for Object-oriented Specifications. PhD thesis, ETH Zurich, March . ETH Dissertation No. . Achim D. Brucker and Burkhart Wolff. - – A Formal Proof Environment for UML/OCL. In José Fiadeiro and Paola Inverardi, editors, Fundamental Approaches to Software Engineering (FASE), number  in Lecture Notes in Computer Science, pages –. Springer-Verlag, . Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 45. Bibliography Bibliography II Achim D. Brucker and Burkhart Wolff. An extensible encoding of object-oriented data models in HOL. Journal of Automated Reasoning, :–, . Achim D. Brucker and Burkhart Wolff. Extensible universes for object-oriented data models. In Jan Vitek, editor, ECOOP  – Object-Oriented Programming, number  in Lecture Notes in Computer Science, pages –. Springer-Verlag, . Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 47. The HOL-OCL Architecture (Details) The Encoder The model encoder is the main interface between susml and the Isabelle based part of -. The encoder declarers HOL types for the classifiers of the model, encodes type-casts, attribute accessors, and dynamic type and kind tests implicitly declared in the imported data model, encodes the OCL specification, i. e., class invariants operation specifications and combines it with the core data model, and proves (automatically) methodology and analysis independent properties of the model. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 48. The HOL-OCL Architecture (Details) The Library The - library formalizes the built-in operations of UML/OCL, comprises over  definitions and theorems, build the basis for new, OCL specific, proof procedures, provides proof support for (formal) development methodologies. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 49. The HOL-OCL Architecture (Details) Tactics (Proof Procedures) OCL, as logic, is quite different from HOL (e. g., three-valuedness) Major Isabelle proof procedures, like simp and auto, cannot handle OCL efficiently. - provides several UML/OCL specific proof procedures: embedding specific tactics (e. g., unfolding a certain level) a OCL specific context-rewriter a OCL specific tableaux-prover ... These language specific variants increase the degree of proof for OCL. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 50. The HOL-OCL Architecture (Details) susml susml – Overview susml is a UML/OCL (and SecureUML) model repository providing a database for syntactic elements of UML core, namely class models and state machines as well as OCL expressions. support for SecureUML. import of UML/OCL models in different formats: XMI and ArgoUML (class models and state machines) OCL (plain text files) USE (plain text files describing class models with OCL annotations) a template-based code generator (export) mechanism. an integrated framework for model transformations. a framework for checking well-formedness conditions. a framework for generating proof obligations. an interface to - (encoder, po manager). Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 51. The HOL-OCL Architecture (Details) susml susml – Code Generators susml provides a template-based code generator for Java, supporting class models and state machines OCL runtime enforcement SecureUML C#, supporting class models and state machines SecureUML USE ... Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 52. The HOL-OCL Architecture (Details) susml susml – Model Transformations susml provides a framework for model transformation that supports the generation of proof obligations can be programmed in SML. Currently, the following transformations are provided: a family of semantic preserving transformations for converting associations ( e. g., n-ary into binary ones) a transformation from SecureUML/ComponentUML to UML/OCL. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 53. The HOL-OCL Architecture (Details) susml susml – Well-formedness Checks susml provides an framework for extended well-formedness checking: Checks if a given model satisfies certain syntactic constraints, Allows for defining dependencies between different checks Examples for well-formedness checks are: restricting the inheritance depth restringing the use of private class members checking class visibilities with respect to member visibilities ... Can be easily extended (at runtime). Is integrated with the generation of proof obligations. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 54. The HOL-OCL Architecture (Details) susml susml – Proof Obligation Generator susml provides an framework for proof obligation generation: Generates proof obligation in OCL plus minimal meta-language. Only minimal meta-language necessary: Validity: ⊧ _, _ ⊧ _ Meta level quantifiers: ∃_. _, ∃_. _ Meta level logical connectives: _ ∨ _, _ ∧ _, ¬_ Examples for proof obligations are: (semantical) model consistency Liskov’s substitution principle refinement conditions ... Can be easily extended (at runtime). Builds, together with well-formedness checking, the basis for tool-supported methodologies. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 55. Outline  The HOL-OCL Architecture (Details)  Mechanized Support for Model Analysis Methods  Applications of HOL-OCL
  • 56. Mechanized Support for Model Analysis Methods Motivation Observation: UML/OCL is a generic modeling language: usually, only a sub-set of UML is used and there is no standard UML-based development process. Successful usage of UML usually comprises a well-defined development process and tools that integrate into the development process. Conclusion: Formal methods for UML-based development should support the local UML development methodologies and integrate smoothly into the local toolchain. A toolchain for formal methods should provide tool-support for methodologies. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 57. Mechanized Support for Model Analysis Methods Well-formedness Checking: Enforcing Syntactical Requirements Well-formedness of Models Well-formedness Checking Enforce syntactical restriction on (valid) UML/OCL models. Ensure a minimal quality of models. Can be easily supported by automated tools. Example There should be at maximum five inheritance levels. The Specification of public operations may only refer to public class members. ... Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 58. Mechanized Support for Model Analysis Methods Proof Obligations: Enforcing Syntactical Requirements Proof Obligations for Models Proof Obligation Generation Enforce semantical restriction on (valid) UML/OCL models. Build the basis for formal development methodologies. Require formal tools (theorem prover, model checker, etc). Example Liskov’s substitution principle. Model consistency Refinement. ... Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 59. Mechanized Support for Model Analysis Methods Proof Obligations: Enforcing Syntactical Requirements Proof Obligations: Liskov’s Substitution Principle Liskov substitution principle Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a subtype of T. For constraint languages, like OCL, this boils down to: pre-conditions of overridden methods must be weaker. post-conditions of overridden methods must be stronger. Which can formally expressed as implication: Weakening the pre-condition: oppre → opsub pre Strengthening the post-condition: opsub post → oppost Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 60. Mechanized Support for Model Analysis Methods Proof Obligations: Enforcing Syntactical Requirements Proof Obligations: Liskov’s Substitution Principle Example Rectangle width:Integer height:Integer setHeight(h:Integer):OclVoid setWidth(w:Integer):OclVoid context Rectangle::setWidth(w:Integer):OclVoid pre: w >= 0 post: self.width = w context Square::setWidth(w:Integer):OclVoid pre: w >= 0 post: self.width = w and self.height=w Square setHeight(h:Integer):OclVoid setWidth(w:Integer):OclVoid Weakening the pre-condition: (w >= 0) → (w >= 0) Strengthening the post-condition: (self.width = w and self.height = w) → (self.width = w) Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 61. Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL Methodology A tool-supported methodology should integrate into existing toolchains and processes, provide a unified approach, integrating , syntactic requirements (well-formedness checks), generation of proof obligations, means for verification (proving) or validation, and of course all phases should be supported by tools. Example A package-based object-oriented refinement methodology. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 62. Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL Refinement – Motivation Support top-down development from an abstract model to a more concrete one. We start with an abstract transition system sysabs = (σabs, initabs, opabs) We refine each abstract operation opabs to a more concrete one: opconc. Resulting in a more concrete transition system sysconc = (σconc, initconc, opconc) Such refinements can be chained: sys ↝ sys ↝ ⋯ ↝ sysn E.g., from an abstract model to one that supports code generation. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 63. Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL Refinement: Well-formedness If package B refines a package A, then one should be able to substitute every usage of package A with package B.  For each public class c of A, B must provide a corresponding public class c′ .  Types of public attributes and public operations (arguments and return type) must be either basic datatypes or public classes.  For each public class c of A, we require that the corresponding class c′ of B provides at least  public attributes with the same name and  public operations with the same name.  The types of corresponding and attributes and operations are compatible. Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 64. Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL Refinement: Proof Obligations – Consistency A transition system is consistent if: The set of initial states is non-empty, i. e., ∃σ. σ ∈ init The state invariant is satisfiable, i. e., the conjunction of all invariants is invariant-consistent: ∃σ. σ ⊧ inv ∧ ∃σ. σ ⊧ inv ∧ ⋯ ∧ ∃σ. σ ⊧ invn All operations op are implementable, i. e., for each satisfying pre-state there exists a satisfying post-state: ∀ σpre ∈ Σ, self , i, . . . , in. σpre ⊧ preop → ∃ σpost ∈ Σ, result. (σpre, σpost) ⊧ postop Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 65. Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL Refinement: Proof Obligations – Implements Given an abstraction relation R P(σabs × σconc) relating a concrete state S and an abstract states T. A forward refinement S ⊑R FS T ≡ po(S, R, T) ∧ po(S, R, T) requires two proof obligations po and po. Preserve Implementability (po): σa σc σa R opa =⇒ σa σc σc σa R opa opc po(S, R, T) ≡ ∀σa ∈ pre(S), σc ∈ V. (σa, σc) ∈ R → σc ∈ pre(T) Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 66. Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL Refinement: Proof Obligations – Refines Given an abstraction relation R P(σabs × σconc) relating a concrete state S and an abstract states T. A forward refinement S ⊑R FS T ≡ po(S, R, T) ∧ po(S, R, T) requires two proof obligations po and po. Refinement (po): σa σc σc R opc =⇒ σa σc σc σa R R opa opc po(S, R, T) ≡ ∀σa ∈ pre(S), σc ∈ V. σc′ . (σa, σc) ∈ R ∧ (σc, σ′ c) ⊧M T → ∃σ′ a ∈ V. (σa, σ′ a) ⊧M S ∧ (σa′ , σc′ ) ∈ R Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 67. Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL Refinement Example: Abstract Model Role Hearer Speaker CoChair Chair Person name:String Session name:String findRole(p:Person):Role Participant AbstractSimpleChair Person name:String Role Participant Hearer CoChair ChairSpeaker Session name:String findRole(p:Person):Role person 0..* role 0..* 0..* session0..1 context Session::findRole(person:Person):Role pre: self.participates.person->includes(person) post: result=self.participants->one(p:Participant | p.person ≐ person ).role and self.participants ≐ self.participants@pre and self.name ≐ self.name@pre Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 68. Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL Refinement Example: Concrete Model Role Hearer Speaker CoCair Chair Person name:String Session name:String findRole(p:Person):Role ConcreteSimpleChair Person name:String Role Hearer CoCair ChairSpeaker Session name:String findRole(p:Person):Role participants {ordered} 0..* sessions0..* sessions 0..* {ordered} roles 0..* context Session::findRole(person:Person):Role pre: self.participants->includes(peson) post: result ≐ roles.at(participants.indexOf(p)) Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 69. Mechanized Support for Model Analysis Methods Formal Methodologies for UML/OCL Refinement Example: Theory Sketch theory SimpleChairRefinement imports OCL_methodology begin import_model "SimpleChair.zargo" "SimpleChair.ocl" refine "AbstractSimpleChair" "ConcreteSimpleChair" po Refinement.findRole ∀σ ∈ pre S, σ′ ∈ pre T. RSession σ σ′ self self ′ ∀σ ∈ pre S, σ ∈ pre T. RPerson σ σ′ p p′ ∀σ ∈ pre S, σ ∈ pre T. RRole σ σ′ result result′ AbstractSimpleChair. Session. findRole self p result ⊑R FS ConcreteSimpleChair. Session. findRole self ′ p′ result′ apply( ... ) discharged Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 70. Outline  The HOL-OCL Architecture (Details)  Mechanized Support for Model Analysis Methods  Applications of HOL-OCL
  • 71. Applications of HOL-OCL Consistency Analysis Simple Consistency Analysis I DriversLicense licenseClass:String Person age:Integer context Person inv AllPersonsWithDriversLicenseAdult: self.driversLicense->notEmpty() implies self.age > 17 context DriversLicense inv AllLicenseOwnersAdult: person.age > 17 person driversLicense 0..1 Figure: A simple model of vehicles and licenses Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 72. Applications of HOL-OCL Consistency Analysis Simple Consistency Analysis II lemma assumes "τ ⊧ (Vehicles.Person.driversLicense( Vehicles.DriversLicense.person self)).IsDefined()" and "τ ⊧ (Vehicles.Person.age (Vehicles.DriversLicense.person self)).IsDefined() " shows "τ ⊧ Person.inv.AllPersonsWithDriversLicenseAdult ( Vehicles.DriversLicense.person self) → τ ⊧ DriversLicense.inv.AllLicenseOwnersAdult self" apply(auto elim!: OclImpliesE) apply(cut_tac prems) apply(auto simp: inv.AllPersonsWithDriversLicenseAdult_def inv.AllLicenseOwnersAdult_def elim!: OclImpliesE SingletonSetDefined) done Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 73. Applications of HOL-OCL Liskov’s Substitution Principle Liskov’s Substitution Principle I context A::m(p:Integer):Integer pre: p > 0 post: result > 0 context A::m(p:Integer):Integer pre: p >= 0 post: result = p*p + 5 -- The following constraints overrides the specification for -- m(p:Integer):Integer that was originally defined in -- class A, i.e., C is a subclass of A. context C::m(p:Integer):Integer pre: p >= 0 post: result > 1 and result = p*p+5 Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  
  • 74. Applications of HOL-OCL Liskov’s Substitution Principle Liskov’s Substitution Principle II import_model "overriding.zargo" "overriding.ocl" generate_po_liskov "pre" generate_po_liskov "post" po "overriding.OCL_liskov−po_lsk_pre−" apply(simp add: A.m_Integer_Integer.pre_def A.m_Integer_Integer.pre.pre__def C.m_Integer_Integer.pre_def C.m_Integer_Integer.pre.pre__def A.m_Integer_Integer.pre.pre__def) apply(ocl_auto) discharged Achim D. Brucker Encoding Object-oriented Datatypes in HOL: Extensible Records RevisitedIDW  