Model-based Development of Web Services using Design-by-Contract

Size: px
Start display at page:

Download "Model-based Development of Web Services using Design-by-Contract"

Transcription

1 Model-based Development of Web Services using Design-by-Contract Reiko Heckel University of Leicester, UK Lesster Joint work with M. Lohmann, A. Cherchago, J.H. Hausmann, Paderborn, TU Berlin, Consistency of Service Composition Requirements Description Requestor Provider 1. External: between interface specifications 2. Internal: between interface specification and implementation Reiko Heckel, Univ. of Leicester, UK 1

2 Example: Car Rental Service <<interface>> RentalServiceRequired reservcar(,, ) <<interface>> RentalServiceProvided makereserv(,, ): EContract Matching provider and requestor specification within registry must ensure compatibility of Data types Does Customer have the same meaning for requestor and provider? Operation signatures Can provider operation be supplied with suitable parameters from a call of requestor operation? Behavior Does provided operation actually carry out what is expected by a requestor? Data Types and Signatures <<interface>> RentalServiceRequired reservcar(,, ) <<interface>> RentalServiceProvided makereserv(,, ): EContract Reorder and rename pars Skip input of requestor Ignore output of provider Data types: parties use common domain model (ontology) Operation signatures: Zaremski and Wing: Signature matching: A tool for using software libraries. TOSEM Customer RentalInfo pic-update: Date returndate: Date location: String signs reserves EContract issigned:bool Vehicle Id:String for Car Truck Van Reiko Heckel, Univ. of Leicester, UK 2

3 Behavior: Operation Contracts Pre-condition: Customer rental info and selects car Required Effect: Car is reserved for customer Formal specification (logic, graph transformation, ) for automatic matching Integration into mainstream SW development methods (UML) for wider applicability Outline Contracts as graph transformation rules Semantics of rules Semantic / syntactic compatibility, soundness Contracts as Graph Transformation Rules Signature: reservcar(,, ) Behavior: GT rule Pre-condition: Effect: reserves L R Typed DPO [Corradini et al 96] Data types: type graph Customer RentalInfo pic-update: Date returndate: Date location: String signs typing reserves EContract issigned:bool Vehicle Id:String for Car Truck Van Reiko Heckel, Univ. of Leicester, UK 3

4 What is the right notion of compatibilty? That depends on how services should interact: Requestor pre R effect R 1. call 2. return pre P effect P Provider 1. Requestor guarantees pre R Provider assumes pre P 2. Provider guarantees effect P Requestor assumes effect R a contravariant relation. what it should mean, that: an assumption is correct a guarantee is fulfilled a question about the semantics of contracts. Operational Semantics: The DPO Approach l r reserves d L L (PO) d K K (PO) d R R name= upb name= upb name= upb ri1:rentalinfo pick-update= returndate= location=pisa g ri1:rentalinfo pick-update= returndate= location=pisa h reserves ri1:rentalinfo pick-update= returndate= location=pisa id= VWMultivan01 G id= VWMultivan01 D id= VWMultivan01 H L is embedded into graph G. The changes to G The elements of G matched by L- l(k) are removed. are exactly those specified by the rule The elements matched by R - r(k) are added to D. Reiko Heckel, Univ. of Leicester, UK 4

5 Loose Semantics of Contracts Requestor has only loose idea of behavior of the other service Requestor pre R pre P Provider effect R 1. call 2. return effect P Provider has complete info, but may prefer not to publish everything Contracts are incomplete specifications of service behavior d L L G l (PB) g K D Formally: Double-Pullback (DPB), allows unspecified Deletion: at least elements of G matched by L - l(k) are removed Creation: at least elements matched by R - r(k) are added to D (faithful) transition vs. transformation r d K (PB) h R H d R Contracts as Rules, revisited Positive Application Conditions Precondition: what must be present before, no matter what happens later Effect: what must be deleted preserved created l l r reserves L L (PB) K (PB) R name= upb name= upb name= upb ri1:rentalinfo pick-update= returndate= location=pisa reserves id= VWMultivan01 G id= VWMultivan01 D id= VWMultivan01 H Reiko Heckel, Univ. of Leicester, UK 5

6 What is the right notion of compatibility? That depends on how services should interact: Requestor pre R effect R 1. call 2. return pre P effect P Provider 1. Requestor guarantees pre R Provider assumes pre P 2. Provider guarantees effect P Requestor assumes effect R a contravariant relation. what it should mean, that: an assumption is correct a guarantee is fulfilled a question about the semantics of contracts. Semantic Compatibility R: l p L r L r R r P: l p ec:econtract L p L p R p ri1:rentalinfo 1. pre R pre P : applicability of requestor rule implies applicability of provider rule 2. effect P effect R : transition via provider rule is also transition via requestor rule. Reiko Heckel, Univ. of Leicester, UK 6

7 Semantic Compatibility R: l p L r L r R r P: l p ec:econtract L p L p R p ri1:rentalinfo ri1:rentalinfo e:econtract Semantic Compatibility: formally L 1 l 1 L 1 l 1 r L 1 K 1 1 R 1 d L1 d L1 d L1 d K1 d R1 G l 2 r 2 L 2 R 2 K 2 L 2 d L2 l 2 d L2 L 2 d L2 d K2 d R2 G g D h H Reiko Heckel, Univ. of Leicester, UK 7

8 What do we have? Semantic compatibility relation = quantified over all graphs and transitions cannot be verified directly Objective: syntactic matching relation -- Soundness: p 2 -- p 1 implies p 2 = p 1 Completeness: p 2 = p 1 implies p 2 -- p 1 Syntactic Matching Relation R: l p L r L r R r (=) (faithful trans) P: l p ec:econtract L p L p R p pre R pre P : requestor must provide all information necessary for the execution of the provider operation, effect P effect R : effect of the provided operation must include those expected by the requestor. Reiko Heckel, Univ. of Leicester, UK 8

9 Syntactic Matching: formally L 1 l 1 L 1 faithful transition l 1 r L 1 K 1 1 R 1 h L (=) h L (PB) h K (PB) h R h L L 2 l 2 r 2 R 2 K 2 L 2 l 2 L 2 g h G D H What do we have? Semantic compatibility: relation = Syntactic matching: relation -- Soundness: p 2 -- p 1 implies p 2 = p 1 Completeness: p 2 = p 1 implies p 2 -- p 1 Reiko Heckel, Univ. of Leicester, UK 9

10 Consistency of Service Composition Requirements Description Requestor Provider External: between interface specifications 2. Internal: between interface specification and implementation Internal Consistency Service Description: - Class diagram - Operation signatures - Operation contracts :CreditCard business modeller models :Book :CreditCard :DeliveryAddress :Order :Book :Bill :DeliveryAddress knows generate JML Compiler programmer implements method compile Operation annotations: JML assertions Implementation executable binary code with run-time tests for contracts Reiko Heckel, Univ. of Leicester, UK 10

11 JML from Graphical Contracts Semantic idea: Assume rule r specifying method m. If r is applicable to G, then m invoked in G (with appropriate parameters) terminates without exception. If invocation yields H, there exists a graph transition from G to H via r. After manually refining the models (business analysis view), translate 1. class diagram Java class frames 2. rules JML patterns rules Class diagrams Java class frames UML attributes private attributes with access methods UML associations pairs of attributes, mutually consistent private int orderno; public int getorderno() { } public void setorderno(int no) { } private Customer buyer; public void setbuyer(customer c) { } public Customer getbuyer() { } private TreeSet revbuyer; public void addrevbuyer(order o){ } public void removerevbuyer(order o){ } public bool hasrevbuyer(order o){ } Reiko Heckel, Univ. of Leicester, UK 11

12 Contracts JML public class ShopImplementation { public requires ensures JML-POST; */ public boolean addproducttoorder( int productno, int customerno, int orderno) { } } Contracts JML: Patterns starting at this navigate to as yet unbound objects, check attributes and links and bind them select navigation paths to achieve earliest possible public requires (\exists Product p.getno() == && (\exists Customer c.getno() == && (\exists Order o.getorderno() == && o.getcustomer() == && o.containsproduct(p) == false))); Reiko Heckel, Univ. of Leicester, UK 12

13 Contracts JML: old Product p = old Customer c = old Order o requires p!= requires c!= requires o!= requires o.getcustomer() == && o.containsproduct(p) == false; like let, evaluated in pre state works for deterministic ensures p!= ensures c!= ensures o!= ensures \not_modified(p, ensures o.getcustomer() == ensures o.getproducts().contains(p); Non-deterministic Matching?? alternative class diagram Solution: store all possible bindings and check that at least on satisfies post-condition Reiko Heckel, Univ. of Leicester, UK 13

14 Consistency of Service Composition Requirements Description Requestor Provider Visual representation of contracts based on GT with loose semantics External: syntactic characterization of service compatibility Internal: mapping of contracts to JML Open questions relation between business-level and analysis-level contracts verification of mapping GT JML implementation and evaluation Papers With A. Cherchago, M. Lohmann: A Formal Approach to Service Specification and Matching based on Conditional Graph Transformation, ICGT 2004 in Rome With M. Lohmann: Model-Driven Development of Reactive Information Systems: From Graph Transformation Rules to JML Contracts, to appear in STTT Reiko Heckel, Univ. of Leicester, UK 14

Model-Driven Development of Reactive Information Systems

Model-Driven Development of Reactive Information Systems Software Tools for Technology Transfer manuscript No. (will be inserted by the editor) Model-Driven Development of Reactive Information Systems From Graph Transformation Rules to JML Contracts Reiko Heckel

More information

Towards a UML Profile for Service-Oriented Architectures 1

Towards a UML Profile for Service-Oriented Architectures 1 Towards a UML Profile for Service-Oriented Architectures 1 Reiko Heckel, Marc Lohmann, and Sebastian Thöne Faculty of Computer Science, Electrical Engineering and Mathematics University of Paderborn, Germany

More information

Automatic generation of behavioral code - too ambitious or even unwanted?

Automatic generation of behavioral code - too ambitious or even unwanted? Automatic generation of behavioral - too ambitious or even unwanted? Gregor Engels University of Twente, The Netherlands 23 June 2009 Professional Activities Gregor Engels University of Paderborn Head

More information

Formal Specification and Verification

Formal 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 information

Verifying Java Programs Verifying Java Programs with KeY

Verifying 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 information

Towards Model-Driven Unit Testing

Towards Model-Driven Unit Testing Towards Model-Driven Unit Testing Gregor Engels 1,2, Baris Güldali 1, and Marc Lohmann 2 1 Software Quality Lab 2 Department of Computer Science University of Paderborn, Warburgerstr. 100, 33098 Paderborn,

More information

Testing, Debugging, Program Verification

Testing, Debugging, Program Verification Testing, Debugging, Program Verification Automated Test Case Generation, Part II Wolfgang Ahrendt & Vladimir Klebanov & Moa Johansson 12 December 2012 TDV: ATCG II /GU 2011-12-12 1 / 17 Recap Specification-/Model-Based

More information

Verifying Java Programs Verifying Java Programs with KeY

Verifying 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 information

Verifying Java Programs with KeY

Verifying 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 information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Fall 2016 Lecture 7a Andrew Tolmach Portland State University 1994-2016 Values and Types We divide the universe of values according to types A type is a set of values and a

More information

Formale Entwicklung objektorientierter Software

Formale Entwicklung objektorientierter Software Formale Entwicklung objektorientierter Software Praktikum im Wintersemester 2008/2009 Prof. P. H. Schmitt Christian Engel, Benjamin Weiß Institut für Theoretische Informatik Universität Karlsruhe 5. November

More information

JML tool-supported specification for Java Erik Poll Radboud University Nijmegen

JML 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 information

The Java Memory Model

The Java Memory Model Jeremy Manson 1, William Pugh 1, and Sarita Adve 2 1 University of Maryland 2 University of Illinois at Urbana-Champaign Presented by John Fisher-Ogden November 22, 2005 Outline Introduction Sequential

More information

Formal Methods for Java

Formal Methods for Java Formal Methods for Java Lecture 6: Introduction to JML Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg May 15, 2017 Jochen Hoenicke (Software Engineering) Formal Methods for Java

More information

Static program checking and verification

Static program checking and verification Chair of Software Engineering Software Engineering Prof. Dr. Bertrand Meyer March 2007 June 2007 Slides: Based on KSE06 With kind permission of Peter Müller Static program checking and verification Correctness

More information

Programming with Contracts. Juan Pablo Galeotti, Alessandra Gorla Saarland University, Germany

Programming with Contracts. Juan Pablo Galeotti, Alessandra Gorla Saarland University, Germany Programming with Contracts Juan Pablo Galeotti, Alessandra Gorla Saarland University, Germany Contract A (formal) agreement between Method M (callee) Callers of M Rights Responsabilities Rights Responsabilities

More information

Chapter 4 Defining Classes I

Chapter 4 Defining Classes I Chapter 4 Defining Classes I This chapter introduces the idea that students can create their own classes and therefore their own objects. Introduced is the idea of methods and instance variables as the

More information

Towards Automatic Selection of Web Services Using Graph Transformation Rules

Towards Automatic Selection of Web Services Using Graph Transformation Rules Towards Automatic Selection of Web Services Using Graph Transformation Rules Jan Hendrik Hausmann, Reiko Heckel, Marc Lohmann Faculty of Computer Science, Electrical Engineering and Mathematics University

More information

Formal Methods for Software Development

Formal Methods for Software Development Formal Methods for Software Development Java Modeling Language, Part I Wolfgang Ahrendt 04 October 2018 FMSD: Java Modeling Language /GU 181004 1 / 36 Role of JML in the Course programming/modelling property/specification

More information

Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci)

Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci) Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci) Sung Hee Park Department of Mathematics and Computer Science Virginia State University September 18, 2012 The Object-Oriented Paradigm

More information

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing Black Box Testing EEC 521: Software Engineering Software Testing Black-Box Testing Test-Driven Development Also known as specification-based testing Tester has access only to running code and the specification

More information

Formal Specification and Verification

Formal 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 information

CS 351 Design of Large Programs Programming Abstractions

CS 351 Design of Large Programs Programming Abstractions CS 351 Design of Large Programs Programming Abstractions Brooke Chenoweth University of New Mexico Spring 2019 Searching for the Right Abstraction The language we speak relates to the way we think. The

More information

Cover Page. The handle holds various files of this Leiden University dissertation

Cover 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 information

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Lecture 13. Notation. The rules. Evaluation Rules So Far

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Lecture 13. Notation. The rules. Evaluation Rules So Far Lecture Outline Operational Semantics of Cool Lecture 13 COOL operational semantics Motivation Notation The rules Prof. Aiken CS 143 Lecture 13 1 Prof. Aiken CS 143 Lecture 13 2 Motivation We must specify

More information

JML Class Specifications The Java Modeling Language (Part 2) A Java Class

JML Class Specifications The Java Modeling Language (Part 2) A Java Class JML Class Specifications The Java Modeling Language (Part 2) Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria

More information

The Java Modeling Language (Part 2)

The Java Modeling Language (Part 2) The Java Modeling Language (Part 2) Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at

More information

Objectives. Introduce static keyword examine syntax describe common uses

Objectives. Introduce static keyword examine syntax describe common uses Static Objectives Introduce static keyword examine syntax describe common uses 2 Static Static represents something which is part of a type rather than part of an object Two uses of static field method

More information

Web Ontology Language for Service (OWL-S) The idea of Integration of web services and semantic web

Web Ontology Language for Service (OWL-S) The idea of Integration of web services and semantic web Web Ontology Language for Service (OWL-S) The idea of Integration of web services and semantic web Introduction OWL-S is an ontology, within the OWL-based framework of the Semantic Web, for describing

More information

Testing Library Specifications by Verifying Conformance Tests

Testing Library Specifications by Verifying Conformance Tests Testing Library Specifications by Verifying Conformance Tests Joseph R. Kiniry, Daniel M. Zimmerman, Ralph Hyland ITU Copenhagen, UW Tacoma, UCD Dublin 6th International Conference on Tests & Proofs Prague,

More information

Motivation: Model-driven. driven Engineering. Semantics of Model Transformation. Reiko Heckel University of Leicester, UK

Motivation: Model-driven. driven Engineering. Semantics of Model Transformation. Reiko Heckel University of Leicester, UK Semantics of Model Transformation Reiko Heckel University of Leicester, UK, University of Birmingham, 1 March 2007 Motivation: Model-driven driven Engineering Focus and primary artifacts are models instead

More information

The Java Modeling Language JML

The Java Modeling Language JML The Java Modeling Language JML Néstor Cataño ncatano@puj.edu.co Faculty of Engineering Pontificia Universidad Javeriana The Java Modelling Language JML p.1/47 Lecture Plan 1. An Introduction to JML 2.

More information

Assertions & Design-by-Contract using JML Erik Poll University of Nijmegen

Assertions & Design-by-Contract using JML Erik Poll University of Nijmegen Assertions & Design-by-Contract using JML Erik Poll University of Nijmegen Erik Poll - JML p.1/39 Overview Assertions Design-by-Contract for Java using JML Contracts and Inheritance Tools for JML Demo

More information

CSE 307: Principles of Programming Languages

CSE 307: Principles of Programming Languages 1 / 26 CSE 307: Principles of Programming Languages Names, Scopes, and Bindings R. Sekar 2 / 26 Topics Bindings 1. Bindings Bindings: Names and Attributes Names are a fundamental abstraction in languages

More information

Operational Semantics. One-Slide Summary. Lecture Outline

Operational Semantics. One-Slide Summary. Lecture Outline Operational Semantics #1 One-Slide Summary Operational semantics are a precise way of specifying how to evaluate a program. A formal semantics tells you what each expression means. Meaning depends on context:

More information

Lecture 10 Design by Contract

Lecture 10 Design by Contract CS 5959 Writing Solid Code Fall 2015 Nov-23 Lecture 10 Design by Contract Zvonimir Rakamarić University of Utah Design by Contract Also called assume-guarantee reasoning Developers annotate software components

More information

Inheritance (Chapter 7)

Inheritance (Chapter 7) Inheritance (Chapter 7) Prof. Dr. Wolfgang Pree Department of Computer Science University of Salzburg cs.uni-salzburg.at Inheritance the soup of the day?! Inheritance combines three aspects: inheritance

More information

Advances in Programming Languages

Advances in Programming Languages T O Y H Advances in Programming Languages APL4: JML The Java Modeling Language David Aspinall (slides originally by Ian Stark) School of Informatics The University of Edinburgh Thursday 21 January 2010

More information

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Notation. The rules. Evaluation Rules So Far.

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Notation. The rules. Evaluation Rules So Far. Lecture Outline Operational Semantics of Cool COOL operational semantics Motivation Adapted from Lectures by Profs. Alex Aiken and George Necula (UCB) Notation The rules CS781(Prasad) L24CG 1 CS781(Prasad)

More information

UC Santa Barbara. CS189A - Capstone. Christopher Kruegel Department of Computer Science UC Santa Barbara

UC Santa Barbara. CS189A - Capstone. Christopher Kruegel Department of Computer Science UC Santa Barbara CS189A - Capstone Christopher Kruegel Department of Computer Science http://www.cs.ucsb.edu/~chris/ Design by Contract Design by Contract and the language that implements the Design by Contract principles

More information

No Source Code. EEC 521: Software Engineering. Specification-Based Testing. Advantages

No Source Code. EEC 521: Software Engineering. Specification-Based Testing. Advantages No Source Code : Software Testing Black-Box Testing Test-Driven Development No access to source code So test cases don t worry about structure Emphasis is only on ensuring that the contract is met Specification-Based

More information

Introduction to JML David Cok, Joe Kiniry, and Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen

Introduction to JML David Cok, Joe Kiniry, and Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen Introduction to JML David Cok, Joe Kiniry, and Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen David Cok, Joe Kiniry & Erik Poll - ESC/Java2 & JML Tutorial p.1/30

More information

Verification Condition Generation

Verification Condition Generation Verification Condition Generation Jorge Sousa Pinto Departamento de Informática / Universidade do Minho jsp@di.uminho.pt www.di.uminho.pt/~jsp Outline (1) - From Hoare Logic to VCGen algorithms: an architecture

More information

Softwaretechnik. Lecture 03: Types and Type Soundness. Peter Thiemann. University of Freiburg, Germany SS 2008

Softwaretechnik. Lecture 03: Types and Type Soundness. Peter Thiemann. University of Freiburg, Germany SS 2008 Softwaretechnik Lecture 03: Types and Type Soundness Peter Thiemann University of Freiburg, Germany SS 2008 Peter Thiemann (Univ. Freiburg) Softwaretechnik SWT 1 / 35 Table of Contents Types and Type correctness

More information

Advances in Programming Languages

Advances in Programming Languages O T Y H Advances in Programming Languages APL8: ESC/Java2 David Aspinall (including slides by Ian Stark and material adapted from ESC/Java2 tutorial by David Cok, Joe Kiniry and Erik Poll) School of Informatics

More information

Program Verification (6EC version only)

Program Verification (6EC version only) Program Verification (6EC version only) Erik Poll Digital Security Radboud University Nijmegen Overview Program Verification using Verification Condition Generators JML a formal specification language

More information

Operational Semantics of Cool

Operational Semantics of Cool Operational Semantics of Cool Key Concepts semantics: the meaning of a program, what does program do? how the code is executed? operational semantics: high level code generation steps of calculating values

More information

OO Technology: Properties and Limitations for Component-Based Design

OO Technology: Properties and Limitations for Component-Based Design TDDD05 Component-Based Software OO Technology: Properties and Limitations for Component-Based Design Interfaces Design by by Contract Syntactic Substitutability Inheritance Considered Harmful Fragile Base

More information

Programming Languages Third Edition

Programming Languages Third Edition Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

More information

Hypertext A Case Study of Formal Object-Oriented Software Development

Hypertext A Case Study of Formal Object-Oriented Software Development Hypertext A Case Study of Formal Object-Oriented Software Development Andreas Rüping Forschungszentrum Informatik (FZI) Bereich Programmstrukturen Haid-und-Neu-Straße 10-14 D-76131 Karlsruhe e-mail: rueping@fzi.de

More information

JML. Java Modeling Language

JML. Java Modeling Language JML Java Modeling Language Overview About the JML Project DBC Design By Contract JML concepts, examples, syntax and capabilities Basics Exceptions Invariants Assertions Quantifiers Other keywords JML hiding

More information

Principles of Programming Languages

Principles of Programming Languages Principles of Programming Languages Lesson 14 Type Checking Collaboration and Management Dana Fisman www.cs.bgu.ac.il/~ppl172 1 Type Checking We return to the issue of type safety we discussed informally,

More information

Modeling Behavioral RESTful Web Service Interfaces in UML

Modeling Behavioral RESTful Web Service Interfaces in UML Modeling Behavioral RESTful Web Service Interfaces in UML Ivan Porres and Irum Rauf Åbo Akademi University, Dept. of Information Technologies,Turku, Finland ivan.porres@abo.fi,irum.rauf@abo.fi ABSTRACT

More information

A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm

A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm Appears as Technical Memo MIT/LCS/TM-590, MIT Laboratory for Computer Science, June 1999 A Correctness Proof for a Practical Byzantine-Fault-Tolerant Replication Algorithm Miguel Castro and Barbara Liskov

More information

Software Construction

Software Construction Lecture 7: Type Hierarchy, Iteration Abstraction Software Construction in Java for HSE Moscow Tom Verhoeff Eindhoven University of Technology Department of Mathematics & Computer Science Software Engineering

More information

Advanced JML Erik Poll Radboud University Nijmegen

Advanced JML Erik Poll Radboud University Nijmegen JML p.1/23 Advanced JML Erik Poll Radboud University Nijmegen JML p.2/23 Core JML Remember the core JML keywords were requires ensures signals invariant non null pure \old, \forall, \result JML p.3/23

More information

Specification of a transacted memory for smart cards in Java and JML

Specification of a transacted memory for smart cards in Java and JML Specification of a transacted memory for smart cards in Java and JML Erik Poll University of Nijmegen, NL Pieter Hartel Eduard de Jong Joint work with University of Twente Sun Microsystems Transacted Memory

More information

From OCL to Propositional and First-order Logic: Part I

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 information

Business Process Management Seminar 2007/ Oktober 2007

Business Process Management Seminar 2007/ Oktober 2007 Business Process Management Seminar 2007/2008 22. Oktober 2007 Process 2 Today Presentation of topics Deadline 29.10.2007 9:00 Rank up to 3 topics - send to hagen.overdick@hpi.uni-potsdam.de 3.12.2007

More information

Hierarchical FSMs with Multiple CMs

Hierarchical FSMs with Multiple CMs Hierarchical FSMs with Multiple CMs Manaloor Govindarajan Balasubramanian Manikantan Bharathwaj Muthuswamy (aka Bharath) Reference: Hierarchical FSMs with Multiple Concurrency Models. Alain Girault, Bilung

More information

Testing, Debugging, and Verification

Testing, Debugging, and Verification Testing, Debugging, and Verification Formal Specification, Part II Srinivas Pinisetty 23 November 2017 Introduction Today: Introduction to Dafny: An imperative language with integrated support for formal

More information

Motivation. Correct and maintainable software Cost effective software production Implicit assumptions easily broken

Motivation. Correct and maintainable software Cost effective software production Implicit assumptions easily broken Spec# Andreas Vida Motivation Correct and maintainable software Cost effective software production Implicit assumptions easily broken Need more formal f specification Integration into a popular language

More information

Lecture Notes on Program Equivalence

Lecture Notes on Program Equivalence Lecture Notes on Program Equivalence 15-312: Foundations of Programming Languages Frank Pfenning Lecture 24 November 30, 2004 When are two programs equal? Without much reflection one might say that two

More information

(Not Quite) Minijava

(Not Quite) Minijava (Not Quite) Minijava CMCS22620, Spring 2004 April 5, 2004 1 Syntax program mainclass classdecl mainclass class identifier { public static void main ( String [] identifier ) block } classdecl class identifier

More information

Computer Science II. OO Programming Classes Scott C Johnson Rochester Institute of Technology

Computer Science II. OO Programming Classes Scott C Johnson Rochester Institute of Technology Computer Science II OO Programming Classes Scott C Johnson Rochester Institute of Technology Outline Object-Oriented (OO) Programming Review Initial Implementation Constructors Other Standard Behaviors

More information

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs?

Part 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 information

Exercise 3 Subtyping and Behavioral Subtyping October 13, 2017

Exercise 3 Subtyping and Behavioral Subtyping October 13, 2017 Concepts of Object-Oriented Programming AS 2017 Exercise 3 Subtyping and Behavioral Subtyping October 13, 2017 Task 1 In this question, we are in a nominal subtyping setting. Some languages have a special

More information

Java: advanced object-oriented features

Java: advanced object-oriented features Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Java: advanced object-oriented features Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Packages

More information

Fundamentals of Software Engineering

Fundamentals 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 information

An introduction to formal specifications and JML. Invariant properties

An introduction to formal specifications and JML. Invariant properties An introduction to formal specifications and JML Invariant properties Yves Ledru Université Grenoble-1 Laboratoire d Informatique de Grenoble Yves.Ledru@imag.fr 2013 Page 1 Invariant properties Invariants

More information

Fortgeschrittene objektorientierte Programmierung (Advanced Object-Oriented Programming)

Fortgeschrittene objektorientierte Programmierung (Advanced Object-Oriented Programming) 2014-03-07 Preface Fortgeschrittene objektorientierte Programmierung (Advanced Object-Oriented Programming) Coordinates: Lecturer: Web: Studies: Requirements: No. 185.211, VU, 3 ECTS Franz Puntigam http://www.complang.tuwien.ac.at/franz/foop.html

More information

ESC/Java2 Use and Features

ESC/Java2 Use and Features ESC/Java2 Use and Features The ESC/Java2 tool David Cok, Joe Kiniry, Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen David Cok, Joe Kiniry & Erik Poll - ESC/Java2

More information

ESC/Java2 Use and Features

ESC/Java2 Use and Features ESC/Java2 Use and Features David Cok, Joe Kiniry, Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen David Cok, Joe Kiniry & Erik Poll - ESC/Java2 & JML Tutorial

More information

Motivation was to facilitate development of systems software, especially OS development.

Motivation was to facilitate development of systems software, especially OS development. A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.

More information

Asynchronous Models. Chapter Asynchronous Processes States, Inputs, and Outputs

Asynchronous Models. Chapter Asynchronous Processes States, Inputs, and Outputs Chapter 3 Asynchronous Models 3.1 Asynchronous Processes Like a synchronous reactive component, an asynchronous process interacts with other processes via inputs and outputs, and maintains an internal

More information

From Event-B Models to Dafny Code Contracts

From Event-B Models to Dafny Code Contracts From Event-B Models to Dafny Code Contracts Mohammadsadegh Dalvandi, Michael Butler, Abdolbaghi Rezazadeh Electronic and Computer Science School, University of Southampton Southampton, United Kingdom {md5g11,mjb,ra3}@ecs.soton.ac.uk

More information

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:

Lecturer: Sebastian Coope Ashton Building, Room G.18   COMP 201 web-page: Lecturer: Sebastian Coope Ashton Building, Room G.18 E-mail: coopes@liverpool.ac.uk COMP 201 web-page: http://www.csc.liv.ac.uk/~coopes/comp201 Lecture 19 Essentials of Class Models 1 On Naming classes

More information

Overview The Java Modeling Language (Part 1) Related Work

Overview The Java Modeling Language (Part 1) Related Work Overview The Java Modeling Language (Part 1) Wolfgang Schreiner Wolfgang.Schreiner@risc.jku.at Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.jku.at

More information

Checking Program Properties with ESC/Java

Checking Program Properties with ESC/Java Checking Program Properties with ESC/Java 17-654/17-765 Analysis of Software Artifacts Jonathan Aldrich 1 ESC/Java A checker for Java programs Finds null pointers, array dereferences Checks Hoare logic

More information

Fundamentals of Software Engineering

Fundamentals 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 information

Reasoning about modules: data refinement and simulation

Reasoning about modules: data refinement and simulation Reasoning about modules: data refinement and simulation David Naumann naumann@cs.stevens-tech.edu Stevens Institute of Technology Naumann - POPL 02 Java Verification Workshop p.1/17 Objectives of talk

More information

Implementing Object Equivalence in Java Using the Template Method Design Pattern

Implementing Object Equivalence in Java Using the Template Method Design Pattern Implementing Object Equivalence in Java Using the Template Method Design Pattern Daniel E. Stevenson and Andrew T. Phillips Computer Science Department University of Wisconsin-Eau Claire Eau Claire, WI

More information

Defining Classes and Methods

Defining Classes and Methods Defining Classes and Methods Chapter 5 Objects and References: Outline Variables of a Class Type Defining an equals Method for a Class Boolean-Valued Methods Parameters of a Class Type Variables of a Class

More information

Details of Class Definition

Details of Class Definition Schedule(2/2) Feb. 25th 13:00 Outline of UML: Static Modeling (details of class definition) 14:30 Outline of UML: Dynamic Modeling (state machine, communication diagram, sequence diagram) March. 4th 13:00

More information

CMSC 330: Organization of Programming Languages. OCaml Expressions and Functions

CMSC 330: Organization of Programming Languages. OCaml Expressions and Functions CMSC 330: Organization of Programming Languages OCaml Expressions and Functions CMSC330 Spring 2018 1 Lecture Presentation Style Our focus: semantics and idioms for OCaml Semantics is what the language

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2017 Lecture 7b Andrew Tolmach Portland State University 1994-2017 Values and Types We divide the universe of values according to types A type is a set of values and

More information

ESC/Java 2. Checker for Java 2. Extended. Static. B y K ats man Andrey S oftware E ngineering S em inar

ESC/Java 2. Checker for Java 2. Extended. Static. B y K ats man Andrey S oftware E ngineering S em inar ESC/Java 2 Extended Static Checker for Java 2 B y K ats man Andrey S oftware E ngineering S em inar 2 0 0 8 Background ESC/Java - Original development by Compaq Systems Research Center (1997) as a successor

More information

Assertions, pre/postconditions

Assertions, pre/postconditions Programming as a contract Assertions, pre/postconditions Assertions: Section 4.2 in Savitch (p. 239) Specifying what each method does q Specify it in a comment before method's header Precondition q What

More information

Component-based software engineering. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 19 Slide 1

Component-based software engineering. Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 19 Slide 1 Component-based software engineering Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 19 Slide 1 Objectives To explain that CBSE is concerned with developing standardised components and

More information

Contents. Program 1. Java s Integral Types in PVS (p.4 of 37)

Contents. Program 1. Java s Integral Types in PVS (p.4 of 37) Java s Integral Types in PVS Bart Jacobs bart@cs.kun.nl www.cs.kun.nl/ bart www.verificard.org. Dep. Computer Science, Univ. Nijmegen, NL Contents I. Example programs II. Integral types in Java (implementations)

More information

Modeling with the Timing Definition Language (TDL) Wolfgang Pree Professor Department of Computer Science Univ. Salzburg, Austria

Modeling with the Timing Definition Language (TDL) Wolfgang Pree Professor Department of Computer Science Univ. Salzburg, Austria Modeling with the Timing Definition Language (TDL) Wolfgang Pree Professor Department of Computer Science Univ. Salzburg, Austria Overview What is TDL? TDL component model TDL tool chain simulation in

More information

Towards imperative modules: reasoning about invariants and sharing of mutable state

Towards imperative modules: reasoning about invariants and sharing of mutable state Towards imperative modules: reasoning about invariants and sharing of mutable state David A. Naumann Joint work with Mike Barnett and Anindya Banerjee Stevens Institute of Technology Supported by NSF CCR-0208984,

More information

Lectures 20, 21: Axiomatic Semantics

Lectures 20, 21: Axiomatic Semantics Lectures 20, 21: Axiomatic Semantics Polyvios Pratikakis Computer Science Department, University of Crete Type Systems and Static Analysis Based on slides by George Necula Pratikakis (CSD) Axiomatic Semantics

More information

JML and Aspects: The Benefits of

JML and Aspects: The Benefits of JML and Aspects: The Benefits of Instrumenting JML Features with AspectJ Henrique Rebêlo Sérgio Soares Ricardo Lima Paulo Borba Márcio Cornélio Java Modeling Language Formal specification language for

More information

Runtime assertion checking of multithreaded Java programs

Runtime assertion checking of multithreaded Java programs Master Thesis Runtime assertion checking of multithreaded Java programs An extension of the STROBE framework Author: Jorne Kandziora Supervisors: dr. M. Huisman dr. C.M. Bockisch M. Zaharieva-Stojanovski,

More information

Semantic Web. Semantic Web Services. Morteza Amini. Sharif University of Technology Fall 94-95

Semantic Web. Semantic Web Services. Morteza Amini. Sharif University of Technology Fall 94-95 ه عا ی Semantic Web Semantic Web Services Morteza Amini Sharif University of Technology Fall 94-95 Outline Semantic Web Services Basics Challenges in Web Services Semantics in Web Services Web Service

More information

Advances in Programming Languages

Advances in Programming Languages Advances in Programming Languages Lecture 12: Practical Tools for Java Correctness Ian Stark School of Informatics The University of Edinburgh Friday 31 November 2014 Semester 1 Week 7 http://www.inf.ed.ac.uk/teaching/courses/apl

More information

Inheritance. 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 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 information

TRIAL EXAM C Software Engineering using Formal Methods TDA293 / DIT270

TRIAL EXAM C Software Engineering using Formal Methods TDA293 / DIT270 TRIAL EXAM C Software Engineering using Formal Methods TDA293 / DIT270 also serving as additional training material for the course Formal Methods for Software Development, TDA294/DIT271 1 Exam/Tenta SEFM

More information

Compositional Model Based Software Development

Compositional Model Based Software Development Compositional Model Based Software Development Prof. Dr. Bernhard Rumpe http://www.se-rwth.de/ Seite 2 Our Working Groups and Topics Automotive / Robotics Autonomous driving Functional architecture Variability

More information