Dynamic Logic with Non-rigid Functions

Size: px
Start display at page:

Download "Dynamic Logic with Non-rigid Functions"

Transcription

1 Dynamic Logic with Non-rigid Functions A Basis for Object-oriented Program Verification Bernhard Beckert 1 André Platzer 2 1 University of Koblenz-Landau, Department of Computer Science beckert@uni-koblenz.de 2 University of Oldenburg, Department of Computing Science platzer@informatik.uni-oldenburg.de 3rd International Joint Conference on Automated Reasoning B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 1 / 13

2 Object-oriented Dynamic Logic Java Card While B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 2 / 13

3 Object-oriented Dynamic Logic Java Card ODL While ODL only contains essentials of object-orientation. B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 2 / 13

4 Object-oriented Dynamic Logic Java Card ODL While Theoretical investigations Program verification ODL only contains essentials of object-orientation. Natural representation of object-orientation. B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 2 / 13

5 Object-oriented Dynamic Logic Java Card ODL While Theoretical investigations Program verification ODL only contains essentials of object-orientation. Natural representation of object-orientation. B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 2 / 13

6 Outline 1 Motivation 2 The Logic ODL 3 Java ODL Object Creation 4 Calculus State Updates Inference Rules Verification Example Completeness 5 Conclusions & Future Work B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 2 / 13

7 Outline 1 Motivation 2 The Logic ODL 3 Java ODL Object Creation 4 Calculus State Updates Inference Rules Verification Example Completeness 5 Conclusions & Future Work B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 2 / 13

8 The Logic ODL Definition (Type system) nat Object int Date String Null B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 3 / 13

9 The Logic ODL Definition (Object enumerator symbols) obj C : nat C (disjoint bijections for object-types C) Example obj C (3) Definition (Non-rigid function symbols)... change value during program execution & represent object attributes. Example x.a a(x) B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 3 / 13

10 The Logic ODL Definition (Formulas φ).,,,,,,, = (first-order part) [α]φ, α φ (dynamic part) Definition (Programs α) α; γ, if(φ) α else γ, while(φ) α (control-structure) f (t) := t (state update) Details B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 3 / 13

11 The Logic ODL Definition (Formulas φ).,,,,,,, = (first-order part) [α]φ, α φ (dynamic part) Definition (Programs α) α; γ, if(φ) α else γ, while(φ) α (control-structure) f (t) := t, g(r) := r (state update) Details B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 3 / 13

12 Outline 1 Motivation 2 The Logic ODL 3 Java ODL Object Creation 4 Calculus State Updates Inference Rules Verification Example Completeness 5 Conclusions & Future Work B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 3 / 13

13 Java ODL Simple & natural translation of Object creation Dynamic dispatch Side-effects Exception handling Inner classes B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 4 / 13

14 Java ODL: Object Creation Example (Transformation) x := new C() x := obj C (next C), next C := next C + 1 B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 5 / 13

15 Java ODL: Object Creation Example (Transformation) x := new C() x := obj C (next C), next C := next C + 1 Object identity new new Example x := new C(); x := obj C (next C ); //next C := next C + 1 y := new C(); y := obj C (next C + 1) //x y B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 5 / 13

16 Java ODL: Object Creation Example (Transformation) x := new C() x := obj C (next C), next C := next C + 1 Object identity new new Dynamic type checks Example nat Object int Date String Null t instanceof String n : nat t. = obj String (n) B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 5 / 13

17 Outline 1 Motivation 2 The Logic ODL 3 Java ODL Object Creation 4 Calculus State Updates Inference Rules Verification Example Completeness 5 Conclusions & Future Work B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 5 / 13

18 Calculus: State Updates (merge & promote) Merge updates U f (t) := t φ Last change is most recent U, f ( U t) := U t φ Example g(a) := t f (g(a)) := h(g(a)) φ g(a) := t, f (t) := h(t) φ B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 6 / 13

19 Calculus: State Updates (merge & promote) Merge updates U f (t) := t φ U, f ( U t) := U t φ Promote updates Last change is most recent f (t) := t, g(t) := c, f (s) := s f (a) B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 6 / 13

20 Calculus: State Updates (merge & promote) Merge updates U f (t) := t φ U, f ( U t) := U t φ Last change is most recent Promote updates f (t) := t, g(t) := c, f (s) := s f (a) f f (t) := t, f (s) := s B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 6 / 13

21 Calculus: State Updates (merge & promote) Merge updates U f (t) := t φ U, f ( U t) := U t φ Last change is most recent Promote updates f (t) := t, g(t) := c, f (s) := s f (a) f f (t) := t, f (s) := s f (a) B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 6 / 13

22 Calculus: State Updates (merge & promote) Merge updates U f (t) := t φ U, f ( U t) := U t φ Last change is most recent Promote updates f (t) := t, g(t) := c, f (s) := s f (a) f f (t) := t, f (s) := s f (a) if s =. a then s else... fi B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 6 / 13

23 Calculus: State Updates (merge & promote) Merge updates U f (t) := t φ U, f ( U t) := U t φ Last change is most recent Promote updates f (t) := t, g(t) := c, f (s) := s f (a) f f (t) := t, f (s) := s f (a) if s =. a then s else if t =. a then t else f (a) fi fi B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 6 / 13

24 Calculus: State Updates (merge & promote) Merge updates U f (t) := t φ U, f ( U t) := U t φ Last change is most recent Promote updates U f (t) := t, g(t) := c, f (s) := s f (a) f f (t) := t, f (s) := s f (a) if s =. U a then s else if t =. U a then t else f ( U a) fi fi B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 6 / 13

25 Calculus: First-order Part 18 rules A A A, B A B A B A B A B A B A A A B A B A, B A B A B A B A X x x A A t x, x A x A A X x x A A t x, x A x A A A Γ t t, t. = t t t Γ, t. = t t. = t A A Γ t t, t. = t t t Γ, t. = t φ(0) φ(x ) φ(x +1) n φ(n) B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 7 / 13

26 Calculus: Program Logic Part 12 rules α γ φ α; γ φ (e α φ) ( e γ φ) if(e) α else γ φ (e φ(t)) ( e φ(t )) φ(if e then t else t fi) if(e) {α; while(e) α} φ while(e) α φ A B x A x B obj C (i). = obj C (j) i (obj C (i). = obj D (j)). = j o : C (o instanceof C o. = null) Γ U p, p, e [α]p p, e φ A B α A α B Γ U [while(e) α]φ, U f (u) if s ir. = U u then tir else... if s i1. = U u then ti1 else f ( U u) fi... fi Ũ U φ ˆŨ, f 1 ( Ũ s 1 ) := Ũ t 1,..., f n( Ũ s n) := Ũ t n φ B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 8 / 13

27 Verification Example c l a s s E { s t a t i c i n t g ; i n t i d ; E generate ( ) {E r=new E ( ) ; r. i d=g ; g=g+5; return r ; } } x:e (x.id < g [generate] (x.id < r.id)) B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

28 Verification Example c l a s s E { s t a t i c i n t g ; i n t i d ; E generate ( ) {E r=new E ( ) ; r. i d=g ; g=g+5; return r ; } } x:e (x.id < g [generate] (x.id < r.id)) X.id < g, o(n) =.... X X.id < g X.id < g, o(n) =. X g < g X.id < g ( o(n) =. X X.id < g) (o(n) =. X g < g) X.id < g (if o(n) =. X then g else X.id fi) < g X.id < g r := o(n), n := n+1, o(n).id := g, g := g + 5 (X.id < r.id) X.id < g r := o(n), n := n+1, o(n).id := g [g := g + 5] (X.id < r.id) X.id < g r := o(n), n := n+1 [r.id := g][g := g + 5] (X.id < r.id) X.id < g r := o(n), n := n+1 [r.id := g; g := g + 5] (X.id < r.id) X.id < g [α] (X.id < r.id) X.id < g [α] (X.id < r.id) x:e (x.id < g [α] (x.id < r.id)) B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

29 Relative Completeness Theorem (Relative completeness) ODL calculus is complete w.r.t. first-order arithmetic: φ implies Taut Arith φ Proof Outline B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

30 Outline 1 Motivation 2 The Logic ODL 3 Java ODL Object Creation 4 Calculus State Updates Inference Rules Verification Example Completeness 5 Conclusions & Future Work B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

31 Future Work Verification components as add-on rules Parametric genericity B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

32 Conclusions ODL is essentials-only object-oriented dynamic logic: 1 object type system 2 object enumerators 3 non-rigid functions Natural translation Java ODL. Calculus proven sound & relatively complete w.r.t. arithmetic. B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

33 Outline 6 The Logic ODL (Details) Syntax Semantics 7 Transformation (Details) Object Creation Side-effects Exception Handling Dynamic Dispatch 8 Calculus (Details) Calculus of Object Creation - Details Calculus of State Updates - Details Completeness Proof Misc B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06-1 / 13

34 The Logic ODL: Syntax Definition (Type system) Type lattice with natural numbers N and finite subtypes B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 0 / 13

35 The Logic ODL: Semantics Definition (Semantics of programs) 1 (s, s ) ρ I,β (f 1 (t1 1,..., tk 1 1 ) := t 1,..., f n (tn, 1..., tn kn ) := t n ) : s = s 0, s = s n, and s i = s i 1 [f i (val I,β (s, ti 1),..., val I,β(s, t k i i )) val I,β (s, t i )] (1 i n). 2 (s, s ) ρ I,β (α; γ) : (s, u) ρ I,β (α) and (u, s ) ρ I,β (γ) for some state u. 3 (s, s ) ρ I,β (if(φ) α else γ) : val I,β (s, φ) = true and (s, s ) ρ I,β (α), or val I,β (s, φ) = false and (s, s ) ρ I,β (γ). 4 (s, s ) ρ I,β (while(φ) α) iff there are n N and s=s 0,..., s n =s for 0 i < n, val I,β (s i, φ) = true and (s i, s i+1 ) ρ I,β (α), and val I,β (s n, φ) = false. B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 1 / 13

36 Outline 6 The Logic ODL (Details) Syntax Semantics 7 Transformation (Details) Object Creation Side-effects Exception Handling Dynamic Dispatch 8 Calculus (Details) Calculus of Object Creation - Details Calculus of State Updates - Details Completeness Proof Misc B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 1 / 13

37 Java ODL: Object Creation Example (Transformation) x := new C() x := obj C (next C), next C := next C + 1 Object identity new new Dynamic type checks Example nat Object int Date String Null t instanceof Object n : nat ( t. = obj Date (n) t. = obj String (n) t. = obj Object (n) ) B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 2 / 13

38 Java ODL: Object Creation Example (Transformation) x := new C() x := obj C (next C), next C := next C + 1 Object identity new new Dynamic type checks B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 2 / 13

39 Java ODL: Side-effects a [ i ++] = b + b vi := i; i := i + 1; vb := b; b := b 1; a(vi) := vb + b i := i + 1, b := b 1, a(i) := b + (b 1) Return B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 4 / 13

40 Java ODL: Exception Handling t r y { while ( d!= 0) { i f ( d < 0) {throw new RangeEx ( d ) ; } e l s e {d=d 1;}} / do something / } catch ( RangeEx r ) {/ h a n d l e range /} E x c e p t i o n r = n u l l ; while ( r == n u l l && d!= 0) { i f ( d < 0) { r = new RangeEx ( d ) ; } e l s e {d=d 1;}} i f ( r == n u l l ) {/ do something /} e l s e i f ( r instanceof RangeEx ) {/ h a n d l e range /} e l s e { return r ; / p a s s up the c a l l t r a c e /} Return B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 6 / 13

41 Java ODL: Dynamic Dispatch c l a s s Car { i n t f o l l o w ( Car d ) {... } } c l a s s Van extends Car { i n t f o l l o w ( Car d ) {... } }... return b. f o l l o w ( d ) ; c l a s s Car { i n t C a r f o l l o w ( Car d ) {... } } c l a s s Van extends Car { i n t V a n f o l l o w ( Car d ) {... } }... i f ( b instanceof Van ) { return ( ( Van ) b ). V a n f o l l o w ( d ) ; } e l s e i f ( b instanceof Car ) { return ( ( Car ) b ). C a r f o l l o w ( d ) ; } e l s e {/ cannot happen when a l l t y p e s a r e known /} Type-casts expressible as v:van v. = b Return B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 8 / 13

42 Outline 6 The Logic ODL (Details) Syntax Semantics 7 Transformation (Details) Object Creation Side-effects Exception Handling Dynamic Dispatch 8 Calculus (Details) Calculus of Object Creation - Details Calculus of State Updates - Details Completeness Proof Misc B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 8 / 13

43 Calculus: Object Creation t instanceof C := n : nat Null<τ C t. = obj τ (n) (R31) (R32) o : C (o instanceof C o. = null) obj C (i). = obj C (j) i. = j B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR 06 9 / 13

44 Calculus: State Updates (merge & promote) Merge updates U f (t) := t φ U, f ( U t) := U t φ Last change is most recent Promote updates U f (t) := t, g(t) := c, f (s) := s f (a) f f (t) := t, f (s) := s f (a) if s =. U a then s else if t =. U a then t else f ( U a) fi fi B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

45 Calculus: State Updates (merge & promote) Merge updates U f (t) := t φ U, f ( U t) := U t φ Last change is most recent Promote updates ( U ) φ f (t) := t, g(t) := c, f (s) := s f (a) ( f ) φ f (t) := t, f (s) := s f (a) ( if s =. U a then s else if t =. ) φ U a then t else f ( U a) fi fi B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

46 Calculus: State Updates (merge & promote) Merge updates U f (t) := t φ U, f ( U t) := U t φ Last change is most recent Promote updates ( U ) φ f (t) := t, g(t) := c, f (s) := s f (a) ( f ) φ f (t) := t, f (s) := s f (a) ( if s =. U a then s else if t =. ) φ U a then t else f ( U a) fi fi ( s =. ) U a φ(s ) ( ) s U a... φ(f ( U a)) B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

47 Calculus: State Updates U f (u) if s ir. = U u then tir else... if s i1. = U u then ti1 else f ( U u) fi... fi where i 1 < < i r are all those indices with f ij = f, for some r 0 Example (State updates with aliasing) f (s) := t g(f (r)) g ( f (s) := t f (r) ) g ( if s =. r then t else f (r) fi ) ( s =. r g(t) ) ( ) s r g(f (r)) (R33) Ũ U φ Ũ, f1 ( Ũ s 1 ) := Ũ t 1,..., f n ( Ũ s n ) := Ũ t n φ B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

48 Relative Completeness Proof φ implies Taut N φ Proof. 1 propositionally complete 2 first-order complete 3 first-order expressible: φ F FOL φ F 4 term rewrites are Noetherian 5 (rel.) complete for first-order F α G 6 (rel.) complete for first-order dynamic typing Return B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

49 Use Cases in Java Card DL Use ODL object enumerators for object creation. Use quicker and rel. complete ODL within KeY in automatic verification scenarios. (Trafo combined with compiler construction technology) Import simpler ODL calculus into Java Card DL, for formulas that are sufficiently ODL. B. Beckert, A. Platzer (Koblenz, Oldenburg) Dynamic Logic with Non-rigid Functions IJCAR / 13

A First-Order Logic with First-Class Types

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

Formal Systems II: Applications

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

15-819M: Data, Code, Decisions

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

Introduction to JavaCard Dynamic Logic

Introduction to JavaCard Dynamic Logic Introduction to JavaCard Dynamic Logic Prof. P. H. Schmitt, Christian Engel, Benjamin Weiß December 10, 2008 Introduction to JavaCard Dynamic Logic December 10, 2008 1 / 13 Some Java Features Assignments,

More information

Fundamentals of Software Engineering

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

Software Engineering using Formal Methods

Software 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 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

Gradual Typing with Union and Intersection Types

Gradual Typing with Union and Intersection Types Gradual Typing with Union and Intersection Types Giuseppe Castagna, Victor Lanvin ICFP 17 September 6, 2017 1 / 14 Outline 1 Motivating Example 2 Types and Subtyping 3 Function Types and Operators 4 Conclusion

More information

Fundamentals of Software Engineering

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

A Logic of Proofs for Differential Dynamic Logic

A Logic of Proofs for Differential Dynamic Logic 1 A Logic of Proofs for Differential Dynamic Logic Toward Independently Checkable Proof Certificates for Differential Dynamic Logic Nathan Fulton Andrè Platzer Carnegie Mellon University CPP 16 February

More information

An Operational and Axiomatic Semantics for Non-determinism and Sequence Points in C

An Operational and Axiomatic Semantics for Non-determinism and Sequence Points in C An Operational and Axiomatic Semantics for Non-determinism and Sequence Points in C Robbert Krebbers Radboud University Nijmegen January 22, 2014 @ POPL, San Diego, USA 1 / 16 What is this program supposed

More information

Types and Programming Languages. Lecture 5. Extensions of simple types

Types and Programming Languages. Lecture 5. Extensions of simple types Types and Programming Languages Lecture 5. Extensions of simple types Xiaojuan Cai cxj@sjtu.edu.cn BASICS Lab, Shanghai Jiao Tong University Fall, 2016 Coming soon Simply typed λ-calculus has enough structure

More information

Compilation 2012 Static Type Checking

Compilation 2012 Static Type Checking Compilation 2012 Jan Midtgaard Michael I. Schwartzbach Aarhus University The Type Checker The type checker has several tasks: determine the types of all expressions check that values and variables are

More information

Handling Integer Arithmetic in the Verification of Java Programs

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

Static Type Checking. Static Type Checking. The Type Checker. Type Annotations. Types Describe Possible Values

Static Type Checking. Static Type Checking. The Type Checker. Type Annotations. Types Describe Possible Values The Type Checker Compilation 2007 The type checker has several tasks: determine the types of all expressions check that values and variables are used correctly resolve certain ambiguities by transformations

More information

Pierce Ch. 3, 8, 11, 15. Type Systems

Pierce Ch. 3, 8, 11, 15. Type Systems Pierce Ch. 3, 8, 11, 15 Type Systems Goals Define the simple language of expressions A small subset of Lisp, with minor modifications Define the type system of this language Mathematical definition using

More information

Software Verification for Java 5

Software 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 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

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

Typed First-order Logic

Typed 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 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

Programming Languages

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

Subtyping. Lecture 13 CS 565 3/27/06

Subtyping. Lecture 13 CS 565 3/27/06 Subtyping Lecture 13 CS 565 3/27/06 Polymorphism Different varieties of polymorphism: Parametric (ML) type variables are abstract, and used to encode the fact that the same term can be used in many different

More information

First-Class Type Classes

First-Class Type Classes First-Class Type Classes Matthieu Sozeau Joint work with Nicolas Oury LRI, Univ. Paris-Sud - Démons Team & INRIA Saclay - ProVal Project Gallium Seminar November 3rd 2008 INRIA Rocquencourt Solutions for

More information

Type Checking and Type Inference

Type Checking and Type Inference Type Checking and Type Inference Principles of Programming Languages CSE 307 1 Types in Programming Languages 2 Static Type Checking 3 Polymorphic Type Inference Version: 1.8 17:20:56 2014/08/25 Compiled

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

An Improved Rule for While Loops in Deductive Program Verification

An Improved Rule for While Loops in Deductive Program Verification An Improved Rule for While Loops in Deductive Program Verification Bernhard Beckert 1, Steffen Schlager 2,andPeterH.Schmitt 2 1 University of Koblenz-Landau Institute for Computer Science D-56072 Koblenz,

More information

CIS 341 Final Examination 4 May 2017

CIS 341 Final Examination 4 May 2017 CIS 341 Final Examination 4 May 2017 1 /14 2 /15 3 /12 4 /14 5 /34 6 /21 7 /10 Total /120 Do not begin the exam until you are told to do so. You have 120 minutes to complete the exam. There are 14 pages

More information

A Theorem Prover for Differential Dynamic Logic

A Theorem Prover for Differential Dynamic Logic A Theorem Prover for Differential Dynamic Logic Deductive Verification of Hybrid Systems April 17, 2007 Jan-David Quesel Carl von Ossietzky Universität Oldenburg Fakultät II Department für Informatik Abteilung

More information

Situation Calculus and YAGI

Situation Calculus and YAGI Situation Calculus and YAGI Institute for Software Technology 1 Progression another solution to the projection problem does a sentence hold for a future situation used for automated reasoning and planning

More information

Theoretical Corner: The Non-Interference Property

Theoretical Corner: The Non-Interference Property Theoretical Corner: The Non-Interference Property Marwan Burelle marwan.burelle@lse.epita.fr http://wiki-prog.infoprepa.epita.fr Outline 1 Introduction 2 Theory And Security Models And Policies Non-Interference

More information

Static Analysis: Overview, Syntactic Analysis and Abstract Interpretation TDDC90: Software Security

Static Analysis: Overview, Syntactic Analysis and Abstract Interpretation TDDC90: Software Security Static Analysis: Overview, Syntactic Analysis and Abstract Interpretation TDDC90: Software Security Ahmed Rezine IDA, Linköpings Universitet Hösttermin 2014 Outline Overview Syntactic Analysis Abstract

More information

Web Science & Technologies University of Koblenz Landau, Germany. Relational Data Model

Web Science & Technologies University of Koblenz Landau, Germany. Relational Data Model Web Science & Technologies University of Koblenz Landau, Germany Relational Data Model Overview Relational data model; Tuples and relations; Schemas and instances; Named vs. unnamed perspective; Relational

More information

Second-Order Type Systems

Second-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 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

COMP 4161 NICTA Advanced Course. Advanced Topics in Software Verification. Toby Murray, June Andronick, Gerwin Klein

COMP 4161 NICTA Advanced Course. Advanced Topics in Software Verification. Toby Murray, June Andronick, Gerwin Klein COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Toby Murray, June Andronick, Gerwin Klein λ 1 Last time... λ calculus syntax free variables, substitution β reduction α and η conversion

More information

Featherweight Java (FJ)

Featherweight Java (FJ) x = 1 let x = 1 in... x(1).!x(1) x.set(1) Programming Language Theory Featherweight Java (FJ) Ralf Lämmel This lecture is based on David Walker s lecture: Computer Science 441, Programming Languages, Princeton

More information

Negations in Refinement Type Systems

Negations in Refinement Type Systems Negations in Refinement Type Systems T. Tsukada (U. Tokyo) 14th March 2016 Shonan, JAPAN This Talk About refinement intersection type systems that refute judgements of other type systems. Background Refinement

More information

Typed Lambda Calculus

Typed Lambda Calculus Department of Linguistics Ohio State University Sept. 8, 2016 The Two Sides of A typed lambda calculus (TLC) can be viewed in two complementary ways: model-theoretically, as a system of notation for functions

More information

A Context-Sensitive Memory Model for Verification of C/C++ Programs

A Context-Sensitive Memory Model for Verification of C/C++ Programs A Context-Sensitive Memory Model for Verification of C/C++ Programs Arie Gurfinkel and Jorge A. Navas University of Waterloo and SRI International SAS 17, August 30th, 2017 Gurfinkel and Navas (UWaterloo/SRI)

More information

COS 320. Compiling Techniques

COS 320. Compiling Techniques Topic 5: Types COS 320 Compiling Techniques Princeton University Spring 2016 Lennart Beringer 1 Types: potential benefits (I) 2 For programmers: help to eliminate common programming mistakes, particularly

More information

Part VI. Imperative Functional Programming

Part VI. Imperative Functional Programming Part VI Imperative Functional Programming Chapter 14 Mutable Storage MinML is said to be a pure language because the execution model consists entirely of evaluating an expression for its value. ML is

More information

CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011

CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011 CS 6110 S11 Lecture 25 Typed λ-calculus 6 April 2011 1 Introduction Type checking is a lightweight technique for proving simple properties of programs. Unlike theorem-proving techniques based on axiomatic

More information

1 Introduction. 3 Syntax

1 Introduction. 3 Syntax CS 6110 S18 Lecture 19 Typed λ-calculus 1 Introduction Type checking is a lightweight technique for proving simple properties of programs. Unlike theorem-proving techniques based on axiomatic semantics,

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 5 - Axiomatic semantics

Lecture 5 - Axiomatic semantics Program Verification March 2014 Lecture 5 - Axiomatic semantics Lecturer: Noam Rinetzky Scribes by: Nir Hemed 1.1 Axiomatic semantics The development of the theory is contributed to Robert Floyd, C.A.R

More information

CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Dan Grossman Spring 2011

CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Dan Grossman Spring 2011 CS152: Programming Languages Lecture 11 STLC Extensions and Related Topics Dan Grossman Spring 2011 Review e ::= λx. e x e e c v ::= λx. e c τ ::= int τ τ Γ ::= Γ, x : τ (λx. e) v e[v/x] e 1 e 1 e 1 e

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

Subtyping and Objects

Subtyping and Objects Subtyping and Objects Massimo Merro 20 November 2017 Massimo Merro Data and Mutable Store 1 / 22 Polymorphism So far, our type systems are very rigid: there is little support to code reuse. Polymorphism

More information

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur Module 6 Knowledge Representation and Logic (First Order Logic) 6.1 Instructional Objective Students should understand the advantages of first order logic as a knowledge representation language Students

More information

Verifying pattern matching with guards in Scala

Verifying pattern matching with guards in Scala EPFL SAV 07 June 21, 2007 version 1.1 Outline Introduction Scala reasoning about pattern matching status in Scala motivation project overview general idea formalization of concepts axioms patterns miscellaneous

More information

λ calculus is inconsistent

λ calculus is inconsistent Content Rough timeline COMP 4161 NICTA Advanced Course Advanced Topics in Software Verification Gerwin Klein, June Andronick, Toby Murray λ Intro & motivation, getting started [1] Foundations & Principles

More information

Verifying Program Invariants with Refinement Types

Verifying Program Invariants with Refinement Types Verifying Program Invariants with Refinement Types Rowan Davies and Frank Pfenning Carnegie Mellon University Princeton and Yale Colloquium Talks February, 2001 Acknowledgments: Robert Harper 1 Overview

More information

Steam Boiler Control An Example in ASM Formalisation

Steam Boiler Control An Example in ASM Formalisation Formal Specification and Verification of Software Steam Boiler Control An Example in ASM Formalisation Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU B. Beckert: Formal Specification and Verification of Software

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2012 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

From Types to Sets in Isabelle/HOL

From Types to Sets in Isabelle/HOL From Types to Sets in Isabelle/HOL Extented Abstract Ondřej Kunčar 1 and Andrei Popescu 1,2 1 Fakultät für Informatik, Technische Universität München, Germany 2 Institute of Mathematics Simion Stoilow

More information

Integrating Arrays into the Heap-Hop program prover

Integrating Arrays into the Heap-Hop program prover Integrating Arrays into the Heap-Hop program prover Ioana Cristescu under the supervision of Jules Villard Queen Mary University of London 7 September 2011 1 / 29 Program verification using Heap-Hop Program

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2010 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

Computing Fundamentals 2 Introduction to CafeOBJ

Computing Fundamentals 2 Introduction to CafeOBJ Computing Fundamentals 2 Introduction to CafeOBJ Lecturer: Patrick Browne Lecture Room: K408 Lab Room: A308 Based on work by: Nakamura Masaki, João Pascoal Faria, Prof. Heinrich Hußmann. See notes on slides

More information

From IMP to Java. Andreas Lochbihler. parts based on work by Gerwin Klein and Tobias Nipkow ETH Zurich

From IMP to Java. Andreas Lochbihler. parts based on work by Gerwin Klein and Tobias Nipkow ETH Zurich From IMP to Java Andreas Lochbihler ETH Zurich parts based on work by Gerwin Klein and Tobias Nipkow 2015-07-14 1 Subtyping 2 Objects and Inheritance 3 Multithreading 1 Subtyping 2 Objects and Inheritance

More information

Static Checking and Type Systems

Static Checking and Type Systems 1 Static Checking and Type Systems Chapter 6 COP5621 Compiler Construction Copyright Robert van Engelen, Florida State University, 2007-2009 2 The Structure of our Compiler Revisited Character stream Lexical

More information

Typed Lambda Calculus for Syntacticians

Typed Lambda Calculus for Syntacticians Department of Linguistics Ohio State University January 12, 2012 The Two Sides of Typed Lambda Calculus A typed lambda calculus (TLC) can be viewed in two complementary ways: model-theoretically, as a

More information

Abstract Object Creation in Dynamic Logic

Abstract Object Creation in Dynamic Logic to be or not to be created Wolfgang Ahrendt 1 Frank S. de Boer 2 Immo Grabe 3 1 Chalmers University, Göteborg, Sweden 2 CWI, Amsterdam, The Netherlands 3 Christian-Albrechts-University Kiel, Germany KeY

More information

From OCL to Typed First-order Logic

From OCL to Typed First-order Logic 22c181: Formal Methods in Software Engineering The University of Iowa Spring 2008 From OCL to Typed First-order Logic Copyright 2007-8 Reiner Hähnle and Cesare Tinelli. Notes originally developed by Reiner

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

Where Can We Draw The Line?

Where Can We Draw The Line? Where Can We Draw The Line? On the Hardness of Satisfiability Problems Complexity 1 Introduction Objectives: To show variants of SAT and check if they are NP-hard Overview: Known results 2SAT Max2SAT Complexity

More information

Modelling and Verifying Web Service Orchestration by means of the Concurrency Workbench p.1/19

Modelling and Verifying Web Service Orchestration by means of the Concurrency Workbench p.1/19 Modelling and Verifying Web Service Orchestration by means of the Concurrency Workbench Mariya Koshkina / Franck van Breugel IBM, Toronto / York University, Toronto Modelling and Verifying Web Service

More information

Subsumption. Principle of safe substitution

Subsumption. Principle of safe substitution Recap on Subtyping Subsumption Some types are better than others, in the sense that a value of one can always safely be used where a value of the other is expected. Which can be formalized as by introducing:

More information

Lecture 13: Subtyping

Lecture 13: Subtyping Lecture 13: Subtyping Polyvios Pratikakis Computer Science Department, University of Crete Type Systems and Programming Languages Pratikakis (CSD) Subtyping CS546, 2018-2019 1 / 15 Subtyping Usually found

More information

Propositional Logic Formal Syntax and Semantics. Computability and Logic

Propositional Logic Formal Syntax and Semantics. Computability and Logic Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship

More information

The Polymorphic Blame Calculus and Parametricity

The Polymorphic Blame Calculus and Parametricity 1 / 31 The Polymorphic Blame Calculus and Parametricity Jeremy G. Siek Indiana University, Bloomington University of Strathclyde August 2015 2 / 31 Integrating static and dynamic typing Static Dynamic

More information

CSE 403: Software Engineering, Fall courses.cs.washington.edu/courses/cse403/16au/ Static Analysis. Emina Torlak

CSE 403: Software Engineering, Fall courses.cs.washington.edu/courses/cse403/16au/ Static Analysis. Emina Torlak CSE 403: Software Engineering, Fall 2016 courses.cs.washington.edu/courses/cse403/16au/ Static Analysis Emina Torlak emina@cs.washington.edu Outline What is static analysis? How does it work? Free and

More information

Linear Dependent Types in a Subrecursive Setting

Linear Dependent Types in a Subrecursive Setting Linear Dependent Types in a Subrecursive Setting Ugo Dal Lago Bounded Linear Logic Workshop December 4th, 2013 Part I Linear Dependent Types: Motivations Characterizing Complexity Classes L C Characterizing

More information

Dependent Object Types - A foundation for Scala s type system

Dependent Object Types - A foundation for Scala s type system Dependent Object Types - A foundation for Scala s type system Draft of September 9, 2012 Do Not Distrubute Martin Odersky, Geoffrey Alan Washburn EPFL Abstract. 1 Introduction This paper presents a proposal

More information

Introduction to System F. Lecture 18 CS 565 4/20/09

Introduction to System F. Lecture 18 CS 565 4/20/09 Introduction to System F Lecture 18 CS 565 4/20/09 The Limitations of F 1 (simply-typed λ- calculus) In F 1 each function works exactly for one type Example: the identity function id = λx:τ. x : τ τ We

More information

ISR 2014 Strategies. Hélène KIRCHNER Inria. August Topics, Objectives, Contents. Hélène KIRCHNER Inria ISR 2014 Strategies 1 / 48

ISR 2014 Strategies. Hélène KIRCHNER Inria. August Topics, Objectives, Contents. Hélène KIRCHNER Inria ISR 2014 Strategies 1 / 48 ISR 2014 Strategies Hélène KIRCHNER Inria August 2014 Topics, Objectives, Contents Hélène KIRCHNER Inria ISR 2014 Strategies 1 / 48 Computation, Deduction and Strategies Series of workshops since 1997

More information

Tracing Ambiguity in GADT Type Inference

Tracing Ambiguity in GADT Type Inference Tracing Ambiguity in GADT Type Inference ML Workshop 2012, Copenhagen Jacques Garrigue & Didier Rémy Nagoya University / INRIA Garrigue & Rémy Tracing ambiguity 1 Generalized Algebraic Datatypes Algebraic

More information

KeYmaera X: An Axiomatic Tactical Theorem Prover for Hybrid Systems

KeYmaera X: An Axiomatic Tactical Theorem Prover for Hybrid Systems KeYmaera X: An Axiomatic Tactical Theorem Prover for Hybrid Systems Nathan Fulton, Stefan Mitsch, Jan-David Quesel, Marcus Völp, André Platzer Presented at CADE-25 August 9, 2015 Milieu Safety-critical

More information

Specification, Verification, and Interactive Proof

Specification, Verification, and Interactive Proof Specification, Verification, and Interactive Proof SRI International May 23, 2016 PVS PVS - Prototype Verification System PVS is a verification system combining language expressiveness with automated tools.

More information

Static Program Analysis

Static Program Analysis Static Program Analysis Thomas Noll Software Modeling and Verification Group RWTH Aachen University https://moves.rwth-aachen.de/teaching/ss-18/spa/ Preliminaries Outline of Lecture 1 Preliminaries Introduction

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

Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5

Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5 Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5 1 Not all languages are regular So what happens to the languages which are not regular? Can we still come up with a language recognizer?

More information

CMSC131. Inheritance. Object. When we talked about Object, I mentioned that all Java classes are "built" on top of that.

CMSC131. Inheritance. Object. When we talked about Object, I mentioned that all Java classes are built on top of that. CMSC131 Inheritance Object When we talked about Object, I mentioned that all Java classes are "built" on top of that. This came up when talking about the Java standard equals operator: boolean equals(object

More information

Lecture Notes on Alias Analysis

Lecture Notes on Alias Analysis Lecture Notes on Alias Analysis 15-411: Compiler Design André Platzer Lecture 26 1 Introduction So far we have seen how to implement and compile programs with pointers, but we have not seen how to optimize

More information

Integration of SMT Solvers with ITPs There and Back Again

Integration of SMT Solvers with ITPs There and Back Again Integration of SMT Solvers with ITPs There and Back Again Sascha Böhme and University of Sheffield 7 May 2010 1 2 Features: SMT-LIB vs. Yices Translation Techniques Caveats 3 4 Motivation Motivation System

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

Structural polymorphism in Generic Haskell

Structural polymorphism in Generic Haskell Structural polymorphism in Generic Haskell Andres Löh andres@cs.uu.nl 5 February 2005 Overview About Haskell Genericity and other types of polymorphism Examples of generic functions Generic Haskell Overview

More information

Formal Specification and Verification

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

Dynamic Types , Spring March 21, 2017

Dynamic Types , Spring March 21, 2017 Dynamic Types 15-312, Spring 2017 March 21, 2017 Announcements Homework 4 will be released shortly. Most of it is new, so it s hard to tell how hard we made it. Please start early! Look at what I made

More information

Intermediate Code Generation Part II

Intermediate Code Generation Part II Intermediate Code Generation Part II Chapter 6: Type checking, Control Flow Slides adapted from : Robert van Engelen, Florida State University Static versus Dynamic Checking Static checking: the compiler

More information

A Sound Type System for Secure Flow Analysis

A Sound Type System for Secure Flow Analysis A Sound Type System for Secure Flow Analysis Dennis Volpano, Geoffrey Smith, Cynthia Irvine Presenter: Lantian Zheng CS 711 September 29, 2003 Soundness of Dening s Program Certification Mechanism Define

More information

Typed Lambda Calculus and Exception Handling

Typed Lambda Calculus and Exception Handling Typed Lambda Calculus and Exception Handling Dan Zingaro zingard@mcmaster.ca McMaster University Typed Lambda Calculus and Exception Handling p. 1/2 Untyped Lambda Calculus Goal is to introduce typing

More information

Generic polymorphism on steroids

Generic polymorphism on steroids Generic polymorphism on steroids or How to Solve the Expression Problem with Polymorphic Variants Claudio Sacerdoti Coen Dipartimento di Informatica Scienza e Ingegneria

More information

Static Program Analysis

Static Program Analysis Static Program Analysis Thomas Noll Software Modeling and Verification Group RWTH Aachen University https://moves.rwth-aachen.de/teaching/ws-1617/spa/ Recap: Taking Conditional Branches into Account Extending

More information

Dynamic Logic for Java

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

Denotational Semantics. Domain Theory

Denotational Semantics. Domain Theory Denotational Semantics and Domain Theory 1 / 51 Outline Denotational Semantics Basic Domain Theory Introduction and history Primitive and lifted domains Sum and product domains Function domains Meaning

More information

l e t print_name r = p r i n t _ e n d l i n e ( Name : ^ r. name)

l e t print_name r = p r i n t _ e n d l i n e ( Name : ^ r. name) Chapter 8 Row polymorphism Consider the following code: type name_home = {name : s t r i n g ; home : s t r i n g } type name_mobile = {name : s t r i n g ; mobile : s t r i n g } l e t jane = {name =

More information

Computation Club: Gödel s theorem

Computation Club: Gödel s theorem Computation Club: Gödel s theorem The big picture mathematicians do a lot of reasoning and write a lot of proofs formal systems try to capture the ideas of reasoning and proof in a purely mechanical set

More information

Combining Static and Dynamic Contract Checking for Curry

Combining Static and Dynamic Contract Checking for Curry Michael Hanus (CAU Kiel) Combining Static and Dynamic Contract Checking for Curry LOPSTR 2017 1 Combining Static and Dynamic Contract Checking for Curry Michael Hanus University of Kiel Programming Languages

More information

EXAMINATIONS 2007 END YEAR COMP471 COMPILER TECHNOLOGIES. Instructions: Read each question carefully before attempting it.

EXAMINATIONS 2007 END YEAR COMP471 COMPILER TECHNOLOGIES. Instructions: Read each question carefully before attempting it. T E W H A R E W Ā N A N G A O T E Ū P O K O O T E I K A A M Ā U I VUW V I C T O R I A UNIVERSITY OF WELLINGTON EXAMINATIONS 2007 END YEAR COMP471 COMPILER TECHNOLOGIES Time Allowed: 3 Hours Instructions:

More information