mission to make digital or hard copies of part or all of this work for personal or classroom use is .... methods listed in the definition, with signatures obtained from those in ... A legal instantiation sets up a binding between a method or construc
mission to make digital or hard copies of part or all of this work for personal or classroom .... methods listed in the definition, with signatures obtained from those ...
Java, JSF 2, PrimeFaces, Servlets, JSP, Ajax, jQuery, Spring, Hibernate, RESTful
Web Services, Hadoop, Android. Developed and taught by well-known author ...
In order to overcome this inadequacy, Bono and Padovani [3], and Bernardi ...... Session types: The concept of a session type originated in the work of Honda et ...
Apr 11, 2012 - sequent proofs as Ï-calculus processes, and cut elimination as process ... when provided with the implementation of an API will provide a ...
P, Q[(sid, rev(r)) = (p, st, w)], Ï, Ïâ², ej if Ï(s)=(sid, ... Ψ ::= â | Ψ, (sid,r) : G|γ a global stream environment ..... Robin Milner, Joachim Parrow, and David Walker.
May 27, 2011 - a static type system that combines session-typed channels and a form of ...... to include features associated with nominal subtyping, such as an ...
Refinement types, as defined for ML [6], are a form of dependent types that allow ... met increasing attention, with several notable works on type checking for functional programming, such .... (new wz: T)(new xy: U)P â¡ (new xy: U)(new wz: T)P ...
Jan 7, 2008 - to multiparty, asynchronous sessions, which often arise in practical ...... are the processes of Alice, Bob and Carol after initial multicasting.
Jun 6, 2009 - The auctioneer then puts the item on sale, and gets back to the seller ..... The rest of this section is dedicated to the proof of the main results of our ..... The types for the client and the server are dual in the first case, but not
and restriction of standard Ï- channels or, recursive session types and ..... both, i.e., a linear connection â⯠[ËT] used exactly once [9] according to its capability.
Apr 24, 2017 - Instead of Ï-calculus, it is also possible to formulate session types in the .... calling a session API exify twice, which essentially turns chan(S, ...
bounds, and how full Java wildcards could be modelled in a type sound way. ..... in the spirit of WildFJ, that is, without explicit open and close expressions.
The following section presents an informal introduction to type-based atom- icity checking .... supply a ghost argument z and an actual parameter e of type cnãzã.
Abstract~We introduce a new programming language concept called typestot'e ... values. . . This paper deï¬nes typestate
erative and higher order sessions. Then we study its progress through a new effect system. As far as we know, ours is the first session type system which assures.
int cnt = 0; for(String s: c) cnt += s.length(); return cnt;. } old new ... 7. □ In effect,
Java inserts the correct cast automatically, based on the declared type (“Type ...
Nov 27, 2013 - Abstract. A type system is introduced for a strict but expressive subset of Java in order to infer resource upper bounds on both the heap-space.
Adopting the integrated Scoped Types and Aspects approach can significantly improve both the quality and performance of a real-time Java systems, resulting.
Typestate tracking' 1s a program analysis technique which enhances program reliability by ... discuss the consequences of typestate checking for software reliability and software ... The authors are with the IBM Thomas J. Watson Research Center, P. 0
equivalence, i.e. equating networks offering the same services to a user. We illustrate our static-dynamic analysis system with an ATM protocol as a running ...
Gradual Session Types - ResearchGate › publication › fulltext › 32771806... › publication › fulltext › 32771806...by A Igarashi · 2018 · Cited by 33 · Related articlesSep 15, 2018 — statically-typed language with an affine type discipline. ... all
[s[r1, r2]?{li(xi).Pi}i]α | ãr ; sãr1, r2, lj ãvãã · hã ââ [Pj [v/xj ]]α | ãr ; hã â â â âbraâ. [if tt then P else Q]α ââ [P]α. [if ff then P else Q]α ââ [Q]α. âcndâ. [P]α | N ââ [P ] ...
run in parallel (can be embedded or external). â» act as membranes ... Session types for monitoring ... Three roles are involved: Client, ATM and bank Server.
Jan 13, 2014 ... S. Gay, V. Vasconcelos, A. Ravara, N. Gesbert, A. Caldeira,. Modular ... Research
/implement new features and issues that may arise. ... Page 7 ...
Typestate and Session Types for Java Dimitris Kouzapas Department of Computing Science, University of Glasgow
January 13, 2014
Objective I
University of Glasgow Objective: I
Extend the Java compiler to support typestate for Java objects.
I
Express (multiparty) session types as typestates for objects.
I
Published work: S. Gay, V. Vasconcelos, A. Ravara, N. Gesbert, A. Caldeira, Modular Session Types for Distributed Object-Oriented Programming, POPL ’10, 2010.
I
A first implementation was called Bica: I I
I
University of Lisbon. Used the Java annotation support to describe typestate for Java objects. Never finished.
Java Typestate Project
I
Use a compiler tool.
I
Develop a language for the description of a typestate.
I
Implement typestate for basic features of the Java language.
I
Test different implementation semantics.
I
Research/implement new features and issues that may arise.
Jast Add Compiler Tool
I
Java based
I
Describe the nodes for an abstract syntax tree as java classes.
I
Parsing creates the AST.
I
Aspect-oriented programming to traverse/process/transform the AST.
Development to the date I
Use the Java 1.4 compiler developed by the Jast Add team.
I
Suppress features that are not supported by the theory so far (e.g. inheritance, multithreading).
I
Develop a language to describe typestate and extend the Java syntax.
I
Finite state graph to abstract the typestate type.
I
Analyse and extract the typestate of local variables (i.e variables declared in methods) as a graph.
I
Simulation (bisimulation) algorithm to check if a local variable usage graph conforms to the typestate definition of the local variable.
Incomplete Features
I
Analyse and extract typestate for class fields.
I
Check that a field usage graph conforms to the typestate definition of the field.
I
Extend the typestate language to support typestate for method arguments - Enable for the return of typestate objects.
I
Develop a layer on top of Java sockets (and Java IO) to support multiparty session types communication.
Hello World Example
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.
typestate HelloTS { main { void HelloWorld(String); either{Alice, Bob} } Alice { void HelloAlice(); } Bob { void HelloBob(int); } }
class Hello typestates HelloTS { public void HelloWorld(String s) { System.out.println(”Hello World : ” + s); } public void HelloAlice() { System.out.println(”Hello Alice”); } public void HelloBob(int i) { System.out.println(”Hello Bob : ” + i); } public static void main(String[] args) { Hello h = new Hello(); h.HelloWorld(”Hi”); if(cond) h.HelloBob(5); else h.HelloAlice(); }
Automated code generation using Scribble
1. 2. 3. 4.
protocol Greetings(role Alice, role Bob) { say(Hello) from Alice to Bob; say(Hello) from Bob to Alice; }
Automated code generation using Scribble
1. 2. 3. 4.
protocol Greetings(role Alice, role Bob) { say(Hello) from Alice to Bob; say(Hello) from Bob to Alice; }
1. 2. 3. 4. 5.
typestate BobSession{ main { String receiveFromAlice(); void sendToAlice(String); } }
1. 2. 3. 4. 5.
typestate AliceSession{ main { void sendToBob(String); String receiveFromBob(); } }
Automated Code Generation using Scribble
1. 2. 3. 4. 5. 6. 7. 8.
class Bob typestates BobSession { MPSocket s = initSocket(); public String receiveFromAlice(){ return (String) s.receive(); } public void sendToAlice(String s) { s.send(s); }
Automated Code Generation using Scribble
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.
class Bob typestates BobSession { MPSocket s = initSocket(); public String receiveFromAlice(){ return (String) s.receive(); } public void sendToAlice(String s) { s.send(s); } public static void main(String[] args) { Bob bob = new Bob(); String s = bob.receiveFromAlice(); bob.sendToAlice(”Hello Alice”); } }
Future Work I
Gay et. al. work develops an inductive type system for type checking whereas the implementation uses a co-inductive simulation algorithm for type checking. Need to develop the theory.
I
Typestate inference.
I
Typestate and Inheritance.
I
Typestate and Polymorphism (also session types and polymorphism).