Lecture 12: Core State Machines II

Size: px
Start display at page:

Download "Lecture 12: Core State Machines II"

Transcription

1 Software Design, Modelling and Analysis in UML Lecture 12: Core State Machines II main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany

2 Contents & Goals Last Lecture: Basic causality model Ether/event pool System configuration This Lecture: Educational Objectives: Capabilities for following tasks/questions. What does this State Machine mean? What happens if I inject this event? Can you please model the following behaviour. What is: Signal, Event, Ether, Transformer, Step, RTC Sprelim Content: System configuration cont d Transformers Step, Run-to-Completion Step 2/47

3 System Configuration 3/ main

4 System Configuration Definition. Let S 0 = (T 0, C 0,V 0,atr 0, E)beasignaturewithsignals, D 0 astructure of S 0, (Eth,ready,,,[ ]) an ether over S 0 and D 0. Furthermore assume there is one core state machine M C per class C C. A system configuration over S 0, D 0, and Eth is a pair where S = (T 0 {S MC C C 0 }, C 0, (σ,ε) Σ D S Eth V 0 { stable : Bool,,true, } { st C : S MC,+,s 0, C C} { params E : E 0,1,+,, E E 0 }, Sstmscnf {C atr 0 (C) {stable,st C } {params E E E 0 } C C}, E 0 ) D = D 0 {S MC S(M C ) C C}, and σ(u)(r) D(E 0 ) = for each u dom(σ) and r V 0. 4/47

5 System Configuration: Example C x : Int S 0 = (T 0, C 0,V 0,atr 0, E), D 0 ; S = (T 0 {S MC C C}, C 0, (σ,ε) Σ D S Eth where c 0..1 signal E b : Bool V 0 { stable : Bool,,true, } { st C : S MC,+,s 0, C C} { params E : E 0,1,+,, E E 0 }, {C atr 0 (C) {stable,st C } {params E E E 0 } C C}, E 0 ) D = D 0 {S MC S(M C ) C C}, and σ(u)(r) D(E 0 ) = for each u dom(σ) and r V 0. signal F a : Int Sstmscnf SM C : s 1 s 2 s 3 5/47

6 System Configuration Step-by-Step We start with some signature with signals S 0 = (T 0, C 0,V 0,atr 0, E). A system configuration is a pair (σ,ε) which comprises a system state σ wrt. S (not wrt. S 0 ). Such a system state σ wrt. S provides, for each object u dom(σ), values for the explicit attributes in V 0, values for a number of implicit attributes, namely a stability flag, i.e. σ(u)(stable) is a boolean value, a current (state machine) state, i.e. σ(u)(st) denotes one of the states of core state machine M C, Sstmscnf a temporary association to access event parameters for each class, i.e. σ(u)(params E ) is defined for each E E. For convenience require: there is no link to an event except for params E. 6/47

7 Stability Definition. Let (σ,ε) be a system configuration over some S 0, D 0, Eth. We call an object u dom(σ) D(C 0 ) stable in σ if and only if σ(u)(stable) = true Sstmscnf 7/47

8 Where are we? SM C : C x : Int E[n ]/x := x+1;n!f s 1 s 2 F/x := 0 s 3 p 0..1 /n := n 0..1 D F/ s 1 s 2 /p!f signal E signal F :SM D (σ 1,ε 1 ) ({E},{F}) u 1 (σ 2,ε 2 ) (, ) u 1 (σ 3,ε 3 ) ({F}, ) u 2 (σ 4,ε 4 ) Sstmscnf u 1 : C x = 27 st = s 1 stb = 1 p n u 2 : D st = s 1 stb = 1 u 3 : E to u 1 u 1 : C x = 28 st = s 2 stb = 0 p n u 2 : D st = s 1 stb = 1 u 4 : F to u 2 u 1 : C x = 28 st = s 3 stb = 0 p u 2 : D st = s 1 stb = 1 u 4 : F to u 2 u 1 : C x = 28 st = s 3 stb = 0 p u 2 : D st = s 2 stb = 0 8/47

9 Transformer 9/ main

10 Recall The (simplified) syntax of transition annotations: annot ::= [ event [ [ guard ] ] [ / action ] ] Clear: event is from E of the corresponding signature. But: What are guard and action? UML can be viewed as being parameterized in expression language (providing guard ) and action language (providing action ). Examples: Expression Language: OCL Java, C++,...expressions Strafo Action Language: UML Action Semantics, Executable UML Java, C++,...statements (plus some event send action)... 10/47

11 Needed: Semantics In the following, we assume that we re given an expression language Expr for guards, and an action language Act for actions, and that we re given a semantics for boolean expressions in form of a partial function I (, ) : Expr Σ D S D(C) B which evaluates expressions in a given system configuration, Strafo Assuming I to be partial is a way to treat undefined during runtime. If I is not defined (for instance because of dangling-reference navigation or division-by-zero), we want to go to a designated error system configuration. a transformer for each action: for each act Act, we assume to have t act D(C) (Σ D S Eth) (Σ D S Eth) 11/47

12 Transformer Definition. Let Σ D S the set of system configurations over some S 0, D 0, Eth. We call a relation t D(C) (Σ D S Eth) (Σ D S Eth) a (system configuration) transformer. Example: t[u x ](σ,ε) Σ D S Eth is the set (!) of the system configurations Strafo which may result from object u x executing transformer t. t skip [u x ](σ,ε) = {(σ,ε)} t create [u x ](σ,ε) : add a previously non-alive object to σ 12/47

13 Observations In the following, we assume that each application of a transformer t to some system configuration (σ,ε) for object u x is associated with a set of observations Obs t [u x ](σ,ε) 2 (D(E) {,+}) D(C). An observation (u e,u dst ) Obs t [u x ](σ,ε) Strafo represents the information that, as a side effect of object u x executing t in system configuration (σ,ε), the event u e has been sent to u dst. Special cases: creation ( ) / destruction ( + ). 13/47

14 A Simple Action Language In the following we use Act S = {skip} {update(expr 1,v,expr 2 ) expr 1,expr 2 Expr S,v atr} {send(e(expr 1,...,expr n ),expr dst ) expr i,expr dst Expr S,E E} {create(c,expr,v) C C,expr Expr S,v V} {destroy(expr) expr Expr S } and OCL expressions over S (with partial interpretation) as Expr S Sactlang 14/47

15 Transformer Examples: Presentation Sactlang abstract syntax concrete syntax op intuitive semantics... well-typedness... semantics ((σ,ε),(σ,ε )) t op [u x ] iff... or t op [u x ](σ,ε) = {(σ,ε ) where...} observables Obs op [u x ] = {...} (error) conditions Not defined if... 15/47

16 Transformer: Skip abstract syntax skip intuitive semantics well-typedness semantics observables (error) conditions do nothing./. t skip [u x ](σ,ε) = {(σ,ε)} Obs skip [u x ](σ,ε) = concrete syntax Sactlang 16/47

17 Transformer: Update abstract syntax concrete syntax update(expr 1,v,expr 2 ) intuitive semantics Update attribute v in the object denoted by expr 1 to the value denoted by expr 2. well-typedness expr 1 : T C and v : T atr(c); expr 2 : T; expr 1,expr 2 obey visibility and navigability semantics t update(expr1,v,expr 2 )[u x ](σ,ε) = {(σ,ε)} where σ = σ[u σ(u)[v I expr 2 (σ,u x )]] with Sactlang u = I expr 1 (σ,u x ). observables Obs update(expr1,v,expr 2 )[u x ] = (error) conditions Not defined if I expr 1 (σ,u x ) or I expr 2 (σ,u x ) not defined. 17/47

18 Update Transformer Example SM C : /x := x+1 s 1 s 2 t update(expr1,v,expr 2 )[u x ](σ,ε) = (σ = σ[u σ(u)[v I expr 2 (σ,u x )]],ε), u = I expr 1 (σ,u x ) σ: u 1 : C x = 4 y = 0 u 1 : C x = 5 y = 0 :σ Sactlang ε: :ε 18/47

19 Transformer: Send Sactlang abstract syntax concrete syntax send(e(expr 1,...,expr n ),expr dst ) intuitive semantics Object u x : C sends event E to object expr dst, i.e. create a fresh signal instance, fill in its attributes, and place it in the ether. well-typedness E E; atr(e) = {v 1 : T 1,...,v n : T n }; expr i : T i, 1 i n; expr dst : T D, C,D C \ E; all expressions obey visibility and navigability in C semantics (σ,ε ) t send(e(expr1,...,expr n ),expr dst )[u x ](σ,ε) if σ = σ {u {v i d i 1 i n}}; ε = ε (u dst,u); if u dst = I expr dst (σ,u x ) dom(σ); d i = I expr i (σ,u x ) for 1 i n; u D(E) a fresh identity, i.e. u dom(σ), and where (σ,ε ) = (σ,ε) if u dst dom(σ). observables Obs send [u x ] = {(u e,u dst )} (error) conditions I expr (σ,u x ) not defined for any expr {expr dst,expr 1,...,expr n } 19/47

20 Send Transformer Example SM C : /n!f(x+1) s 1 s 2 t send(exprsrc,e(expr 1,...,expr n ),expr dst )[u x ](σ,ε) (σ,ε ) iff ε = ε (u dst,u); σ = σ {u {v i d i 1 i n}}; u dst = I expr dst (σ,u x ) dom(σ); d i = I expr i (σ,u x ), 1 i n; u D(E) a fresh identity; σ: u 1 : C x = 5 :σ Sactlang ε: :ε 20/47

21 Sequential Composition of Transformers Sequential composition t 1 t 2 of transformers t 1 and t 2 is canonically defined as with observation (t 2 t 1 )[u x ](σ,ε) = t 2 [u x ](t 1 [u x ](σ,ε)) Obs (t2 t 1 )[u x ](σ,ε) = Obs t1 [u x ](σ,ε) Obs t2 [u x ](t 1 (σ,ε)). Clear: not defined if one the two intermediate micro steps is not defined Sactlang 21/47

22 Transformers And Denotational Semantics Observation: our transformers are in principle the denotational semantics of the actions/action sequences. The trivial case, to be precise. Note: with the previous examples, we can capture empty statements, skips, assignments, conditionals (by normalisation and auxiliary variables), create/destroy (later), but not possibly diverging loops Sactlang Our (Simple) Approach: if the action language is, e.g. Java, then (syntactically) forbid loops and calls of recursive functions. Other Approach: use full blown denotational semantics. No show-stopper, because loops in the action annotation can be converted into transition cycles in the state machine. 22/47

23 References 46/ main

24 References Harel, D. and Gery, E. (1997). Executable object modeling with statecharts. IEEE Computer, 30(7): OMG (2011a). Unified modeling language: Infrastructure, version Technical Report formal/ OMG (2011b). Unified modeling language: Superstructure, version Technical Report formal/ main 47/47

Software Design, Modelling and Analysis in UML

Software Design, Modelling and Analysis in UML Software Design, Modelling and Analysis in UML Lecture 14: Core State Machines IV 2013-12-18 14 2013-12-18 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany

More information

Lecture 04: OCL Semantics

Lecture 04: OCL Semantics Software Design, Modelling and Analysis in UML Lecture 04: OCL Semantics 2014-10-30 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal 04 2014-10-30 main Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

Lecture 2: Semantical Model

Lecture 2: Semantical Model Software Design, Modelling and Analysis in UML Lecture 2: Semantical Model 2016-10-20 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 2 2016-10-20 main ->enable_water();

More information

Lecture 05: Duration Calculus III

Lecture 05: Duration Calculus III Real-Time Systems Lecture 05: Duration Calculus III 2014-05-20 Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: DC Syntax and Semantics: Formulae This Lecture:

More information

Lecture 03: Duration Calculus I

Lecture 03: Duration Calculus I Real-Time Systems Lecture 03: Duration Calculus I 2014-05-08 Dr. Bernd Westphal 03 2014-05-08 main Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: Model of timed behaviour:

More information

Lecture 4: OCL Semantics

Lecture 4: OCL Semantics Software Design, Modelling and Analysis in UML Lecture 4: OCL Semantics 2016-11-03 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 4 2016-11-03 main Content

More information

Lecture 11: Timed Automata

Lecture 11: Timed Automata Real-Time Systems Lecture 11: Timed Automata 2014-07-01 11 2014-07-01 main Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: DC (un)decidability This Lecture:

More information

Real-Time Systems. Lecture 10: Timed Automata Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany main

Real-Time Systems. Lecture 10: Timed Automata Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany main Real-Time Systems Lecture 10: Timed Automata 2013-06-04 10 2013-06-04 main Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: PLC, PLC automata This Lecture:

More information

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach

EDA045F: Program Analysis LECTURE 10: TYPES 1. Christoph Reichenbach EDA045F: Program Analysis LECTURE 10: TYPES 1 Christoph Reichenbach In the last lecture... Performance Counters Challenges in Dynamic Performance Analysis Taint Analysis Binary Instrumentation 2 / 44 Types

More information

Real-Time Systems. Lecture 15: The Universality Problem for TBA Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany

Real-Time Systems. Lecture 15: The Universality Problem for TBA Dr. Bernd Westphal. Albert-Ludwigs-Universität Freiburg, Germany Real-Time Systems Lecture 15: The Universality Problem for TBA 2013-06-26 15 2013-06-26 main Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents & Goals Last Lecture: Extended Timed

More information

How do PLC look like? What s special about PLC? What is a PLC? /50 2/50 5/50 6/50 3/ Splc main

How do PLC look like? What s special about PLC? What is a PLC? /50 2/50 5/50 6/50 3/ Splc main http://wikimedia.org (public domain) How do PLC look like? Albert-Ludwigs-Universität Freiburg, Germany Dr. Bernd Westphal 2013-05-29 Lecture 09: PLC Automata Real-ime Systems 4/50 http://wikimedia.org

More information

Formal Conformance Testing 2006

Formal Conformance Testing 2006 Formal Conformance Testing 2006 Lecture 1 14th Sep 2006 Welcome! This is T-79.5304: Formal Conformance Testing Lectures from 10 to 12 am, no regular tutorials Cancellations and other notes at the web page

More information

Formal Methods for Java

Formal Methods for Java Formal Methods for Java Lecture 20: Sequent Calculus Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg January 15, 2013 Jochen Hoenicke (Software Engineering) Formal Methods for Java

More information

Reasoning About Imperative Programs. COS 441 Slides 10b

Reasoning About Imperative Programs. COS 441 Slides 10b Reasoning About Imperative Programs COS 441 Slides 10b Last time Hoare Logic: { P } C { Q } Agenda If P is true in the initial state s. And C in state s evaluates to s. Then Q must be true in s. Program

More information

Theoretical Foundations of the UML Lecture 18: Statecharts Semantics (1)

Theoretical Foundations of the UML Lecture 18: Statecharts Semantics (1) Theoretical Foundations of the UML Lecture 18: Statecharts Semantics (1) Joost-Pieter Katoen Lehrstuhl für Informatik 2 Software Modeling and Verification Group http://moves.rwth-aachen.de/teaching/ws-1415/uml/

More information

CS422 - Programming Language Design

CS422 - Programming Language Design 1 CS422 - Programming Language Design Denotational Semantics Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 Denotational semantics, also known as fix-point semantics,

More information

A Sample State Machine

A Sample State Machine A Sample State Machine Environment Signatures An environment signature is a triple of sets of guards, actions, and messages. H = (G H, A H, M H ) Guards: formulas in some logical language, e.g. OCL. Actions

More information

Lecture 10: Live Sequence Charts Cont d

Lecture 10: Live Sequence Charts Cont d Softwaretechnik / Software-Engineering Lecture 10: Live Sequence Charts Cont d 2015-06-15 10 2015-06-15 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany

More information

Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Winter Term 2016/17

Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Winter Term 2016/17 Decision Procedures Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg Winter Term 2016/17 Jochen Hoenicke (Software Engineering) Decision Procedures Winter Term 2016/17 1 / 436 Program

More information

Denotational Semantics of Programs. : SimpleExp N.

Denotational Semantics of Programs. : SimpleExp N. Models of Computation, 2010 1 Denotational Semantics of Programs Denotational Semantics of SimpleExp We will define the denotational semantics of simple expressions using a function : SimpleExp N. Denotational

More information

Limitations of OCAML records

Limitations of OCAML records Limitations of OCAML records The record types must be declared before they are used; a label e can belong to only one record type (otherwise fun x x.e) would have several incompatible types; we cannot

More information

Benefits of Interval Temporal Logic for Specification of Concurrent Systems

Benefits of Interval Temporal Logic for Specification of Concurrent Systems Benefits of Interval Temporal Logic for Specification of Concurrent Systems Ben Moszkowski Software Technology Research Laboratory De Montfort University Leicester Great Britain email: benm@dmu.ac.uk http://www.tech.dmu.ac.uk/~benm

More information

Discrete Dynamics Finite State Machines גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון

Discrete Dynamics Finite State Machines גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון Discrete Dynamics Finite State Machines גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון 2 Recap: Actor Model An actor is a mapping of input signals to output signals S: R R k R R m where k is the number

More information

Semantics and Verification of Software

Semantics and Verification of Software Semantics and Verification of Software Thomas Noll Software Modeling and Verification Group RWTH Aachen University http://moves.rwth-aachen.de/teaching/ss-15/sv-sw/ The Denotational Approach Denotational

More information

1 Introduction. 2 Recap The Typed λ-calculus λ. 3 Simple Data Structures

1 Introduction. 2 Recap The Typed λ-calculus λ. 3 Simple Data Structures CS 6110 S18 Lecture 21 Products, Sums, and Other Datatypes 1 Introduction In this lecture, we add constructs to the typed λ-calculus that allow working with more complicated data structures, such as pairs,

More information

Lecture 9: Live Sequence Charts

Lecture 9: Live Sequence Charts Softwaretechnik / Software-Engineering Lecture 9: Live Sequence Charts 2017-06-19 Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 9 2017-06-19 main Topic Area

More information

Formal Methods for Java

Formal Methods for Java Formal Methods for Java Lecture 12: Soundness of Sequent Calculus Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg June 12, 2017 Jochen Hoenicke (Software Engineering) Formal Methods

More information

Research Report 326 ISBN ISSN

Research Report 326 ISBN ISSN University of Oslo Department of Informatics How to transform UML neg into a useful construct Ragnhild Kobro Runde, Øystein Haugen, Ketil Stølen Research Report 326 ISBN 82-7368-280-3 ISSN 0806-3036 November

More information

Lecture 15: Software Quality Assurance

Lecture 15: Software Quality Assurance Softwaretechnik / Software-Engineering Lecture 15: Software Quality Assurance 2015-07-09 15 2015-07-09 main Prof. Dr. Andreas Podelski, Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany Contents

More information

Lecture 9: DC Implementables II

Lecture 9: DC Implementables II Real-Time Systems Lecture 9: DC Implementables II 2017-11-28 Dr. Bernd Westphal Albert-Ludwigs-Universität Freiburg, Germany 9 2017-11-28 main Content Correctness Proof for the Gas Burner Implementables

More information

Bringing class diagrams to life

Bringing class diagrams to life Bringing class diagrams to life Luis S. Barbosa & Sun Meng DI-CCTC, Minho University, Braga & CWI, Amsterdam UML & FM Workshop 2009 Rio de Janeiro 8 December, 2009 Formal Methods proofs problems structures

More information

Lecture 05: High-Level Design with SysML. An Introduction to SysML. Where are we? What is a model? The Unified Modeling Language (UML)

Lecture 05: High-Level Design with SysML. An Introduction to SysML. Where are we? What is a model? The Unified Modeling Language (UML) Where are we? Systeme hoher Sicherheit und Qualität Universität Bremen, WS 2017/2018 Lecture 05: High-Level Design with SysML Christoph Lüth, Dieter Hutter, Jan Peleska 01: Concepts of Quality 02: Legal

More information

G54FOP: Lecture 17 & 18 Denotational Semantics and Domain Theory III & IV

G54FOP: Lecture 17 & 18 Denotational Semantics and Domain Theory III & IV G54FOP: Lecture 17 & 18 Denotational Semantics and Domain Theory III & IV Henrik Nilsson University of Nottingham, UK G54FOP: Lecture 17 & 18 p.1/33 These Two Lectures Revisit attempt to define denotational

More information

Simply Typed Lambda Calculus

Simply Typed Lambda Calculus Simply Typed Lambda Calculus Language (ver1) Lambda calculus with boolean values t ::= x variable x : T.t abstraction tt application true false boolean values if ttt conditional expression Values v ::=

More information

Simply Typed Lambda-Calculi (II)

Simply Typed Lambda-Calculi (II) THEORY AND PRACTICE OF FUNCTIONAL PROGRAMMING Simply Typed Lambda-Calculi (II) Dr. ZHANG Yu Institute of Software, Chinese Academy of Sciences Fall term, 2011 GUCAS, Beijing Introduction PCF Programming

More information

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35 EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2014 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,

More information

Process Algebras and Concurrent Systems

Process Algebras and Concurrent Systems Process Algebras and Concurrent Systems Rocco De Nicola Dipartimento di Sistemi ed Informatica Università di Firenze Process Algebras and Concurrent Systems August 2006 R. De Nicola (DSI-UNIFI) Process

More information

Programming Language Concepts, CS2104 Lecture 3

Programming Language Concepts, CS2104 Lecture 3 Programming Language Concepts, CS2104 Lecture 3 Statements, Kernel Language, Abstract Machine 31 Aug 2007 CS2104, Lecture 3 1 Reminder of last lecture Programming language definition: syntax, semantics

More information

Structure. Background. them to their higher order equivalents. functionals in Standard ML source code and converts

Structure. Background. them to their higher order equivalents. functionals in Standard ML source code and converts Introduction 3 Background functionals factor out common behaviour map applies a function to every element of a list fun map [ ] = [ ] map f ( x : : xs ) = f x : : map f xs filter keeps only those elements

More information

An Operational Semantics for the Dataflow Algebra. A. J. Cowling

An Operational Semantics for the Dataflow Algebra. A. J. Cowling Verification and Testing Research Group, Department of Computer Science, University of Sheffield, Regent Court, 211, Portobello Street, Sheffield, S1 4DP, United Kingdom Email: A.Cowling @ dcs.shef.ac.uk

More information

A Logic Primer. Stavros Tripakis University of California, Berkeley

A Logic Primer. Stavros Tripakis University of California, Berkeley EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2015 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,

More information

CMSC 631 Program Analysis and Understanding Fall Abstract Interpretation

CMSC 631 Program Analysis and Understanding Fall Abstract Interpretation Program Analysis and Understanding Fall 2017 Abstract Interpretation Based on lectures by David Schmidt, Alex Aiken, Tom Ball, and Cousot & Cousot What is an Abstraction? A property from some domain Blue

More information

Theoretical Foundations of the UML

Theoretical Foundations of the UML Theoretical Foundations of the UML Lecture 17+18: A Logic for MSCs Joost-Pieter Katoen Lehrstuhl für Informatik 2 Software Modeling and Verification Group moves.rwth-aachen.de/teaching/ws-1718/fuml/ 5.

More information

Formal Analysis of UML/OCL Models

Formal Analysis of UML/OCL Models Formal Analysis of UML/OCL Models Achim D. Brucker Vincenz-Priessnitz-Str. 1, 76131 Karlsruhe, Germany achim.brucker@sap.com University Bremen Computer Science Colloqium Bremen, 29th October 2008 Outline

More information

Formalizing Non-Concurrent UML State Machines Using Colored Petri Nets

Formalizing Non-Concurrent UML State Machines Using Colored Petri Nets 1 Formalizing Non-Concurrent UML State Machines Using Colored Petri Nets Étienne André, Christine Choppy, Kais Klai LIPN, CNRS UMR 7030, Université Paris 13, France e-mail: {first.last}@lipn.univ-paris13.fr

More information

COMP 3161/9161 Week 2

COMP 3161/9161 Week 2 Concepts of Programming Languages Judgements, Inference Rules & Proofs Lecturer: Gabriele Keller Tutor: Liam O Connor University of New South Wales School of Computer Sciences & Engineering Sydney, Australia

More information

Program Analysis Probably Counts

Program Analysis Probably Counts Probably Counts 1 c.hankin@imperial.ac.uk joint work with Alessandra Di Pierro 2 and Herbert Wiklicky 1 1 Department of Computing, 2 Dipartimento di Informatica, Università di Verona Computer Journal Lecture,

More information

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

Semantics of UML state machines

Semantics of UML state machines 1 Otto-von-Guericke Universität Magdeburg, Germany May 27, 2015 A Sample State Machine stm ATM Behaviour Idle usercom.card(c) / cardid = c CardEntered usercom.pin(p) / pin = p PINEntered [trialsnum >=

More information

Static Program Analysis

Static Program Analysis Static Program Analysis Xiangyu Zhang The slides are compiled from Alex Aiken s Michael D. Ernst s Sorin Lerner s A Scary Outline Type-based analysis Data-flow analysis Abstract interpretation Theorem

More information

Embedded Systems 2. REVIEW: Actor models. A system is a function that accepts an input signal and yields an output signal.

Embedded Systems 2. REVIEW: Actor models. A system is a function that accepts an input signal and yields an output signal. Embedded Systems 2 REVIEW: Actor models A system is a function that accepts an input signal and yields an output signal. The domain and range of the system function are sets of signals, which themselves

More information

Mathematical Foundations of Programming. Nicolai Kraus. Draft of February 15, 2018

Mathematical Foundations of Programming. Nicolai Kraus. Draft of February 15, 2018 Very short lecture notes: Mathematical Foundations of Programming University of Nottingham, Computer Science, module code G54FOP, Spring 2018 Nicolai Kraus Draft of February 15, 2018 What is this? This

More information

Lecture Notes: Program Analysis Correctness

Lecture Notes: Program Analysis Correctness Lecture Notes: Program Analysis Correctness 15-819O: Program Analysis Jonathan Aldrich jonathan.aldrich@cs.cmu.edu Lecture 5 1 Termination As we think about the correctness of program analysis, let us

More information

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany Softwaretechnik Lecture 13: Design by Contract Peter Thiemann University of Freiburg, Germany 25.06.2012 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

CS522 - Programming Language Semantics

CS522 - Programming Language Semantics 1 CS522 - Programming Language Semantics Simply Typed Lambda Calculus Grigore Roşu Department of Computer Science University of Illinois at Urbana-Champaign 2 We now discuss a non-trivial extension of

More information

Hoare Logic and Model Checking

Hoare Logic and Model Checking Hoare Logic and Model Checking Kasper Svendsen University of Cambridge CST Part II 2016/17 Acknowledgement: slides heavily based on previous versions by Mike Gordon and Alan Mycroft Introduction In the

More information

Denotational semantics

Denotational semantics Denotational semantics The method define syntax (syntactic domains) define semantic domains define semantic functions use compositional definitions Andrzej Tarlecki: Semantics & Verification - 63 - Syntactic

More information

T Reactive Systems: Temporal Logic LTL

T Reactive Systems: Temporal Logic LTL Tik-79.186 Reactive Systems 1 T-79.186 Reactive Systems: Temporal Logic LTL Spring 2005, Lecture 4 January 31, 2005 Tik-79.186 Reactive Systems 2 Temporal Logics Temporal logics are currently the most

More information

Towards a formal language for systemic requirements

Towards a formal language for systemic requirements Towards a formal language for systemic requirements LIX, Yann Hourdel École Polytechnique, 91128 Palaiseau Cedex, France, yann.hourdel@polytechnique.edu Abstract. This work is an attempt to contribute

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

Normalization by Evaluation

Normalization by Evaluation Normalization by Evaluation Andreas Abel Department of Computer Science and Engineering Chalmers and Gothenburg University PhD Seminar in Mathematical Engineering EAFIT University, Medellin, Colombia 9

More information

Modeling and Analysis of Communicating Systems

Modeling and Analysis of Communicating Systems Modeling and Analysis of Communicating Systems Lecture 5: Sequential Processes Jeroen Keiren and Mohammad Mousavi j.j.a.keiren@vu.nl and m.r.mousavi@hh.se Halmstad University March 2015 Outline Motivation

More information

Operational Semantics

Operational Semantics Operational Semantics Semantics and applications to verification Xavier Rival École Normale Supérieure Xavier Rival Operational Semantics 1 / 50 Program of this first lecture Operational semantics Mathematical

More information

A Short Introduction to Hoare Logic

A Short Introduction to Hoare Logic A Short Introduction to Hoare Logic Supratik Chakraborty I.I.T. Bombay June 23, 2008 Supratik Chakraborty (I.I.T. Bombay) A Short Introduction to Hoare Logic June 23, 2008 1 / 34 Motivation Assertion checking

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

Lecture Notes on Data Abstraction

Lecture Notes on Data Abstraction Lecture Notes on Data Abstraction 15-814: Types and Programming Languages Frank Pfenning Lecture 14 October 23, 2018 1 Introduction Since we have moved from the pure λ-calculus to functional programming

More information

Improved Algorithms for Module Extraction and Atomic Decomposition

Improved Algorithms for Module Extraction and Atomic Decomposition Improved Algorithms for Module Extraction and Atomic Decomposition Dmitry Tsarkov tsarkov@cs.man.ac.uk School of Computer Science The University of Manchester Manchester, UK Abstract. In recent years modules

More information

Axiomatic Semantics. Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11 CSE

Axiomatic Semantics. Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11 CSE Axiomatic Semantics Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11 CSE 6341 1 Outline Introduction What are axiomatic semantics? First-order logic & assertions about states Results (triples)

More information

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany

Softwaretechnik. Lecture 13: Design by Contract. Peter Thiemann University of Freiburg, Germany Softwaretechnik Lecture 13: Design by Contract Peter Thiemann University of Freiburg, Germany 25.06.2012 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

CS481F01 Solutions 8

CS481F01 Solutions 8 CS481F01 Solutions 8 A. Demers 7 Dec 2001 1. Prob. 111 from p. 344 of the text. One of the following sets is r.e. and the other is not. Which is which? (a) { i L(M i ) contains at least 481 elements }

More information

Axiomatic Semantics. Operational semantics. Good for. Not good for automatic reasoning about programs

Axiomatic Semantics. Operational semantics. Good for. Not good for automatic reasoning about programs Review Operational semantics relatively l simple many flavors (small vs. big) not compositional (rule for while) Good for describing language implementation reasoning about properties of the language eg.

More information

High-Level Small-Step Operational Semantics for Transactions (Technical Companion)

High-Level Small-Step Operational Semantics for Transactions (Technical Companion) High-Level Small-Step Operational Semantics for Transactions (Technical Companion) Katherine F. Moore, Dan Grossman July 15, 2007 Abstract This document is the technical companion to our POPL 08 submission

More information

Static Program Analysis using Abstract Interpretation

Static Program Analysis using Abstract Interpretation Static Program Analysis using Abstract Interpretation Introduction Static Program Analysis Static program analysis consists of automatically discovering properties of a program that hold for all possible

More information

Notes on BAN Logic CSG 399. March 7, 2006

Notes on BAN Logic CSG 399. March 7, 2006 Notes on BAN Logic CSG 399 March 7, 2006 The wide-mouthed frog protocol, in a slightly different form, with only the first two messages, and time stamps: A S : A, {T a, B, K ab } Kas S B : {T s, A, K ab

More information

Performance Modeling of Distributed Collaboration Services with Independent Inputs/Outputs

Performance Modeling of Distributed Collaboration Services with Independent Inputs/Outputs Performance Modeling of Distributed Collaboration Services with Independent Inputs/Outputs Toqeer Israr, Gregor v Bochmann Department of Electrical Engineering and Computer Science University of Ottawa

More information

Compiling Techniques

Compiling Techniques Lecture 7: Abstract Syntax 13 October 2015 Table of contents Syntax Tree 1 Syntax Tree Semantic Actions Examples Abstract Grammar 2 Internal Representation AST Builder 3 Visitor Processing Semantic Actions

More information

Roy L. Crole. Operational Semantics Abstract Machines and Correctness. University of Leicester, UK

Roy L. Crole. Operational Semantics Abstract Machines and Correctness. University of Leicester, UK Midlands Graduate School, University of Birmingham, April 2008 1 Operational Semantics Abstract Machines and Correctness Roy L. Crole University of Leicester, UK Midlands Graduate School, University of

More information

Truth-Functional Logic

Truth-Functional Logic Truth-Functional Logic Syntax Every atomic sentence (A, B, C, ) is a sentence and are sentences With ϕ a sentence, the negation ϕ is a sentence With ϕ and ψ sentences, the conjunction ϕ ψ is a sentence

More information

Software Engineering

Software Engineering Software Engineering Lecture 07: Design by Contract Peter Thiemann University of Freiburg, Germany 02.06.2014 Table of Contents Design by Contract Contracts for Procedural Programs Contracts for Object-Oriented

More information

Lecture 4 Event Systems

Lecture 4 Event Systems Lecture 4 Event Systems This lecture is based on work done with Mark Bickford. Marktoberdorf Summer School, 2003 Formal Methods One of the major research challenges faced by computer science is providing

More information

Abstracting real-valued parameters in parameterised boolean equation systems

Abstracting real-valued parameters in parameterised boolean equation systems Department of Mathematics and Computer Science Formal System Analysis Research Group Abstracting real-valued parameters in parameterised boolean equation systems Master Thesis M. Laveaux Supervisor: dr.

More information

On Real-time Monitoring with Imprecise Timestamps

On Real-time Monitoring with Imprecise Timestamps On Real-time Monitoring with Imprecise Timestamps David Basin 1, Felix Klaedtke 2, Srdjan Marinovic 1, and Eugen Zălinescu 1 1 Institute of Information Security, ETH Zurich, Switzerland 2 NEC Europe Ltd.,

More information

Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions

Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions Chapter 1 Classical Program Logics: Hoare Logic, Weakest Liberal Preconditions 1.1 The IMP Language IMP is a programming language with an extensible syntax that was developed in the late 1960s. We will

More information

Axiomatic Semantics. Lecture 9 CS 565 2/12/08

Axiomatic Semantics. Lecture 9 CS 565 2/12/08 Axiomatic Semantics Lecture 9 CS 565 2/12/08 Axiomatic Semantics Operational semantics describes the meaning of programs in terms of the execution steps taken by an abstract machine Denotational semantics

More information

A Certified Denotational Abstract Interpreter (Proof Pearl)

A Certified Denotational Abstract Interpreter (Proof Pearl) A Certified Denotational Abstract Interpreter (Proof Pearl) David Pichardie INRIA Rennes David Cachera IRISA / ENS Cachan (Bretagne) Static Analysis Static Analysis Static analysis by abstract interpretation

More information

Lecture 07: Formal Methods for Requirements Engineering

Lecture 07: Formal Methods for Requirements Engineering 1 2015-04-20 main 1 2015-04-20 main 07 2015-05-21 Sprelim Softwaretechnik / Software-Engineering Lecture 07: Formal Methods for Requirements Engineering 2015-05-21 Prof. Dr. Andreas Podelski, Dr. Bernd

More information

Algorithmic Completeness of BSP Languages

Algorithmic Completeness of BSP Languages Algorithmic Completeness of BSP Languages Yoann Marquer, Frédéric Gava Abstract The Bulk-Synchronous Parallel (BSP) bridging model is a candidate for a simple and practical inition for High Performance

More information

Dynamic Noninterference Analysis Using Context Sensitive Static Analyses. Gurvan Le Guernic July 14, 2007

Dynamic Noninterference Analysis Using Context Sensitive Static Analyses. Gurvan Le Guernic July 14, 2007 Dynamic Noninterference Analysis Using Context Sensitive Static Analyses Gurvan Le Guernic July 14, 2007 1 Abstract This report proposes a dynamic noninterference analysis for sequential programs. This

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 3 January 9, 2017 January 9, 2017 CS21 Lecture 3 1 Outline NFA, FA equivalence Regular Expressions FA and Regular Expressions January 9, 2017 CS21 Lecture 3 2

More information

Extending the Lambda Calculus: An Eager Functional Language

Extending the Lambda Calculus: An Eager Functional Language Syntax of the basic constructs: Extending the Lambda Calculus: An Eager Functional Language canonical forms z cfm ::= intcfm boolcfm funcfm tuplecfm altcfm intcfm ::= 0 1-1... boolcfm ::= boolconst funcfm

More information

Hoare Logic (I): Axiomatic Semantics and Program Correctness

Hoare Logic (I): Axiomatic Semantics and Program Correctness Hoare Logic (I): Axiomatic Semantics and Program Correctness (Based on [Apt and Olderog 1991; Gries 1981; Hoare 1969; Kleymann 1999; Sethi 199]) Yih-Kuen Tsay Dept. of Information Management National Taiwan

More information

Opus: University of Bath Online Publication Store

Opus: University of Bath Online Publication Store Lam, V. S. W. (2006) A formal execution semantics and rigorous analytical approach for communicating UML statechart diagrams. Other. Department of Computer Science, University of Bath. Link to official

More information

Lecture 16: Computation Tree Logic (CTL)

Lecture 16: Computation Tree Logic (CTL) Lecture 16: Computation Tree Logic (CTL) 1 Programme for the upcoming lectures Introducing CTL Basic Algorithms for CTL CTL and Fairness; computing strongly connected components Basic Decision Diagrams

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Organization Prof. Dr. Joel Greenyer April 11, 2013 Organization Lecture: Thursdays, 10:15 11:45, F 128 Tutorial: Thursdays, 13:00 13:45, G 323 first

More information

Programming Languages and Types

Programming Languages and Types Programming Languages and Types Klaus Ostermann based on slides by Benjamin C. Pierce Where we re going Type Systems... Type systems are one of the most fascinating and powerful aspects of programming

More information

An Indian Journal FULL PAPER ABSTRACT KEYWORDS. Trade Science Inc.

An Indian Journal FULL PAPER ABSTRACT KEYWORDS. Trade Science Inc. [Type text] [Type text] [Type text] ISSN : 0974-7435 Volume 10 Issue 11 BioTechnology 2014 An Indian Journal FULL PAPER BTAIJ, 10(11), 2014 [5576-5583] Research on the probability of extended UML state

More information

Lecture 14: Recursive Languages

Lecture 14: Recursive Languages Lecture 14: Recursive Languages Instructor: Ketan Mulmuley Scriber: Yuan Li February 24, 2015 1 Recursive Languages Definition 1.1. A language L Σ is called recursively enumerable (r. e.) or computably

More information

Programming with classical quantum datatypes

Programming with classical quantum datatypes Programming with classical quantum datatypes Robin Cockett & Brett Giles (robin,gilesb)@cpsc.ucalgary.ca University of Calgary FMCS 2006, Programming with classical quantum datatypes p. 1/49 Yet another

More information

Modeling Synchronous Systems in BIP

Modeling Synchronous Systems in BIP Unité Mixte de Recherche 5104 CNRS - INPG - UJF Centre Equation 2, avenue de VIGNATE F-38610 GIERES tel : +33 456 52 03 40 fax : +33 456 52 03 50 http://www-verimag.imag.fr Modeling Synchronous Systems

More information

Introduction to lambda calculus Part 2

Introduction to lambda calculus Part 2 Introduction to lambda calculus Part 2 Antti-Juhani Kaijanaho 2017-01-24... 1 Untyped lambda calculus 1.1 Syntax... x, y, z Var t, u Term t, u ::= x t u λx t... In this document, I will be using the following

More information