Session Types for Object-Oriented Languages

Size: px
Start display at page:

Download "Session Types for Object-Oriented Languages"

Transcription

1 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 1/1 Session Types for Object-Oriented Languages Dimitris Mostrous joint work with Mariangiola Dezani (Torino), Nobuko Yoshida (Imperial), and Sophia Drossopoulou (Imperial) Monday, 16 October 2006

2 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 2/1 Outline Background Example Syntax and Types Typing System Properties Future Work

3 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 3/1 Introduction A session describes a communication protocol between two parties, that takes place over a single connection Kohei Honda. Types for Dyadic Interaction. CONCUR 93, LNCS 715, pages , Springer-Verlag, 1993

4 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 3/1 Introduction A session describes a communication protocol between two parties, that takes place over a single connection Kohei Honda. Types for Dyadic Interaction. CONCUR 93, LNCS 715, pages , Springer-Verlag, 1993 We integrated sessions in a small object calculus Mariangiola Dezani-Ciancaglini, Dimitris Mostrous, Nobuko Yoshida, and Sophia Drossopoulou. Session Types for Object-Oriented Languages. ECOOP 2006.

5 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 4/1 Protocol Example Scenario: Item Purchasing (Typical W3C example) Exchange of data/objects between three participants (i.e., three processes running in parallel).

6 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 5/1 Session Primitives We chose primitives to: establish connections send and receive values represent conditional flow of protocols represent repetition of part of a protocol allow the transparent delegation of a session

7 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { connect c s { c.send(5); new B.h(); bool x := c.receive;

8 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { connect c s { c is a channel c. send(5); it represents the connection new B.h(); bool x := c.receive; send and receive are the basic primitives for communication

9 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { connect c s { c. send(5); (that we will see next) new B.h(); bool x := c.receive; agree with s s abbreviates a session type the session body must

10 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { s = connect c s { c.send(5); new B.h(); bool x := c.receive;

11 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { s = connect c s { begin c.send(5); new B.h(); bool x := c.receive;

12 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { s = connect c s { begin c.send(5);!int new B.h(); bool x := c.receive;

13 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { s = connect c s { begin c.send(5);!int new B.h(); bool x := c. receive;?bool

14 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { s = connect c s { begin c.send(5);!int new B.h(); bool x := c. receive;?bool end

15 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { s = connect c s { begin c.send(5);!int new B.h(); bool x := c. receive;?bool end Notation: s = begin.!int.?bool.end

16 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { connect c s { c. send(5); execute? new B.h(); bool x := c.receive; Notation: s = begin.!int.?bool.end when can this connect block

17 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { void m() { connect c s { c. send(5); execute? new B.h(); bool x := c.receive; Notation: s = begin.!int.?bool.end when can this connect block

18 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { Class D { void m() { void g() { connect c s { connect c s { c.send(5); //... local computation new B.h(); this.f( c. receive ); bool x := c.receive; c.send(true); Notation: s = begin.!int.?bool.end suppose we are executing: new C.m(); new D.g();

19 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { Class D { void m() { void g() { connect c s { connect c s { c.send(5); //... local computation new B.h(); this.f( c. receive ); bool x := c.receive; c.send(true); Notation: s = begin.!int.?bool.end communication over the same channel

20 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { Class D { void m() { void g() { connect c s { connect c s { c.send(5); //... local computation new B.h(); this.f( c. receive ); bool x := c.receive; c.send(true); Notation: s = begin.!int.?bool.end session types s and s must agree

21 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { Class D { void m() { void g() { connect c s { connect c s { c.send(5); //... local computation new B.h(); this.f( c. receive ); bool x := c.receive; c.send(true); Notation: s = begin.!int.?bool.end whenever one sends, the other must receive

22 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { Class D { void m() { void g() { connect c s { connect c s { c.send(5); //... local computation new B.h(); this.f( c. receive ); bool x := c.receive; c.send(true); Notation: s = begin.!int.?bool.end types of exchanged data must always be as expected

23 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { Class D { void m() { void g() { connect c s { connect c s { c.send(5); //... local computation new B.h(); this.f( c. receive ); bool x := c.receive; c.send(true); Notation: s = begin.!int.?bool.end s = begin.?int.!bool.end

24 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 6/1 Basics of MOOSE Class C { Class D { void m() { void g() { connect c s { connect c s { c.send(5); //... local computation new B.h(); this.f( c. receive ); bool x := c.receive; c.send(true); Notation: s = begin.!int.?bool.end s = begin.?int.!bool.end s is dual to s (the dual of s is written s )

25 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 7/1 Conditional Sessions... s = connect c s { c.sendif(x > 5) { int n := c.receive; c.send(true); { c.send(false);... Note: sendif(e) matches with receiveif

26 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 7/1 Conditional Sessions... s = connect c s { begin c.sendif(x > 5) { int n := c.receive; c.send(true); { c.send(false);...

27 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 7/1 Conditional Sessions... s = connect c s { begin c.sendif(x > 5) {! int n := c.receive; c.send(true); { c.send(false);...

28 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 7/1 Conditional Sessions... s = connect c s { begin c.sendif(x > 5) {! int n := c.receive; c.send( true);?int.!bool, { c.send(false);...

29 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 7/1 Conditional Sessions... s = connect c s { begin c.sendif(x > 5) {! int n := c.receive; c.send( true);?int.!bool, { c. send( false);!bool...

30 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 7/1 Conditional Sessions... s = connect c s { begin c.sendif(x > 5) {! int n := c.receive; c.send( true);?int.!bool, { c. send( false);!bool end... Notation: s = begin.!?int.!bool,!bool.end

31 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 7/1 Conditional Sessions... s = connect c s { begin c.receiveif {? c.send( 5); abool := c.receive;!int.?bool, { abool := c.receive;?bool end... Notation: s = begin.?!int.?bool,?bool.end

32 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 7/1 Conditional Sessions... s = connect c s { begin c.receiveif {? c.send( 5); abool := c.receive;!int.?bool, { abool := c.receive;?bool end... Notation: s = begin.?!int.?bool,?bool.end We also have sendwhile(e) and receivewhile for iteration

33 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 8/1 Methods with Session Parameters connect c1 begin.!bool.!int.end { c1.send(true); c1.send(5); connect c1 begin.?bool.?int.end { c1.receive; c1.receive

34 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 8/1 Methods with Session Parameters connect c1 begin.!bool.!int.end { c1.send(true); new C.m(c1 ); connect c1 begin.?bool.?int.end { c1.receive; c1.receive

35 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 8/1 Methods with Session Parameters connect c1 begin.!bool.!int.end { c1.send(true); new C.m(c1 ); connect c1 begin.?bool.?int.end { c1.receive; c1.receive Class C { void m(!int.end x) { x.send(5);

36 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 8/1 Session over Session connect c1 begin.!bool.!int.end { c1.send(true); c1.send(5); connect c1 begin.?bool.?int.end { c1.receive; c1.receive

37 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 8/1 Session over Session connect c1 begin.!bool.!int.end { c1.send(true); connect c2 begin.!(!int.end).end { c2.sends( c1 ); connect c1 begin.?bool.?int.end { c1.receive; c1.receive

38 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 8/1 Session over Session connect c1 begin.!bool.!int.end { c1.send(true); connect c2 begin.!(!int.end).end { c2.sends( c1 ); connect c1 begin.?bool.?int.end { c1.receive; c1.receive connect c2 begin.?(!int.end).end { c2.receives(x ) { x.send(5 );

39 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 9/1 Concurrent programming support Class D { void m( x) { spawn {... connect x s {x.send(..).. connect x s {..x.receive;..

40 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 9/1 Concurrent programming support Class D { void m( (s,s) x) { spawn {... connect x s {x.send(..).. connect x s {..x.receive;..

41 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 9/1 Concurrent programming support Class D { void m( (s,s) x) { spawn {... connect x s {x.send(..).. connect x s {..x.receive;.. Most direct way to call it is using newd.m(new (s,s));

42 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 10/1 Syntax of types ::=!? direction π ::= ε π.π t π,π partial session type π (ρ) ρ ::= π.end π. ρ, ρ ended session type s ::= begin.ρ shared session type t ::= C bool s (s,s) standard type

43 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 11/1 Starting a Session...connect c s{e connect c s{e 2..., h

44 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 11/1 Starting a Session...connect c s{e connect c s{e 2..., h...e 1 [c /c]......e 2 [c /c]..., h c c is fresh (i.e., not in the heap h ) we call these live channels

45 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 11/1 Starting a Session...connect c s{e connect c s{e 2..., h...e 1 [c /c]......e 2 [c /c]..., h c c is fresh (i.e., not in the heap h ) we call these live channels recall that c is shared freshness of c guarantees that e 1 and e 2 only interact with each other

46 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 12/1 Interactions...c.send(v)......c.receive..., h

47 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 12/1 Interactions...c.send(v)......c.receive..., h...null......v..., h

48 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 12/1 Interactions...c.send(v)......c.receive..., h...null......v..., h...c.sendif(true ){e 1 {e 2 c.receiveif{e 3 {e 4...,h

49 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 12/1 Interactions...c.send(v)......c.receive..., h...null......v..., h...c.sendif(true ){e 1 {e 2 c.receiveif{e 3 {e 4...,h...e 1 e 3...,h

50 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 13/1 Types for Web Service Example session BuyProduct = begin.!string.?double.!!address.?deliverydetails.end, end Buyer s viewpoint of the Buyer-Seller interaction

51 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 13/1 Types for Web Service Example session RequestDelivery = begin.!productdetails.!(?address.!deliverydetails.end).end Seller s viewpoint of the Seller-Shipper interaction

52 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 13/1 Types for Web Service Example Implementation fits in one A4 page...

53 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 14/1 Typing Γ;Σ;S e :t

54 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 14/1 Typing Γ;Σ;S e :t standard environment

55 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 14/1 Typing Γ;Σ;S e :t expression

56 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 14/1 Typing Γ;Σ;S e :t type

57 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 14/1 Typing Γ;Σ;S e :t session environment records which channels are used ine, and in what way

58 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 14/1 Typing Γ;Σ;S e :t hot set identifies the current/active session channel used to prevent interleaving of sessions

59 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 14/1 Typing Γ;Σ;S e :t SEQ Γ;Σ;S e : t Γ;Σ ;S e : t Γ;Σ Σ ;S e;e : t

60 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 14/1 Typing Γ;Σ;S e :t Γ;x :?bool;x x.receive:bool Γ;x :!nat;x x.send(5):nat Γ;x :?bool.!nat;x x.receive;x.send(5) : nat

61 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 14/1 Typing Γ;Σ;S e :t We can also infer session types, avoiding type annotations in connect

62 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 15/1 Properties P0 Subject Reduction

63 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 15/1 Properties P0 Subject Reduction P1 no communication error can occur, i.e., there cannot be two sends or two receives on the same channel in parallel in two different threads;

64 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 15/1 Properties P0 Subject Reduction P1 no communication error can occur, i.e., there cannot be two sends or two receives on the same channel in parallel in two different threads; P2 typable threads can always progress unless one of the following situations occurs:

65 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 15/1 Properties P0 Subject Reduction P1 no communication error can occur, i.e., there cannot be two sends or two receives on the same channel in parallel in two different threads; P2 typable threads can always progress unless one of the following situations occurs: a null pointer exception is thrown; there is a connect instruction waiting for the dual connect instruction.

66 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 15/1 Properties P0 Subject Reduction P1 no communication error can occur, i.e., there cannot be two sends or two receives on the same channel in parallel in two different threads; P2 typable threads can always progress unless one of the following situations occurs: a null pointer exception is thrown; there is a connect instruction waiting for the dual connect instruction. P3 after a session has started the required communications are always executed in the expected order.

67 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 16/1 Properties (cont.) P0 Subject Reduction for Threads Γ;Σ P;h and P,h P,h imply Γ ;Σ P ;h with Γ Γ and Σ Σ.

68 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 16/1 Properties (cont.) P0 Subject Reduction for Threads Γ;Σ P;h and P,h P,h imply Γ ;Σ P ;h with Γ Γ and Σ Σ. P2 Progress If P 0, /0 P,h. Then one of the following holds: P,h P,h ; In P, all expressions are values; P throws a null pointer exception; or P stops with a connect waiting for its dual instruction, i.e., P E[connect c s{e] Q.

69 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 17/1 Subject Reduction Proof uses: Generation lemmas; information on how session environments should evolve during reduction; information on the sessions effect of the current redex within larger contexts; the expected difference in sessions effect after reduction; well-definedness conditions on composite environments.

70 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 18/1 Progress Key points: the correspondence of session primitives and session types; information on the current live channel of expressions; knowing the active channel of a thread, we show that some dual expression will appear on a parallel thread, modulo specific exceptions; the two expressions can react, hence we get progress; the non-session cases are more straightforward.

71 Introduction Basics Conditional SoS Meth Operational Semantics Connect Operational Semantics Interactions Typing Properties Future Work p. 19/1 Future Work exception handling and propagation timeout in connect prototype implementation for a longer version with proofs: dm04

Session Types for Object-Oriented Languages

Session Types for Object-Oriented Languages Session Types for Object-Oriented Languages Mariangiola Dezani-Ciancaglini 1, Dimitris Mostrous 2, Nobuko Yoshida 2, and Sophia Drossopoulou 2 1 Dipartimento di Informatica, Università ditorino 2 Department

More information

MOOSE: A Minimal Object Oriented Language with Session Types

MOOSE: A Minimal Object Oriented Language with Session Types Imperial College of Science, Technology and Medicine (University of London) Department of Computing MOOSE: A Minimal Object Oriented Language with Session Types by Dimitris Mostrous Submitted in partial

More information

Amalgamating the Session Types and the Object Oriented Programming Paradigms

Amalgamating the Session Types and the Object Oriented Programming Paradigms Amalgamating the Session Types and the Object Oriented Programming Paradigms Sophia Drossopoulou 1, Mariangiola Dezani-Ciancaglini 2, Mario Coppo 2 1 Department of Computing, Imperial College London 2

More information

Modular Session Types for Distributed Object-Oriented Programming

Modular Session Types for Distributed Object-Oriented Programming Modular Session Types for Distributed Object-Oriented Programming Simon J. Gay 1, Vasco T. Vasconcelos 2, António Ravara 3, Nils Gesbert 1, and Alexandre Z. Caldeira 2 1 Department of Computing Science,

More information

Session Types Use-cases. (Amazon Collaboration)

Session Types Use-cases. (Amazon Collaboration) Session Types Use-cases. (Amazon Collaboration) Dimitris Kouzapas 1 Introduction This document lists a number of session types use-cases and examples. Its purpose is to explain to our collaborates in Amazon

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

SCHOOL: a Small Chorded Object-Oriented Language

SCHOOL: a Small Chorded Object-Oriented Language SCHOOL: a Small Chorded Object-Oriented Language S. Drossopoulou, A. Petrounias, A. Buckley, S. Eisenbach { s.drossopoulou, a.petrounias, a.buckley, s.eisenbach } @ imperial.ac.uk Department of Computing,

More information

Harvard School of Engineering and Applied Sciences Computer Science 152

Harvard School of Engineering and Applied Sciences Computer Science 152 Harvard School of Engineering and Applied Sciences Computer Science 152 Lecture 17 Tuesday, March 30, 2010 1 Polymorph means many forms. Polymorphism is the ability of code to be used on values of different

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

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

Variables. Substitution

Variables. Substitution Variables Elements of Programming Languages Lecture 4: Variables, binding and substitution James Cheney University of Edinburgh October 6, 2015 A variable is a symbol that can stand for another expression.

More information

A Certified Non-Interference Java Bytecode Verifier

A Certified Non-Interference Java Bytecode Verifier 1 A Certified Non-Interference Java Bytecode Verifier G. Barthe, D. Pichardie and T. Rezk, A Certified ightweight Non-Interference Java Bytecode Verifier, ESOP'07 2 Motivations 1: bytecode verification

More information

A linear type system for pi calculus

A linear type system for pi calculus A linear type system for pi calculus joint work with Vasco T. Vasconcelos Marco Giunti INRIA & LIX, École Polytechnique Palaiseau Behavorial Types, April 19 2010, Lisboa Session Types Describe a protocol

More information

Gay, S. J. (2016) Subtyping supports safe session substitution. Lecture Notes in Computer Science, 9600, pp (doi: / _5)

Gay, S. J. (2016) Subtyping supports safe session substitution. Lecture Notes in Computer Science, 9600, pp (doi: / _5) Gay, S. J. (2016) Subtyping supports safe session substitution. Lecture Notes in Computer Science, 9600, pp. 95-108. (doi:10.1007/978-3-319-30936-1_5) This is the author s final accepted version. There

More information

Type assignment for intersections and unions in call-by-value languages

Type assignment for intersections and unions in call-by-value languages Type assignment for intersections and unions in call-by-value languages Joshua Dunfield and Frank Pfenning Triple Project Carnegie Mellon University 8 April 2003 FOSSACS 03, Warsaw, Poland Type assignment

More information

We defined congruence rules that determine the order of evaluation, using the following evaluation

We defined congruence rules that determine the order of evaluation, using the following evaluation CS 4110 Programming Languages and Logics Lectures #21: Advanced Types 1 Overview In this lecture we will extend the simply-typed λ-calculus with several features we saw earlier in the course, including

More information

Verification tools for multi-core programming

Verification tools for multi-core programming University of London Imperial College of Science, Technology and Medicine Department of Computing Verification tools for multi-core programming Final Report Peter Collingbourne Supervisor: Dr Paul H J

More information

Refined Effects for Unanticipated Object Re-classification: Fickle 3

Refined Effects for Unanticipated Object Re-classification: Fickle 3 Refined Effects for Unanticipated Object Re-classification: Fickle 3 (Extended Abstract) Ferruccio Damiani 1, Sophia Drossopoulou 2, and Paola Giannini 3 1 Dipartimento di Informatica, Università di Torino

More information

Multiparty Asynchronous Session Types

Multiparty Asynchronous Session Types Multiparty Asynchronous Session Types KOHEI HONDA, Queen Mary University of London NOBUKO YOSHIDA, Imperial College London MARCO CARBONE, IT University of Copenhagen Communication is a central elements

More information

On Re-classification and Multi-threading

On Re-classification and Multi-threading Vol. 3, No. 11 Special issue: OOPS track at SAC 2004, Nicosia/Cyprus On Re-classification and Multi-threading Ferruccio Damiani, Dip. di Informatica, Univ. di Torino, Italy Mariangiola Dezani-Ciancaglini,

More information

Session Typing for a Featherweight Erlang

Session Typing for a Featherweight Erlang Session Typing for a Featherweight Erlang Dimitris Mostrous and Vasco T. Vasconcelos LaSIGE, Faculty of Sciences, University of Lisbon Abstract. As software tends to be increasingly concurrent, the paradigm

More information

CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008

CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008 CMSC 336: Type Systems for Programming Languages Lecture 5: Simply Typed Lambda Calculus Acar & Ahmed January 24, 2008 Contents 1 Solution to the Exercise 1 1.1 Semantics for lambda calculus.......................

More information

A Rehabilitation of Message-Passing Concurrency

A Rehabilitation of Message-Passing Concurrency A Rehabilitation of Message-Passing Concurrency Frank Pfenning Carnegie Mellon University PWLConf 2018, St. Louis A Paper I Love Types for Dyadic Interaction, Kohei Honda, CONCUR 1993 With some newer developments

More information

A type preserving translation of Fickle into Java

A type preserving translation of Fickle into Java URL: http://www.elsevier.nl/locate/entcs/volume62.html 14 pages A type preserving translation of Fickle into Java (Extended Abstract) D. Ancona 1,3,7 C. Anderson 4 F. Damiani 1,5,8 S. Drossopoulou 2,4,9

More information

Examples for Multiparty Asynchronous Session Types

Examples for Multiparty Asynchronous Session Types Examples for Multiparty Asynchronous Session Types Marco Carbone 1,2 Kohei Honda 1 Nobuko Yoshida 2 1 Queen Mary, University of London, UK 2 Imperial College, London, UK 1. Introduction This manuscript

More information

Generalised recursion and type inference for intersection types p.1

Generalised recursion and type inference for intersection types p.1 Generalised recursion and type inference for intersection types Seminar for Comete May 4th, 2004 Pascal Zimmer INRIA Sophia Antipolis Generalised recursion and type inference for intersection types p.1

More information

CSE-321 Programming Languages 2011 Final

CSE-321 Programming Languages 2011 Final Name: Hemos ID: CSE-321 Programming Languages 2011 Final Prob 1 Prob 2 Prob 3 Prob 4 Prob 5 Prob 6 Total Score Max 15 15 10 17 18 25 100 There are six problems on 18 pages in this exam, including one extracredit

More information

Conversation Types. 1 Introduction. Luís Caires and Hugo Torres Vieira

Conversation Types. 1 Introduction. Luís Caires and Hugo Torres Vieira Conversation Types Luís Caires and Hugo Torres Vieira CITI / Departamento de Informática, FCT Universidade Nova de Lisboa, Portugal Abstract. We present a type theory for analyzing concurrent multiparty

More information

Modular Session Types for Distributed Object-Oriented Programming

Modular Session Types for Distributed Object-Oriented Programming Modular Session Types for Distributed Object-Oriented Programming Simon J. Gay Department of Computing Science University of Glasgow, UK simon@dcs.gla.ac.uk Vasco T. Vasconcelos Department of Informatics

More information

Subtyping. Preciseness of Subtyping on Intersection and Union Types. Subtyping. Silvia Ghilezan. Joint work with Mariangiola Dezani-Ciancaglini

Subtyping. Preciseness of Subtyping on Intersection and Union Types. Subtyping. Silvia Ghilezan. Joint work with Mariangiola Dezani-Ciancaglini Subtyping Preciseness of Subtyping on Intersection and Union Types Silvia Ghilezan University of Novi Sad Serbia Université Paris Diderot, 21 April 2016 Joint work with Mariangiola Dezani-Ciancaglini M.

More information

Lecture Notes on Session Types

Lecture Notes on Session Types Lecture Notes on Session Types 15-814: Types and Programming Languages Frank Pfenning Lecture 22 November 27, 2018 1 Introduction Some of the material in this lecture, specifically, the discussion of external

More information

Session Types for Functional Multithreading

Session Types for Functional Multithreading Session Types for Functional Multithreading Vasco Vasconcelos 1, António Ravara 2, and Simon Gay 3 1 Departamento de Informática, Faculdade de Ciências, Universidade de Lisboa, 1749-016 Lisboa, Portugal.

More information

Idioms for Interaction: Functional Types, Process Types and Distributed Systems

Idioms for Interaction: Functional Types, Process Types and Distributed Systems Idioms for Interaction: Functional Types, Process Types and Distributed Systems http://mrg.doc.ic.ac.uk/ Nobuko Yoshida Imperial College London 1 Idioms for Interaction Multiparty Session Types Outline

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

λ 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

Project 5 Due 11:59:59pm Wed, Nov 25, 2015 (no late submissions)

Project 5 Due 11:59:59pm Wed, Nov 25, 2015 (no late submissions) Introduction Project 5 Due 11:59:59pm Wed, Nov 25, 2015 (no late submissions) In this project, you will write a compiler for a programming language called Rube, which is a small objectoriented programming

More information

Polymorphic lambda calculus Princ. of Progr. Languages (and Extended ) The University of Birmingham. c Uday Reddy

Polymorphic lambda calculus Princ. of Progr. Languages (and Extended ) The University of Birmingham. c Uday Reddy 06-02552 Princ. of Progr. Languages (and Extended ) The University of Birmingham Spring Semester 2016-17 School of Computer Science c Uday Reddy2016-17 Handout 6: Polymorphic Type Systems 1. Polymorphic

More information

Type systems. Types in access control and privacy. Outline. 1. Dynamic Web Data. p-calculus Dp XDp

Type systems. Types in access control and privacy. Outline. 1. Dynamic Web Data. p-calculus Dp XDp Type systems Types in access control and privacy Silvia Ghilezan University of Novi Sad NII Shonan Meeting 069 LOGIC AND VERIFICATION METHODS IN SECURITY AND PRIVACY October 26-29, 2015 Types have gained

More information

Application: Programming Language Semantics

Application: Programming Language Semantics Chapter 8 Application: Programming Language Semantics Prof. Dr. K. Madlener: Specification and Verification in Higher Order Logic 527 Introduction to Programming Language Semantics Programming Language

More information

Assignment 4: Semantics

Assignment 4: Semantics Assignment 4: Semantics 15-411: Compiler Design Jan Hoffmann Jonathan Burns, DeeDee Han, Anatol Liu, Alice Rao Due Thursday, November 3, 2016 (9:00am) Reminder: Assignments are individual assignments,

More information

Core-TyCO The Language Definition Version 0.1

Core-TyCO The Language Definition Version 0.1 Core-TyCO The Language Definition Version 0.1 Vasco T. Vasconcelos Rui Bastos DI FCUL TR 98 3 March 1998 Departamento de Informática Faculdade de Ciências da Universidade de Lisboa Campo Grande, 1700 Lisboa

More information

CSE505, Fall 2012, Midterm Examination October 30, 2012

CSE505, Fall 2012, Midterm Examination October 30, 2012 CSE505, Fall 2012, Midterm Examination October 30, 2012 Rules: The exam is closed-book, closed-notes, except for one side of one 8.5x11in piece of paper. Please stop promptly at Noon. You can rip apart

More information

Simply-Typed Lambda Calculus

Simply-Typed Lambda Calculus #1 Simply-Typed Lambda Calculus #2 Back to School What is operational semantics? When would you use contextual (small-step) semantics? What is denotational semantics? What is axiomatic semantics? What

More information

Security for Multithreaded Programs under Cooperative Scheduling

Security for Multithreaded Programs under Cooperative Scheduling Security for Multithreaded Programs under Cooperative Scheduling Alejandro Russo and Andrei Sabelfeld Dept. of Computer Science and Engineering, Chalmers University of Technology 412 96 Göteborg, Sweden,

More information

Project 5 Due 11:59:59pm Tuesday, April 25, 2017

Project 5 Due 11:59:59pm Tuesday, April 25, 2017 Project 5 Due 11:59:59pm Tuesday, April 25, 2017 Introduction In this project, you will write a compiler for a programming language called Rube, which is a small objectoriented programming language with

More information

CSE 505, Fall 2008, Midterm Examination 29 October Please do not turn the page until everyone is ready.

CSE 505, Fall 2008, Midterm Examination 29 October Please do not turn the page until everyone is ready. CSE 505, Fall 2008, Midterm Examination 29 October 2008 Please do not turn the page until everyone is ready. Rules: The exam is closed-book, closed-note, except for one side of one 8.5x11in piece of paper.

More information

Inferring Channel Buffer Bounds via Linear Programming

Inferring Channel Buffer Bounds via Linear Programming Inferring Channel Buffer Bounds via Linear Programming Tachio Terauchi 1 and Adam Megacz 2 1 Tohoku University terauchi@ecei.tohoku.ac.jp 2 University of California, Berkeley megacz@cs.berkeley.edu Abstract.

More information

Programming Languages Fall 2014

Programming Languages Fall 2014 Programming Languages Fall 2014 Lecture 7: Simple Types and Simply-Typed Lambda Calculus Prof. Liang Huang huang@qc.cs.cuny.edu 1 Types stuck terms? how to fix it? 2 Plan First I For today, we ll go back

More information

Inferring Channel Buffer Bounds via Linear Programming

Inferring Channel Buffer Bounds via Linear Programming Inferring Channel Buffer Bounds via Linear Programming Tachio Terauchi 1 and Adam Megacz 2 1 Tohoku University terauchi@ecei.tohoku.ac.jp 2 University of California, Berkeley megacz@cs.berkeley.edu Abstract.

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

Type-Based Analysis of Deadlock for a Concurrent Calculus with Interrupts

Type-Based Analysis of Deadlock for a Concurrent Calculus with Interrupts Type-Based Analysis of Deadlock for a Concurrent Calculus with Interrupts Kohei Suenaga 1 and Naoki Kobayashi 2 1 University of Tokyo 2 Tohoku University Abstract. The goal of our research project is to

More information

Asynchronous Functional Session Types

Asynchronous Functional Session Types Asynchronous Functional Session Types Simon Gay and Vasco Vasconcelos Department of Computing Science TR-2007-251 University of Glasgow May 2007 Glasgow G12 8QQ Scotland 1 Asynchronous Functional Session

More information

Programming Languages Lecture 15: Recursive Types & Subtyping

Programming Languages Lecture 15: Recursive Types & Subtyping CSE 230: Winter 2008 Principles of Programming Languages Lecture 15: Recursive Types & Subtyping Ranjit Jhala UC San Diego News? Formalize first-order type systems Simple types (integers and booleans)

More information

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 14 Tuesday, March 24, 2015 1 Parametric polymorphism Polymorph means many forms. Polymorphism is the ability of

More information

Hierarchical Pointer Analysis for Distributed Programs

Hierarchical Pointer Analysis for Distributed Programs Hierarchical Pointer Analysis for Distributed Programs Amir Kamil Computer Science Division, University of California, Berkeley kamil@cs.berkeley.edu April 14, 2006 1 Introduction Many distributed, parallel

More information

Lesson 4 Typed Arithmetic Typed Lambda Calculus

Lesson 4 Typed Arithmetic Typed Lambda Calculus Lesson 4 Typed Arithmetic Typed Lambda 1/28/03 Chapters 8, 9, 10 Outline Types for Arithmetic types the typing relation safety = progress + preservation The simply typed lambda calculus Function types

More information

FuSe: an OCaml implementation of binary sessions

FuSe: an OCaml implementation of binary sessions FuSe: an OCaml implementation of binary sessions Luca Padovani Dipartimento di Informatica, Università di Torino Italy Contents 1 Overview 2 1.1 Introduction to binary sessions..............................

More information

Joint Entity Resolution

Joint Entity Resolution Joint Entity Resolution Steven Euijong Whang, Hector Garcia-Molina Computer Science Department, Stanford University 353 Serra Mall, Stanford, CA 94305, USA {swhang, hector}@cs.stanford.edu No Institute

More information

Principles of Program Analysis: A Sampler of Approaches

Principles of Program Analysis: A Sampler of Approaches Principles of Program Analysis: A Sampler of Approaches Transparencies based on Chapter 1 of the book: Flemming Nielson, Hanne Riis Nielson and Chris Hankin: Principles of Program Analysis Springer Verlag

More information

for Task-Based Parallelism

for Task-Based Parallelism for Task-Based Parallelism School of EEECS, Queen s University of Belfast July Table of Contents 2 / 24 Thread-Based Programming Hard for programmer to reason about thread interleavings and concurrent

More information

3.7 Denotational Semantics

3.7 Denotational Semantics 3.7 Denotational Semantics Denotational semantics, also known as fixed-point semantics, associates to each programming language construct a well-defined and rigorously understood mathematical object. These

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

Web Services Choreography and Process Algebra

Web Services Choreography and Process Algebra Web Services Choreography and Process Algebra 29th April 2004 Steve Ross-Talbot Chief Scientist, Enigmatec Corporation Ltd Chair W3C Web Services Activity Co-chair W3C Web Services Choreography Agenda

More information

Type-driven Development of Communicating Systems in Idris

Type-driven Development of Communicating Systems in Idris Type-driven Development of Communicating Systems in Idris Edwin Brady (ecb10@st-andrews.ac.uk) University of St Andrews, Scotland, UK @edwinbrady Lambda World, October 1st 2016 Idris is a pure functional

More information

Polyèdres et compilation

Polyèdres et compilation Polyèdres et compilation François Irigoin & Mehdi Amini & Corinne Ancourt & Fabien Coelho & Béatrice Creusillet & Ronan Keryell MINES ParisTech - Centre de Recherche en Informatique 12 May 2011 François

More information

CS 4110 Programming Languages & Logics. Lecture 28 Recursive Types

CS 4110 Programming Languages & Logics. Lecture 28 Recursive Types CS 4110 Programming Languages & Logics Lecture 28 Recursive Types 7 November 2014 Announcements 2 Foster office hours 11-12pm Guest lecture by Fran on Monday Recursive Types 3 Many languages support recursive

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

Types for References, Exceptions and Continuations. Review of Subtyping. Γ e:τ τ <:σ Γ e:σ. Annoucements. How s the midterm going?

Types for References, Exceptions and Continuations. Review of Subtyping. Γ e:τ τ <:σ Γ e:σ. Annoucements. How s the midterm going? Types for References, Exceptions and Continuations Annoucements How s the midterm going? Meeting 21, CSCI 5535, Spring 2009 2 One-Slide Summary Review of Subtyping If τ is a subtype of σ then any expression

More information

Safe Programmable Speculative Parallelism

Safe Programmable Speculative Parallelism Safe Programmable Speculative Parallelism Prakash Prabhu Princeton University pprabhu@cs.princeton.edu G. Ramalingam Kapil Vaswani Microsoft Research, India kapilv,grama@microsoft.com Abstract Execution

More information

Mutable References. Chapter 1

Mutable References. Chapter 1 Chapter 1 Mutable References In the (typed or untyped) λ-calculus, or in pure functional languages, a variable is immutable in that once bound to a value as the result of a substitution, its contents never

More information

A Type System for Functional Traversal-Based Aspects

A Type System for Functional Traversal-Based Aspects A Type System for Functional Traversal-Based Aspects Bryan Chadwick College of Computer & Information Science Northeastern University, 360 Huntington Avenue Boston, Massachusetts 02115 USA chadwick@ccs.neu.edu

More information

Chapter 22: Type Reconstruction (Type Inference)

Chapter 22: Type Reconstruction (Type Inference) Chapter 22: Type Reconstruction (Type Inference) Calculating a Principal Type for a Term Constraint based Typing Unification and Principle Types Extension with let-polymorphism Type Variables and Type

More information

Simple Dependent Types: Concord

Simple Dependent Types: Concord Simple Dependent Types: Concord Paul Jolly 1, Sophia Drossopoulou 1, Christopher Anderson 1, and Klaus Ostermann 2 1 Imperial College London 2 University of Technology Darmstadt Abstract. We suggest a

More information

Featherweight Wrap Java: wrapping objects and methods

Featherweight Wrap Java: wrapping objects and methods Vol. 7, No. 2, Special Issue OOPS Track at SAC 2007, February 2008 Featherweight Wrap Java: wrapping objects and methods Lorenzo Bettini, bettini@dsi.unifi.it Dipartimento di Informatica, Università di

More information

CS4215 Programming Language Implementation. Martin Henz

CS4215 Programming Language Implementation. Martin Henz CS4215 Programming Language Implementation Martin Henz Thursday 26 January, 2012 2 Chapter 4 The Language simpl In this chapter, we are exting the language epl in order to provide a more powerful programming

More information

Confined Mobile Functions

Confined Mobile Functions Confined Mobile Functions Z. Dilsun Kırlı Laboratory for Foundations of Computer Science Division of Informatics, The University of Edinburgh King s Buildings, Mayfield Road, Edinburgh, EH9 3JZ, UK Email:

More information

Mungo and StMungo: Tools for Typechecking Protocols in Java

Mungo and StMungo: Tools for Typechecking Protocols in Java 14 Mungo and StMungo: Tools for Typechecking Protocols in Java Ornela Dardha 1,SimonJ.Gay 1, Dimitrios Kouzapas 1, Roly Perera 1,2, A. Laura Voinea 1 and Florian Weber 1 1 School of Computing Science,

More information

Review. CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Let bindings (CBV) Adding Stuff. Booleans and Conditionals

Review. CS152: Programming Languages. Lecture 11 STLC Extensions and Related Topics. Let bindings (CBV) Adding Stuff. Booleans and Conditionals Review CS152: Programming Languages Lecture 11 STLC Extensions and Related Topics e ::= λx. e x ee c v ::= λx. e c (λx. e) v e[v/x] e 1 e 2 e 1 e 2 τ ::= int τ τ Γ ::= Γ,x : τ e 2 e 2 ve 2 ve 2 e[e /x]:

More information

Checks and Balances - Constraint Solving without Surprises in Object-Constraint Programming Languages: Full Formal Development

Checks and Balances - Constraint Solving without Surprises in Object-Constraint Programming Languages: Full Formal Development Checks and Balances - Constraint Solving without Surprises in Object-Constraint Programming Languages: Full Formal Development Tim Felgentreff, Todd Millstein, Alan Borning and Robert Hirschfeld Viewpoints

More information

Dynamic Logic with Non-rigid Functions

Dynamic Logic with Non-rigid Functions 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

More information

Agenda. CS301 Session 11. Common type constructors. Things we could add to Impcore. Discussion: midterm exam - take-home or inclass?

Agenda. CS301 Session 11. Common type constructors. Things we could add to Impcore. Discussion: midterm exam - take-home or inclass? Agenda CS301 Session 11 Discussion: midterm exam - take-home or inclass? Interlude: common type constructors Type soundness 1 2 Things we could add to Impcore Common type constructors Array is a type constructor,

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

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 4 MODULE, SPRING SEMESTER MATHEMATICAL FOUNDATIONS OF PROGRAMMING ANSWERS

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 4 MODULE, SPRING SEMESTER MATHEMATICAL FOUNDATIONS OF PROGRAMMING ANSWERS The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 4 MODULE, SPRING SEMESTER 2012 2013 MATHEMATICAL FOUNDATIONS OF PROGRAMMING ANSWERS Time allowed TWO hours Candidates may complete the front

More information

Race-free and Memory-safe Multithreading: Design and Implementation in Cyclone

Race-free and Memory-safe Multithreading: Design and Implementation in Cyclone Race-free and Memory-safe Multithreading: Design and Implementation in Cyclone Prodromos Gerakios Nikolaos Papaspyrou Konstantinos Sagonas School of Electrical and Computer Engineering National Technical

More information

Lambda Calculus. Type Systems, Lectures 3. Jevgeni Kabanov Tartu,

Lambda Calculus. Type Systems, Lectures 3. Jevgeni Kabanov Tartu, Lambda Calculus Type Systems, Lectures 3 Jevgeni Kabanov Tartu, 13.02.2006 PREVIOUSLY ON TYPE SYSTEMS Arithmetical expressions and Booleans Evaluation semantics Normal forms & Values Getting stuck Safety

More information

Written Presentation: JoCaml, a Language for Concurrent Distributed and Mobile Programming

Written Presentation: JoCaml, a Language for Concurrent Distributed and Mobile Programming Written Presentation: JoCaml, a Language for Concurrent Distributed and Mobile Programming Nicolas Bettenburg 1 Universitaet des Saarlandes, D-66041 Saarbruecken, nicbet@studcs.uni-sb.de Abstract. As traditional

More information

Modal Logic: Implications for Design of a Language for Distributed Computation p.1/53

Modal Logic: Implications for Design of a Language for Distributed Computation p.1/53 Modal Logic: Implications for Design of a Language for Distributed Computation Jonathan Moody (with Frank Pfenning) Department of Computer Science Carnegie Mellon University Modal Logic: Implications for

More information

Linear type theory for asynchronous session types

Linear type theory for asynchronous session types JFP 20 (1): 19 50, 2010. c Cambridge University Press 2009 doi:10.1017/s0956796809990268 First published online 8 December 2009 19 Linear type theory for asynchronous session types SIMON J. GAY Department

More information

Safe Parallel Programming with Session Java

Safe Parallel Programming with Session Java Safe Parallel Programming with Session Java Nicholas Ng, Nobuko Yoshida Olivier Pernet, Raymond Hu, and Yiannos Kryftis Imperial College London National Technical University of Athens Abstract. The session-typed

More information

Processes as Types: A Generic Framework of Behavioral Type Systems for Concurrent Processes

Processes as Types: A Generic Framework of Behavioral Type Systems for Concurrent Processes Processes as Types: A Generic Framework of Behavioral Type Systems for Concurrent Processes Atsushi Igarashi (Kyoto Univ.) based on joint work [POPL2001, TCS2003] with Naoki Kobayashi (Tohoku Univ.) Programming

More information

Structured Global Programming for Communication Behaviour

Structured Global Programming for Communication Behaviour Structured Global Programming for Communication Behaviour Marco Carbone 1 Kohei Honda 1 Nobuko Yoshida 2 1 Queen Mary, University of London, UK 2 Imperial College, London, UK Abstract. This paper presents

More information

Linear Type Theory for Asynchronous Session Types

Linear Type Theory for Asynchronous Session Types Linear Type Theory for Asynchronous Session Types Simon J. Gay 1 and Vasco T. Vasconcelos 2 1 Department of Computing Science, University of Glasgow, Glasgow G12 8QQ, UK. Email: 2

More information

Three Applications of Strictness in the Efficient Implementaton of Higher-Order Terms

Three Applications of Strictness in the Efficient Implementaton of Higher-Order Terms Three Applications of Strictness in the Efficient Implementaton of Higher-Order Terms Frank Pfenning Workshop on Implementation of Logic Réunion Island, France November 11, 2000 Joint work with Carsten

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

An Extended Behavioral Type System for Memory-Leak Freedom. Qi Tan, Kohei Suenaga, and Atsushi Igarashi Kyoto University

An Extended Behavioral Type System for Memory-Leak Freedom. Qi Tan, Kohei Suenaga, and Atsushi Igarashi Kyoto University An Extended Behavioral Type System for Memory-Leak Freedom Qi Tan, Kohei Suenaga, and Atsushi Igarashi Kyoto University Introduction n Memory leak, forgetting to deallocate an allocated memory cell, is

More information

Introduction to dependent types in Coq

Introduction to dependent types in Coq October 24, 2008 basic use of the Coq system In Coq, you can play with simple values and functions. The basic command is called Check, to verify if an expression is well-formed and learn what is its type.

More information

Choreography Synthesis as Contract Agreement

Choreography Synthesis as Contract Agreement Choreography Synthesis as Contract Agreement Julien Lange University of Leicester, UK jlange@le.ac.uk Alceste Scalas University of Cagliari, Italy alceste.scalas@unica.it We propose a formal model for

More information

CS 153 Lab4 and 5. Kishore Kumar Pusukuri. Kishore Kumar Pusukuri CS 153 Lab4 and 5

CS 153 Lab4 and 5. Kishore Kumar Pusukuri. Kishore Kumar Pusukuri CS 153 Lab4 and 5 CS 153 Lab4 and 5 Kishore Kumar Pusukuri Outline Introduction A thread is a straightforward concept : a single sequential flow of control. In traditional operating systems, each process has an address

More information

CSE-321 Programming Languages 2010 Final

CSE-321 Programming Languages 2010 Final Name: Hemos ID: CSE-321 Programming Languages 2010 Final Prob 1 Prob 2 Prob 3 Prob 4 Prob 5 Prob 6 Total Score Max 18 28 16 12 36 40 150 There are six problems on 16 pages, including two work sheets, in

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