From OCL to Typed First-order Logic
|
|
- Brianna Watson
- 5 years ago
- Views:
Transcription
1 22c181: Formal Methods in Software Engineering The University of Iowa Spring 2008 From OCL to Typed First-order Logic Copyright Reiner Hähnle and Cesare Tinelli. Notes originally developed by Reiner Hähnle at Chalmers University and modified by Cesare Tinelli at the University of Iowa. These notes are copyrighted materials and may not be used in other course settings outside of the University of Iowa in their current form or modified form without the express written permission of one of the copyright holders. 22c181: Formal Methods in Software Engineering p.1/15
2 Contents Overview of KeY UML and its semantics Introduction to OCL Specifying requirements with OCL Modelling of Systems with Formal Semantics Propositional & First-order logic, sequent calculus OCL to Logic, horizontal proof obligations, using KeY Dynamic logic, proving program correctness Java Card DL Vertical proof obligations, using KeY Wrap-up, trends 22c181: Formal Methods in Software Engineering p.2/15
3 Formal Verification UML OCL Java I Translation FO Logic Dyn. Logic I I, = Real World Obj. Diagr. Snapshot/ LTS Calculus FO Model Kripke Str. Sequent Calculus 22c181: Formal Methods in Software Engineering p.3/15
4 OCL Context Declarations as Universal Quantifiers Classifier Context (Invariants) context typename inv Boolean OclExpression-with-self 22c181: Formal Methods in Software Engineering p.4/15
5 OCL Context Declarations as Universal Quantifiers Classifier Context (Invariants) context typename inv Boolean OclExpression-with-self Equivalent to universally quantified expression inv typename.allinstances() > forall(x OclExpression-with-x) 22c181: Formal Methods in Software Engineering p.4/15
6 OCL Context Declarations as Universal Quantifiers Classifier Context (Invariants) context typename inv Boolean OclExpression-with-self Equivalent to universally quantified expression inv typename.allinstances() > forall(x OclExpression-with-x) Example context Person inv self.age >= 0 inv Person.allInstances() > forall(x x.age >= 0) 22c181: Formal Methods in Software Engineering p.4/15
7 Translating Universal Quantifiers from OCL to FOL Universally quantified OCL expression inv typename.allinstances > forall(x OclExpression-with-x) 22c181: Formal Methods in Software Engineering p.5/15
8 Translating Universal Quantifiers from OCL to FOL Universally quantified OCL expression inv typename.allinstances > forall(x OclExpression-with-x) Translation T to universal quantifier over variable x of type typename x.t(oclexpression-with-x) 22c181: Formal Methods in Software Engineering p.5/15
9 Translating Universal Quantifiers from OCL to FOL Universally quantified OCL expression inv typename.allinstances > forall(x OclExpression-with-x) Translation T to universal quantifier over variable x of type typename x.t(oclexpression-with-x) Example inv Person.allInstances() > forall(x x.age >= 0) T x : Person x.(t(x.age >= 0)) 22c181: Formal Methods in Software Engineering p.5/15
10 Quantification over Existing Objects If x is variable of type C from UML context, then x.φ quantifies over all objects typeable with C We want only the created objects in the current snapshot! 22c181: Formal Methods in Software Engineering p.6/15
11 Quantification over Existing Objects If x is variable of type C from UML context, then x.φ quantifies over all objects typeable with C We want only the created objects in the current snapshot! Assume that each class C has Boolean attribute < created > I(< created >)(o) is true iff o has been created in state described by I 22c181: Formal Methods in Software Engineering p.6/15
12 Quantification over Existing Objects If x is variable of type C from UML context, then x.φ quantifies over all objects typeable with C We want only the created objects in the current snapshot! Assume that each class C has Boolean attribute < created > I(< created >)(o) is true iff o has been created in state described by I Instead of use quantifier defined as: x.φ <-> x.(x.< created > -> φ) Instead of use quantifier defined as: x.φ <-> x.(x.< created > & φ) 22c181: Formal Methods in Software Engineering p.6/15
13 Translating OCL to FOL: Attributes Attributes OCL constraint with attribute x.age >= 0 class name Person name:string string name compartment attribute compartment attribute names attribute types 22c181: Formal Methods in Software Engineering p.7/15
14 Translating OCL to FOL: Attributes Attributes OCL constraint with attribute x.age >= 0 UML attribute semantics I(age) function from I(Person) to I(int) class name Person name:string string name compartment attribute compartment attribute names attribute types 22c181: Formal Methods in Software Engineering p.7/15
15 Translating OCL to FOL: Attributes Attributes OCL constraint with attribute x.age >= 0 UML attribute semantics I(age) function from I(Person) to I(int) class name Person name:string string attribute names attribute types name compartment attribute compartment FOL type hierarchy & signature (fragment) T = {Person,...,int,...} FSym = {age} with age : Person int PSym = {>=,<=,>,<,...} 22c181: Formal Methods in Software Engineering p.7/15
16 Translating OCL to FOL: Attributes Attributes OCL constraint with attribute x.age >= 0 UML attribute semantics I(age) function from I(Person) to I(int) class name Person name:string string attribute names attribute types name compartment attribute compartment FOL type hierarchy & signature (fragment) T = {Person,...,int,...} FSym = {age} with age : Person int PSym = {>=,<=,>,<,...} FOL translation T (x.age >= 0) = age(x)>=0 22c181: Formal Methods in Software Engineering p.7/15
17 Notational Conventions Allow postfix-dot notation for functions that model attributes Example age(x)>=0 T x.age>=0 In simple cases FOL translation looks exactly like OCL: OCL expressions w/o iterators are alternative concrete syntax of FOL 22c181: Formal Methods in Software Engineering p.8/15
18 Notational Conventions Allow postfix-dot notation for functions that model attributes Example age(x)>=0 T x.age>=0 In simple cases FOL translation looks exactly like OCL: OCL expressions w/o iterators are alternative concrete syntax of FOL No generic types in Java Card and FOL (such as Set(Person)) Translation generates suitable flat types on-the-fly SetOfPerson, SequenceOfPerson, etc. Shorthand for sets of objects: Vehicle{}, Person{}, int{} 22c181: Formal Methods in Software Engineering p.8/15
19 Assorted Remarks FOL translation of OCL attribute interpreted as total function Value of an attribute might benull Symbols with fixed interpretation for many OCL properties <=, size, includes, +, 17, self, result, etc. Correct intended semantics guaranteed by sound calculus rules (automatically loaded) If owner type of functions that model attributes and operations is required to resolve overloading, then write it in front: Person ::age(x), Person{} ::includes(siblings(self), p) 22c181: Formal Methods in Software Engineering p.9/15
20 Translating OCL to FOL: Associations Person Associations name:string age:int query getname():string setage(newage:int):int a 1 mother 1 father a Multiplicity 1: like attributes, but no dot notation Function Example: supplier-role-name : client-type supplier-type father : Person Person Use explicit role name if present, otherwise default role name not(self.father = self.mother) T!(father(self). = mother(self)) 22c181: Formal Methods in Software Engineering p.10/15
21 Translating OCL to FOL: Associations Person Associations name:string age:int query getname():string setage(newage:int):int a * siblings * nephews Other multiplicity than 1: a Function supplier-role-name : client-type Supplier-type{} 22c181: Formal Methods in Software Engineering p.11/15
22 Translating OCL to FOL: Associations Person Associations name:string age:int query getname():string setage(newage:int):int a * siblings * nephews Other multiplicity than 1: a Function supplier-role-name : client-type Supplier-type{} Example: siblings : Person Person{} self.siblings = self.nephews T siblings(self). = nephews(self) Problem: no rules for equality of sets of objects extensionality 22c181: Formal Methods in Software Engineering p.11/15
23 Translating OCL to FOL: Associations Person Associations name:string age:int query getname():string setage(newage:int):int a * siblings * nephews Other multiplicity than 1: a Function supplier-role-name : client-type Supplier-type{} siblings(self). = nephews(self) expanded into: p.( Person{}::includes(siblings(self), p) <-> Person{}::includes(nephews(self), p)) 22c181: Formal Methods in Software Engineering p.11/15
24 Translating OCL to FOL: allinstances() Person allinstances() name:string age:int query getname():string setage(newage:int):int a a 1 mother 1 father Argument of OCL quantifier forall, exists Analogous treatment to class context declaration Example Person.allInstances() -> forall(age >= 0) T x.(x.age>=0) 22c181: Formal Methods in Software Engineering p.12/15
25 Translating OCL to FOL: allinstances() Person allinstances() name:string age:int query getname():string setage(newage:int):int a 1 mother a Other collection property than quantifier 1 father For T.allInstances() create constant T{}::allInstances : T{} Add definition of T{}::allInstances to goal antecedent: x. T{}::includes(T{}::allInstances, x) Example for translation of allinstances() Person.allInstances() -> size() = 1 T Person{}::size(Person{}::allInstances). = 1 22c181: Formal Methods in Software Engineering p.13/15
26 Translating OCL to FOL: Important Issues In many cases FOL translation follows OCL closely Some collection properties have complicated translations (select, reject) Translator optimizes whenever possible Sometimes, translation declares new function symbols Definitions placed in antecedent (ie, left) of sequent arrow ==> Details of translation (see also course web page): B. Beckert, U. Keller, P Schmitt: Translating the OCL into First-order Predicate Logic A. Roth & P. Schmitt Formal Specification, Section c181: Formal Methods in Software Engineering p.14/15
27 Horizontal Verification: Behavioural Subtyping Substitution principle (Liskov, 1993) Let φ be a property provable about objects x of type T. Then φ should be true for objects y of type S where S T. 22c181: Formal Methods in Software Engineering p.15/15
28 Horizontal Verification: Behavioural Subtyping Substitution principle (Liskov, 1993) Let φ be a property provable about objects x of type T. Then φ should be true for objects y of type S where S T. Consequence is invariant subtyping property: Invariant of a class must imply invariant of all parent classes 22c181: Formal Methods in Software Engineering p.15/15
29 Horizontal Verification: Behavioural Subtyping Substitution principle (Liskov, 1993) Let φ be a property provable about objects x of type T. Then φ should be true for objects y of type S where S T. Consequence is invariant subtyping property: Invariant of a class must imply invariant of all parent classes inv S is (FOL translation of) OCL invariant constraint of a class S T 1,...,T n parent classes and interfaces of S Proof obligation: self.(invs -> (inv T1 & &inv Tn )) 22c181: Formal Methods in Software Engineering p.15/15
From OCL to Propositional and First-order Logic: Part I
22c181: Formal Methods in Software Engineering The University of Iowa Spring 2008 From OCL to Propositional and First-order Logic: Part I Copyright 2007-8 Reiner Hähnle and Cesare Tinelli. Notes originally
More informationTyped First-order Logic
22c181: Formal Methods in Software Engineering The University of Iowa Spring 2008 Typed First-order Logic Copyright 2007-8 Reiner Hähnle and Cesare Tinelli. Notes originally developed by Reiner Hähnle
More informationOverview of the KeY System
22c181: Formal Methods in Software Engineering The University of Iowa Spring 2008 Overview of the KeY System Copyright 2007-8 Reiner Hähnle and Cesare Tinelli. Notes originally developed by Reiner Hähnle
More informationFundamentals of Software Engineering
Fundamentals of Software Engineering Reasoning about Programs with Dynamic Logic - Part I Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard
More information15-819M: Data, Code, Decisions
15-819M: Data, Code, Decisions 08: First-Order Logic André Platzer aplatzer@cs.cmu.edu Carnegie Mellon University, Pittsburgh, PA André Platzer (CMU) 15-819M/08: Data, Code, Decisions 1 / 40 Outline 1
More informationFundamentals of Software Engineering
Fundamentals of Software Engineering Reasoning about Programs with Dynamic Logic - Part II Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard
More informationFundamentals of Software Engineering
Fundamentals of Software Engineering Reasoning about Programs with Dynamic Logic - Part II Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard
More informationSoftware Engineering using Formal Methods
Software Engineering using Formal Methods Reasoning about Programs with Dynamic Logic Wolfgang Ahrendt & Richard Bubel & Wojciech Mostowski 5 October 2011 SEFM: Java DL /GU 111005 1 / 45 Dynamic Logic
More informationFormal Specification and Verification
Formal Specification and Verification Proof Obligations Bernhard Beckert Based on a lecture by Wolfgang Ahrendt and Reiner Hähnle at Chalmers University, Göteborg Formal Specification and Verification:
More informationFormal Systems II: Applications
Formal Systems II: Applications Functional Verification of Java Programs: Java Dynamic Logic Bernhard Beckert Mattias Ulbrich SS 2017 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State
More informationA Short Introduction to First-Order Theorem Proving with KeY
1 What is KeY? 1.1 Software Verification Karlsruher Institut für Technologie Institut für Theoretische Informatik Prof. Dr. Peter H. Schmitt Mattias Ulbrich A Short Introduction to First-Order Theorem
More informationVerifying Java Programs Verifying Java Programs with KeY
Verifying Java Programs Verifying Java Programs with KeY Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at
More informationThe Object Contraint Language by Example
Formal Specification of Software The Object Contraint Language by Example Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU B. Beckert: Formal Specification of Software p.1 The Classifier Context inv ( c :)?
More informationVerifying Java Programs Verifying Java Programs with KeY
Verifying Java Programs Verifying Java Programs with KeY Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at
More informationVerifying Java Programs with KeY
Verifying Java Programs with KeY Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at Wolfgang
More informationHandling Integer Arithmetic in the Verification of Java Programs
Handling Integer Arithmetic in the Verification of Java Programs Steffen Schlager 1st Swedish-German KeY Workshop Göteborg, Sweden, June 2002 KeY workshop, June 2002 p.1 Introduction UML/OCL specification
More informationFundamentals of Software Engineering
Fundamentals of Software Engineering Reasoning about Programs - Selected Features Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel,
More informationSpecification with OCL
Specification with OCL Jurriaan Hage Slides adapted from Birgit Demuth, TU Dresden e-mail: jur@cs.uu.nl homepage: http://www.cs.uu.nl/people/jur/ Department of Information and Computing Sciences, Universiteit
More informationSpecification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008
SEFM School 2008 Specification-based Testing of Embedded Systems Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin and Fraunhofer FIRST, Berlin Lecture 5: OCL, ParTeG Course Outline L1: Introduction
More informationCSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27
CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 2.1-2.7 p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer
More informationSpecification-based Testing of Embedded Systems H. Schlingloff, SEFM 2008
SEFM School 2008 Specification-based Testing of Embedded Systems Prof. Dr. Holger Schlingloff Humboldt-Universität zu Berlin and Fraunhofer FIRST, Berlin Lecture 4: Mutations, OCL etc. Course Outline L1:
More informationCOMP4418 Knowledge Representation and Reasoning
COMP4418 Knowledge Representation and Reasoning Week 3 Practical Reasoning David Rajaratnam Click to edit Present s Name Practical Reasoning - My Interests Cognitive Robotics. Connect high level cognition
More informationOCL parsing / type checking in the context of GF and KeY. Kristofer Johannisson
OCL parsing / type checking in the context of GF and KeY Kristofer Johannisson 1 I. Introduction 2 Typechecking? context OwnerPIN inv: maxpinsize > 0 and maxtries > 0 and triesremaining >= 0 and triesremaining
More informationSoftware Engineering: A Practitioner s s Approach, 6/e Roger Pressman. Chapter 28 Formal Methods
Software Engineering: A Practitioner s s Approach, 6/e Roger Pressman Chapter 28 Formal Methods 1 Problems with Conventional Specification contradictions ambiguities vagueness incompleteness mixed levels
More informationIndex. business modeling syntax 181 business process modeling 57 business rule 40
OCL.book Page 203 Tuesday, July 22, 2003 9:48 PM Index Symbols OclAny, of 167 = OclAny, of 167 @pre 34, 86, 155 ^ 34, 156 ^^ 157 A abstract syntax 93 accumulator 153 action in statechart 56 activity
More informationType Inference Systems. Type Judgments. Deriving a Type Judgment. Deriving a Judgment. Hypothetical Type Judgments CS412/CS413
Type Inference Systems CS412/CS413 Introduction to Compilers Tim Teitelbaum Type inference systems define types for all legal programs in a language Type inference systems are to type-checking: As regular
More informationTIME-BASED CONSTRAINTS IN THE OBJECT CONSTRAINT LANGUAGE OCL
TIME-BASED CONSTRAINTS IN THE OBJECT CONSTRAINT LANGUAGE OCL Ali Hamie, John Howse School of Computing, Mathematical and Information Sciences, University of Brighton, Brighton, UK. {a.a.hamie@brighton.ac.uk,
More informationType Checking. Outline. General properties of type systems. Types in programming languages. Notation for type rules.
Outline Type Checking General properties of type systems Types in programming languages Notation for type rules Logical rules of inference Common type rules 2 Static Checking Refers to the compile-time
More informationOutline. General properties of type systems. Types in programming languages. Notation for type rules. Common type rules. Logical rules of inference
Type Checking Outline General properties of type systems Types in programming languages Notation for type rules Logical rules of inference Common type rules 2 Static Checking Refers to the compile-time
More informationChapter 2 (First-Order Logic) of. Verification of Object-Oriented Software
Chapter 2 (First-Order Logic) of Verification of Object-Oriented Software The KeY approach c 2007 Springer Verlag 1 First-Order Logic by Martin Giese In this chapter, we introduce a first-order logic.
More informationLee Pike. June 3, 2005
Proof NASA Langley Formal Methods Group lee.s.pike@nasa.gov June 3, 2005 Proof Proof Quantification Quantified formulas are declared by quantifying free variables in the formula. For example, lem1: LEMMA
More informationSoftware Engineering
Software Engineering Lecture 15: OCL Peter Thiemann University of Freiburg, Germany 01.07.2013 Peter Thiemann (Univ. Freiburg) Software Engineering 01.07.2013 1 / 28 What is OCL? OCL = Object Constraint
More informationKeY Quicktour. 1 Introduction/Prerequisites Version Information Logical Foundations The KeY-Prover... 2
KeY Quicktour Thomas Baar University of Karlsruhe Dept. of Computer Science D-76128 Karlsruhe baar@ira.uka.de Reiner Hähnle Chalmers University of Technology Dept. of Computing Science S-41296 Gothenburg
More informationDynamic Logic for Java
Chapter 3 Dynamic Logic for Java Bernhard Beckert, Vladimir Klebanov, and Benjamin Weiß 3.1 Introduction In the previous chapter, we have introduced JFOL a variant of classical first-order logic tailored
More informationA First-Order Logic with First-Class Types
A First-Order Logic with First-Class Types joint work with Peter H. Schmitt and Mattias Ulbrich Institute for Theoretical Computer Science The 8th KeY Symposium, Speyer, 2009 Java Card DL modal logic based
More informationChapter 3 (part 3) Describing Syntax and Semantics
Chapter 3 (part 3) Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings
More informationFormal Specification and Verification
Formal Specification and Verification Introduction to Promela Bernhard Beckert Based on a lecture by Wolfgang Ahrendt and Reiner Hähnle at Chalmers University, Göteborg Formal Specification and Verification:
More informationOverview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.
Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to
More informationTowards a Logical Reconstruction of Relational Database Theory
Towards a Logical Reconstruction of Relational Database Theory On Conceptual Modelling, Lecture Notes in Computer Science. 1984 Raymond Reiter Summary by C. Rey November 27, 2008-1 / 63 Foreword DB: 2
More informationThe KeY System 1.0 (Deduction Component)
The KeY System 1.0 (Deduction Component) Bernhard Beckert, Martin Giese, Reiner Hähnle, Vladimir Klebanov, Philipp Rümmer, Steffen Schlager, and Peter H. Schmitt www.key-project.org Abstract. The KeY system
More informationCS:5810 Formal Methods in Software Engineering
CS:5810 Formal Methods in Software Engineering Introduction to Alloy Part 1 Copyright 2001-17, Matt Dwyer, John Hatcliff, Rod Howell, Laurence Pilard, and Cesare Tinelli. Created by Cesare Tinelli and
More informationPart II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs?
Part II. Hoare Logic and Program Verification Part II. Hoare Logic and Program Verification Dilian Gurov Props: Models: Specs: Method: Tool: safety of data manipulation source code logic assertions Hoare
More informationTowards a GUI for Program Verification with KeY. Master of Science Thesis in the Programme Software Engineering and Technology
Towards a GUI for Program Verification with KeY Master of Science Thesis in the Programme Software Engineering and Technology Chalmers University of Technology University of Gothenburg Department of Computer
More informationObject Constraint https://www.lri.fr/~linaye/gl.html lina.ye@centralesupelec.fr Sequence 3, 2017-2018 1/45 Plan 1 2 3 4 2/45 Motivation Why OCL Cannot represent all the relevant aspects of a specification
More informationMetamodeling. Janos Sztipanovits ISIS, Vanderbilt University
Metamodeling Janos ISIS, Vanderbilt University janos.sztipanovits@vanderbilt.edusztipanovits@vanderbilt edu Content Overview of Metamodeling Abstract Syntax Metamodeling Concepts Metamodeling languages
More information22c:181 / 55:181 Formal Methods in Software Engineering
22c:181 / 55:181 Formal Methods in Software Engineering Design by Contract Copyright 2001-11, Matt Dwyer, John Hatcliff, Rod Howell, and Cesare Tinelli. Produced by Cesare Tinelli at the University of
More informationTheorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214
Theorem proving PVS theorem prover Abhik Roychoudhury National University of Singapore Both specification and implementation can be formalized in a suitable logic. Proof rules for proving statements in
More informationSoftware Verification for Java 5
Software Verification for Java 5 KeY Symposium 2007 Mattias Ulbrich June 14, 2007 Content KeY + Java 5 Typesafe Enumeration Datatypes Enhanced For Loops Generic Classes 1. Keep pace with the progress of
More informationFormal Systems and their Applications
Formal Systems and their Applications Dave Clarke (Dave.Clarke@cs.kuleuven.be) Acknowledgment: these slides are based in part on slides from Benjamin Pierce and Frank Piessens 1 Course Overview Introduction
More informationCIS 771: Software Specifications
CIS 771: Software Specifications Lecture 11: Introduction to OCL & USE Copyright 2001-2002, Matt Dwyer, John Hatcliff, and Rod Howell. The syllabus and all lectures for this course are copyrighted materials
More informationArchitectural Models and Styles Component-Based Software Engineering ECE493-Topic 5 Winter 2007 Lecture 12 The Object Constraint Language (Part A)
Component-Based Software Engineering ECE493-Topic 5 Winter 2007 Lecture 12 The Object Constraint Language (Part A) Ladan Tahvildari Assistant Professor Dept. of Elect. & Comp. Eng. University of Waterloo
More informationCONSTRAINT SPECIFICATIONS USING PATTERNS IN OCL
CONSTRAINT SPECIFICATIONS USING PATTERNS IN OCL Ali Hamie. University of Brighton, Brighton, UK a.a.hamie@brighton.ac.uk ABSTRACT Constraint patterns are very useful for specifying OCL constraints on UML
More informationTypes. Type checking. Why Do We Need Type Systems? Types and Operations. What is a type? Consensus
Types Type checking What is a type? The notion varies from language to language Consensus A set of values A set of operations on those values Classes are one instantiation of the modern notion of type
More informationAn Annotated Language
Hoare Logic An Annotated Language State and Semantics Expressions are interpreted as functions from states to the corresponding domain of interpretation Operators have the obvious interpretation Free of
More informationVerifying Object-Oriented Programs with KeY: A Tutorial
Verifying Object-Oriented Programs with KeY: A Tutorial Wolfgang Ahrendt 1, Bernhard Beckert 2, Reiner Hähnle 1, Philipp Rümmer 1, and Peter H. Schmitt 3 1 Department of Computer Science and Engineering,
More informationThe design of a programming language for provably correct programs: success and failure
The design of a programming language for provably correct programs: success and failure Don Sannella Laboratory for Foundations of Computer Science School of Informatics, University of Edinburgh http://homepages.inf.ed.ac.uk/dts
More informationResolution (14A) Young W. Lim 6/14/14
Copyright (c) 2013-2014. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free
More informationWhat is OCL? OCL/Context
What is? Software Engineering Lecture 5: Prof. Dr. Peter Thiemann Universität Freiburg SS 20 = object constraint language standard query language of UML 2 specify expressions and constraints in object-oriented
More informationComposite Structures
Composite Structures Marie-Agnès Peraldi-Frati UNSA/I3S/INRIA map@unice.fr UML 2 Composition Model Purpose: improve the black diamond composition Supports connections between parts at the same level of
More informationAgenda. More on the Unified Modeling Language. UML diagram types. Packages
Agenda More on the Unified Modeling Language Perdita Stevens, University of Edinburgh July 2010 And the rest... deployment diagrams, component diagrams, object diagrams, timing diagrams, etc. OCL and alternatives
More informationImproving the Definition of UML
Improving the Definition of UML Greg O Keefe Computer Sciences Laboratory Australian National University Outline The UML definition claims to be Outline The UML definition claims to be precise Outline
More informationSeminar: Specification and Verification of Object-oriented Software. The KeY Tool
The KeY Tool developed by: W. Ahrendt, T. Baar, B. Beckert, R. Bubel, M. Giese, R. Hähnle, W. Menzel, W. Mostowski, A. Roth, S. Schlager, P.H. Schmitt, and others Information Security, ETH Zürich, Switzerland
More informationDynamic Frames in Java Dynamic Logic
Dynamic Frames in Java Dynamic Logic Peter H Schmitt, Mattias Ulbrich, and Benjamin Weiß Karlsruhe Institute of Technology Institute for Theoretical Computer Science D-76128 Karlsruhe, Germany {pschmitt,mulbrich,bweiss}@iraukade
More informationLecture 9. UML language architecture
Lecture 9 UML Model architecture Object Constraint Language 12/10/98 AOO / UML / OCL/Strategies 1 UML language architecture UML metamodel defines meaning of UML models Defined in a metacircular manner,
More informationSoftware Engineering Lecture Notes
Software Engineering Lecture Notes Paul C. Attie August 30, 2013 c Paul C. Attie. All rights reserved. 2 Contents I Hoare Logic 11 1 Propositional Logic 13 1.1 Introduction and Overview..............................
More informationSoftware Design, Modelling and Analysis in UML
Software Design, Modelling and Analysis in UML Lecture 07: A Type System for Visibility 2013-11-18 07 2013-11-18 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg,
More informationCSC Discrete Math I, Spring Sets
CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its
More informationAlloy: A Lightweight Object Modelling Notation
Alloy: A Lightweight Object Modelling Notation Daniel Jackson, ACM Transactions on Software Engineering, 2002 Presented By: Steven Stewart, 2012-January-23 1 Alloy: 2002 to present Software is built on
More informationVerifying Safety Property of Lustre Programs: Temporal Induction
22c181: Formal Methods in Software Engineering The University of Iowa Spring 2008 Verifying Safety Property of Lustre Programs: Temporal Induction Copyright 2008 Cesare Tinelli. These notes are copyrighted
More informationFormal Methods in Software Design. Markus Roggenbach
Formal Methods in Software Design Markus Roggenbach October 2001 2 Formal Methods Use of mathematics in software development main activities: writing formal specifications 2 Formal Methods Use of mathematics
More informationFirst-Order Logic PREDICATE LOGIC. Syntax. Terms
First-Order Logic PREDICATE LOGIC Aim of this lecture: to introduce first-order predicate logic. More expressive than propositional logic. Consider the following argument: all monitors are ready; X12 is
More informationCover Page. The handle holds various files of this Leiden University dissertation
Cover Page The handle http://hdl.handle.net/1887/22891 holds various files of this Leiden University dissertation Author: Gouw, Stijn de Title: Combining monitoring with run-time assertion checking Issue
More informationLecture 1: Conjunctive Queries
CS 784: Foundations of Data Management Spring 2017 Instructor: Paris Koutris Lecture 1: Conjunctive Queries A database schema R is a set of relations: we will typically use the symbols R, S, T,... to denote
More informationFormal Specification and Verification
Formal Specification and Verification Formal Specification, Part III Bernhard Beckert Adaptation of slides by Wolfgang Ahrendt Chalmers University, Gothenburg, Sweden Formal Specification and Verification:
More informationLearning Objectives. C++ For Artists 2003 Rick Miller All Rights Reserved xli
Identify and overcome the difficulties encountered by students when learning how to program List and explain the software development roles played by students List and explain the phases of the tight spiral
More informationType checking. Jianguo Lu. November 27, slides adapted from Sean Treichler and Alex Aiken s. Jianguo Lu November 27, / 39
Type checking Jianguo Lu November 27, 2014 slides adapted from Sean Treichler and Alex Aiken s Jianguo Lu November 27, 2014 1 / 39 Outline 1 Language translation 2 Type checking 3 optimization Jianguo
More informationThe Object Constraint Language (OCL)
The Object Constraint Language (OCL) Robert B. France Dept. of Computer Science Colorado State University USA france@cs.colostate.edu Semantics and UML models UML models often treated as informal descriptions
More informationVerifying JML specifications with model fields
Verifying JML specifications with model fields Cees-Bart Breunesse and Erik Poll Department of Computer Science, University of Nijmegen Abstract. The specification language JML (Java Modeling Language)
More informationFirst Order Predicate Logic CIS 32
First Order Predicate Logic CIS 32 Functionalia Demos? HW 3 is out on the web-page. Today: Predicate Logic Constructing the Logical Agent Predicate Logic First-order predicate logic More expressive than
More informationAxioms: Semantics Aspects of C++ Concepts
Doc no: N2887=09-0077 Date: 2009-06-21 Project: ISO/IEC JTC1/SC22/WG21 Reply-To: Gabriel Dos Reis gdr@cs.tamu.edu Axioms: Semantics Aspects of C++ Concepts Gabriel Dos Reis Bjarne Stroustrup Alisdair Meredith
More informationThe Proposition. Roger Bishop Jones. Abstract. A place to play formally with the concept of proposition. Created 2009/11/22
The Proposition Roger Bishop Jones Abstract A place to play formally with the concept of proposition. Created 2009/11/22 Last Change Date: 2010-08-05 12:04:21 http://www.rbjones.com/rbjpub/pp/doc/t033.pdf
More informationSoftware Engineering using Formal Methods
Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt & Richard Bubel & Reiner Hähnle & Wojciech Mostowski 31 August 2011 SEFM: Promela /GU 110831 1 / 35 Towards Model Checking
More informationSemantic Subtyping with an SMT Solver
Semantic Subtyping with an SMT Solver Cătălin Hrițcu, Saarland University, Saarbrücken, Germany Joint work with Andy Gordon, Gavin Bierman, and Dave Langworthy (all from Microsoft) Refinement Types + Type-test
More informationInheritance. Inheritance Reserved word protected Reserved word super Overriding methods Class Hierarchies Reading for this lecture: L&L
Inheritance Inheritance Reserved word protected Reserved word super Overriding methods Class Hierarchies Reading for this lecture: L&L 9.1 9.4 1 Inheritance Inheritance allows a software developer to derive
More information1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.
1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 2. true / false ML can be compiled. 3. true / false FORTRAN can reasonably be considered
More information8/22/2003. Proposal for VPI model PSL assertion extensions
8/22/2003 Proposal for VPI model PSL assertion extensions Cadence Design Systems, Inc. 8/22/2003 This proposal has been prepared by Cadence Design Systems, Inc. for consideration by the IEEE 1364 working
More informationFondamenti della Programmazione: Metodi Evoluti. Lezione 5: Invariants and Logic
Fondamenti della Programmazione: Metodi Evoluti Prof. Enrico Nardelli Lezione 5: Invariants and Logic versione originale: http://touch.ethz.ch Reminder: contracts Associated with an individual feature:
More informationFormal Methods in Software Engineering 1
Building Models with OCL Introduction Completing UML Diagrams Modeling Tips and Hints Summary Formal Methods in Software Engineering 1 What Is a Model? Simply put, a model is a high level system description.
More informationProgramming Languages
CSE 230: Winter 2008 Principles of Programming Languages Ocaml/HW #3 Q-A Session Push deadline = Mar 10 Session Mon 3pm? Lecture 15: Type Systems Ranjit Jhala UC San Diego Why Typed Languages? Development
More informationConstraint-enabled Process Modeling. Conrad Bock U.S. National Institute of Standards and Technology November 20, 2007
Constraint-enabled Process Modeling Conrad Bock U.S. National Institute of Standards and Technology November 20, 2007 1 Overview Models and constraints: Example of structure models Extend to process models:
More informationSecond-Order Type Systems
#1 Second-Order Type Systems Homework 5 Summary Student : 37.9704 Student : 44.4466 ORIGINAL : 50.2442 Student : 50.8275 Student : 50.8633 Student : 50.9181 Student : 52.1347 Student : 52.1633 Student
More informationEXTENSIONS OF FIRST ORDER LOGIC
EXTENSIONS OF FIRST ORDER LOGIC Maria Manzano University of Barcelona CAMBRIDGE UNIVERSITY PRESS Table of contents PREFACE xv CHAPTER I: STANDARD SECOND ORDER LOGIC. 1 1.- Introduction. 1 1.1. General
More informationJML tool-supported specification for Java Erik Poll Radboud University Nijmegen
JML tool-supported specification for Java Erik Poll Radboud University Nijmegen Erik Poll - JML p.1/41 Overview The specification language JML Tools for JML, in particular runtime assertion checking using
More informationThis is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS
1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be
More informationMain Goal. Language-independent program verification framework. Derive program properties from operational semantics
Main Goal Language-independent program verification framework Derive program properties from operational semantics Questions: Is it possible? Is it practical? Answers: Sound and complete proof system,
More informationChapter 8, Object Design: Object Constraint Language
Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 8, Object Design: Object Constraint Language Outline of the Lecture OCL Simple predicates Preconditions Postconditions Contracts
More informationHoare Logic. COMP2600 Formal Methods for Software Engineering. Rajeev Goré
Hoare Logic COMP2600 Formal Methods for Software Engineering Rajeev Goré Australian National University Semester 2, 2016 (Slides courtesy of Ranald Clouston) COMP 2600 Hoare Logic 1 Australian Capital
More informationRelational Calculus. Chapter Comp 521 Files and Databases Fall
Relational Calculus Chapter 4.3-4.5 Comp 521 Files and Databases Fall 2010 1 Relational Calculus Comes in two flavors: Tuple relational calculus (TRC) and Domain relational calculus (DRC). Calculus has
More information6. Hoare Logic and Weakest Preconditions
6. Hoare Logic and Weakest Preconditions Program Verification ETH Zurich, Spring Semester 07 Alexander J. Summers 30 Program Correctness There are many notions of correctness properties for a given program
More informationDistributed Systems Programming (F21DS1) Formal Verification
Distributed Systems Programming (F21DS1) Formal Verification Andrew Ireland Department of Computer Science School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh Overview Focus on
More information