Preface |
|
xv | |
Acknowledgments |
|
xix | |
List of Contributors |
|
xxi | |
List of Figures |
|
xxv | |
List of Tables |
|
xxxi | |
List of Abbreviations |
|
xxxiii | |
1 Contract-Oriented Design of Distributed Applications: A Tutorial |
|
1 | (26) |
|
|
|
|
|
|
|
2 | (2) |
|
1.1.1 From Service-Oriented to Contract-Oriented Computing |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
4 | (1) |
|
1.2 Specifying Contract-Oriented Services in CO2 |
|
|
4 | (4) |
|
|
5 | (1) |
|
|
5 | (1) |
|
1.2.3 An Execution Context |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
8 | (6) |
|
1.3.1 A Simple Dishonest Store |
|
|
8 | (2) |
|
1.3.2 A More Complex Dishonest Store |
|
|
10 | (1) |
|
|
11 | (2) |
|
1.3.4 An Honest Store, Finally |
|
|
13 | (1) |
|
1.3.5 A Recursive Honest Store |
|
|
13 | (1) |
|
1.4 Refining CO2 Specifications in Java Programs |
|
|
14 | (5) |
|
1.4.1 Compilation of CO2 Specifications into Java Skeletons |
|
|
15 | (2) |
|
1.4.2 Checking Honesty of Refined Java Programs |
|
|
17 | (2) |
|
|
19 | (3) |
|
|
20 | (2) |
|
|
22 | (5) |
2 Contract-Oriented Programming with Timed Session Types |
|
27 | (22) |
|
|
|
|
|
|
Alessandro Sebastian Podda |
|
|
|
|
27 | (2) |
|
|
29 | (7) |
|
2.2.1 Specifying Contracts |
|
|
29 | (2) |
|
|
31 | (4) |
|
2.2.3 Run-Time Monitoring of Contracts |
|
|
35 | (1) |
|
2.3 Contract-Oriented Programming |
|
|
36 | (7) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
38 | (2) |
|
|
40 | (1) |
|
2.3.5 A Recursive Honest Store |
|
|
41 | (2) |
|
|
43 | (3) |
|
|
44 | (2) |
|
|
46 | (3) |
3 A Runtime Monitoring Tool for Actor-Based Systems |
|
49 | (28) |
|
|
|
|
|
|
|
49 | (2) |
|
|
51 | (6) |
|
3.2.1 Runtime Monitoring Criteria |
|
|
52 | (1) |
|
3.2.2 A Branching-Time Logic for Specifying Correctness Properties |
|
|
52 | (3) |
|
|
55 | (2) |
|
3.3 A Tool for Monitoring Erlang Applications |
|
|
57 | (6) |
|
3.3.1 Concurrency-Oriented Development Using Erlang |
|
|
57 | (1) |
|
3.3.2 Reasoning about Data |
|
|
58 | (4) |
|
3.3.2.1 Properties with specific PIDs |
|
|
61 | (1) |
|
3.3.2.2 Further reasoning about data |
|
|
61 | (1) |
|
3.3.3 Monitor Compilation |
|
|
62 | (1) |
|
|
63 | (10) |
|
3.4.1 Creating the Target System |
|
|
64 | (4) |
|
3.4.1.1 Setting up the Erlang project |
|
|
64 | (2) |
|
3.4.1.2 Running and testing the server |
|
|
66 | (2) |
|
3.4.2 Instrumenting the Test System |
|
|
68 | (5) |
|
3.4.2.1 Property specification |
|
|
68 | (1) |
|
3.4.2.2 Monitor synthesis and instrumentation |
|
|
69 | (1) |
|
3.4.2.3 Running the monitored system |
|
|
70 | (1) |
|
3.4.2.4 Running the correct server |
|
|
71 | (2) |
|
|
73 | (1) |
|
3.5.1 Related and Future Work |
|
|
73 | (1) |
|
|
74 | (3) |
4 How to Verify Your Python Conversations |
|
77 | (22) |
|
|
|
|
78 | (1) |
|
4.2 Scribble-Based Runtime Verification |
|
|
79 | (3) |
|
|
79 | (2) |
|
4.2.2 Monitoring Requirements |
|
|
81 | (1) |
|
4.3 Conversation Programming in Python |
|
|
82 | (3) |
|
4.4 Monitor Implementation |
|
|
85 | (2) |
|
4.5 Monitoring Interruptible Systems |
|
|
87 | (7) |
|
4.5.1 Use Case: Resource Access Control (RAC) |
|
|
88 | (2) |
|
4.5.2 Interruptible Multiparty Session Types |
|
|
90 | (1) |
|
4.5.3 Programming and Verification of Interruptible Systems |
|
|
91 | (3) |
|
4.5.4 Monitoring Interrupts |
|
|
94 | (1) |
|
4.6 Formal Foundations of MPST-Based Runtime Verification |
|
|
94 | (2) |
|
|
96 | (1) |
|
|
97 | (2) |
5 The DCR Workbench: Declarative Choreographies for Collaborative Processes |
|
99 | (26) |
|
|
|
|
99 | (3) |
|
5.1.1 History of the DCR Workbench |
|
|
100 | (1) |
|
|
101 | (1) |
|
|
102 | (1) |
|
5.3 Dynamic Condition-Response Graphs |
|
|
102 | (5) |
|
|
102 | (1) |
|
|
103 | (1) |
|
|
104 | (1) |
|
|
105 | (2) |
|
5.4 Modelling with the Workbench |
|
|
107 | (4) |
|
5.4.1 Inputting a Model: The Parser Panel |
|
|
107 | (3) |
|
5.4.2 Visualisation and Simulation: The Visualiser and Activity Log Panels |
|
|
110 | (1) |
|
|
111 | (4) |
|
|
115 | (2) |
|
|
117 | (2) |
|
|
119 | (1) |
|
|
120 | (1) |
|
|
120 | (1) |
|
|
121 | (4) |
6 A Tool for Choreography-Based Analysis of Message-Passing Software |
|
125 | (22) |
|
|
|
|
|
126 | (1) |
|
6.2 Overview of the Theory |
|
|
127 | (5) |
|
|
132 | (3) |
|
6.4 Modelling of an ATM Service |
|
|
135 | (6) |
|
6.4.1 ATM Service - Version 1 |
|
|
136 | (1) |
|
6.4.2 ATM Service - Version 2 |
|
|
137 | (4) |
|
6.4.3 ATM Service - Version 3 (fixed) |
|
|
141 | (1) |
|
6.5 Conclusions and Related Work |
|
|
141 | (3) |
|
|
144 | (3) |
7 Programming Adaptive Microservice Applications: an AIOCJ Tutorial |
|
147 | (22) |
|
|
|
|
|
|
147 | (3) |
|
|
150 | (3) |
|
7.2.1 AIOCJ Architecture and Workflow |
|
|
151 | (2) |
|
7.3 Choreographic Programming |
|
|
153 | (2) |
|
7.4 Integration with Legacy Software |
|
|
155 | (3) |
|
|
158 | (4) |
|
7.6 Deployment and Adaptation Procedure |
|
|
162 | (3) |
|
|
165 | (1) |
|
|
166 | (3) |
8 JaDA - the Java Deadlock Analyzer |
|
169 | (24) |
|
|
|
|
169 | (2) |
|
|
171 | (2) |
|
8.3 Overview of JaDA's Theory |
|
|
173 | (8) |
|
8.3.1 The Abstract Behavior of the Network Class |
|
|
173 | (2) |
|
8.3.2 Behavioral Type Inference |
|
|
175 | (2) |
|
8.3.3 Analysis of Behavioral Types |
|
|
177 | (4) |
|
|
181 | (6) |
|
|
181 | (1) |
|
|
181 | (3) |
|
8.4.3 The Current JVML Coverage |
|
|
184 | (2) |
|
|
186 | (1) |
|
|
187 | (1) |
|
|
187 | (2) |
|
8.6 Related Tools and Assessment |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
191 | (2) |
9 Type-Based Analysis of Linear Communications |
|
193 | (26) |
|
|
|
193 | (4) |
|
|
197 | (8) |
|
|
205 | (9) |
|
9.3.1 Fibonacci Stream Network |
|
|
205 | (2) |
|
9.3.2 Full-Duplex and Half-Duplex Communications |
|
|
207 | (2) |
|
|
209 | (1) |
|
|
210 | (2) |
|
9.3.5 Ill-typed, Lock-free Process Networks |
|
|
212 | (2) |
|
|
214 | (1) |
|
|
215 | (4) |
10 Session Types with Linearity in Haskell |
|
219 | (24) |
|
|
|
|
219 | (3) |
|
10.2 Pre-Session Types in Haskell |
|
|
222 | (4) |
|
10.2.1 Tracking Send and Receive Actions |
|
|
223 | (1) |
|
10.2.2 Partial Safety via a Type-Level Function for Duality |
|
|
224 | (1) |
|
|
225 | (1) |
|
10.3 Approaches in the Literature |
|
|
226 | (13) |
|
10.3.1 Note on Recursion and Duality |
|
|
227 | (1) |
|
|
227 | (2) |
|
10.3.3 Multi-Channel Linearity |
|
|
229 | (4) |
|
10.3.4 An Alternate Approach |
|
|
233 | (2) |
|
10.3.5 Multi-Channels with Inference |
|
|
235 | (1) |
|
10.3.6 Session Types via Effect Types |
|
|
236 | (2) |
|
|
238 | (1) |
|
10.4 Future Direction and Open Problems |
|
|
239 | (1) |
|
|
240 | (3) |
11 An OCaml Implementation of Binary Sessions |
|
243 | (22) |
|
|
|
|
244 | (1) |
|
11.2 A Few Simple Examples |
|
|
245 | (3) |
|
|
248 | (7) |
|
11.4 Extended Example: The Bookshop |
|
|
255 | (5) |
|
|
260 | (1) |
|
|
261 | (4) |
12 Lightweight Functional Session Types |
|
265 | (22) |
|
|
|
|
265 | (1) |
|
|
266 | (4) |
|
|
270 | (8) |
|
|
270 | (4) |
|
12.3.2 Typing and Kinding Judgments |
|
|
274 | (4) |
|
|
278 | (3) |
|
|
278 | (1) |
|
|
279 | (2) |
|
12.5 Links with Session Types |
|
|
281 | (3) |
|
|
282 | (1) |
|
12.5.2 Type Reconstruction |
|
|
283 | (1) |
|
12.6 Conclusion and Future Work |
|
|
284 | (1) |
|
|
284 | (3) |
13 Distributed Programming Using Java APIs Generated from Session Types |
|
287 | (22) |
|
|
13.1 Background: Distributed Programming in Java |
|
|
287 | (3) |
|
|
288 | (2) |
|
|
290 | (1) |
|
13.2 Scribble Endpoint API Generation: Toolchain Overview |
|
|
290 | (11) |
|
13.2.1 Global Protocol Specification |
|
|
291 | (3) |
|
13.2.2 Endpoint API Generation |
|
|
294 | (3) |
|
13.2.3 Hybrid Session Verification |
|
|
297 | (2) |
|
13.2.4 Additional Math Service Endpoint Examples |
|
|
299 | (2) |
|
13.3 Real-World Case Study: HTTP (GET) |
|
|
301 | (4) |
|
13.3.1 H 1-1'P in Scribble: First Version |
|
|
302 | (1) |
|
13.3.2 HTTP in Scribble: Revised |
|
|
303 | (2) |
|
13.4 Further Endpoint API Generation Features |
|
|
305 | (2) |
|
|
307 | (2) |
14 Mungo and StMungo: Tools for Typechecking Protocols in Java |
|
309 | (20) |
|
|
|
|
|
|
|
|
309 | (2) |
|
14.2 Mungo: Typestate Checking for Java |
|
|
311 | (4) |
|
|
312 | (3) |
|
14.3 StMungo: Typestates from Communication Protocols |
|
|
315 | (5) |
|
14.3.1 Example: Travel Agency |
|
|
316 | (4) |
|
14.4 POP3: Typechecking an Internet Protocol Client |
|
|
320 | (6) |
|
14.4.1 Challenges of Using Mungo and StMungo in the Real World |
|
|
324 | (2) |
|
|
326 | (1) |
|
|
327 | (2) |
15 Protocol-Driven MPI Program Generation |
|
329 | (24) |
|
|
|
|
329 | (2) |
|
15.2 Pabble: Parameterised Scribble |
|
|
331 | (2) |
|
|
333 | (1) |
|
15.3.1 MPI Backbone Generation from Ring Protocol |
|
|
334 | (1) |
|
|
334 | (4) |
|
|
335 | (3) |
|
|
336 | (1) |
|
15.4.1.2 Passing data between backbone and kernel through queues |
|
|
336 | (1) |
|
|
337 | (1) |
|
|
338 | (4) |
|
15.5.1 Global Protocols Syntax |
|
|
338 | (3) |
|
15.5.1.1 Restriction on constants |
|
|
340 | (1) |
|
|
341 | (1) |
|
15.6 MPI Backbone Generation |
|
|
342 | (6) |
|
|
342 | (2) |
|
15.6.2 Parallel Interaction |
|
|
344 | (1) |
|
15.6.3 Internal Interaction |
|
|
344 | (1) |
|
15.6.4 Control-flow: Iteration and For-loop |
|
|
345 | (1) |
|
15.6.5 Control-flow: Choice |
|
|
345 | (1) |
|
15.6.6 Collective Operations: Scatter, Gather and All-to-all |
|
|
346 | (2) |
|
|
348 | (1) |
|
15.7 Merging MPI Backbone and Kernels |
|
|
348 | (2) |
|
15.7.1 Annotation-Guided Merging Process |
|
|
348 | (1) |
|
|
349 | (1) |
|
|
349 | (1) |
|
|
350 | (1) |
|
|
350 | (1) |
|
|
350 | (1) |
|
|
351 | (2) |
16 Deductive Verification of MPI Protocols |
|
353 | (20) |
|
|
|
|
|
|
|
353 | (2) |
|
16.2 The Finite Differences Algorithm and Common Coding Faults |
|
|
355 | (3) |
|
16.3 The Protocol Language |
|
|
358 | (4) |
|
16.4 Overview of the Verification Procedure |
|
|
362 | (2) |
|
|
364 | (4) |
|
|
368 | (1) |
|
|
369 | (1) |
|
|
370 | (3) |
Index |
|
373 | (2) |
About the Editors |
|
375 | |