Facilitating Concurrency in Hybrid Programs D E C E M E C E M B E - - PowerPoint PPT Presentation

facilitating concurrency in hybrid programs
SMART_READER_LITE
LIVE PREVIEW

Facilitating Concurrency in Hybrid Programs D E C E M E C E M B E - - PowerPoint PPT Presentation

Facilitating Concurrency in Hybrid Programs D E C E M E C E M B E R E R 1 0 , 2 0 1 9 15-824: Logical Foundations of Cyber-Physical Systems (Fall 2019) Haithem Turki Long Pham Languages shape our thinking Shaden enfreu eude - Malicious


slide-1
SLIDE 1

Facilitating Concurrency in Hybrid Programs

D E C E M E C E M B E R E R 1 0 , 2 0 1 9

15-824: Logical Foundations of Cyber-Physical Systems (Fall 2019) Haithem Turki Long Pham

slide-2
SLIDE 2

Languages shape our thinking

  • Malicious enjoyment of the misfortunes of others. (Oxford English

Dictionary) Shaden enfreu eude

2

slide-3
SLIDE 3

3

Overview

  • Motivation and Background
  • Theory
  • Implementation
  • Future Work
slide-4
SLIDE 4

Motivation and Background

slide-5
SLIDE 5

Cyber-physical systems (CPSs) are inherently composite

Inte tera racti tion b betw tween C CPSs Int Interaction wi n within a n a CPS

5

Image courtesy of http://lfcps.org/course/lfcps19.html Image courtesy of https://lfcps.org/lfcps/slides/09-time-slides.pdf

slide-6
SLIDE 6

Inputs, outputs, and parallel composition

  • C. A. R. (Tony) Hoare,

Communicating Sequential Processes, 1978

6

Image courtesy of Microsoft Research

slide-7
SLIDE 7

Inputs, outputs, and parallel composition

Consumer = order!coffee -> how-much?x -> pay!x -> get?y -> STOP Barista = order?y -> how-much!2 -> pay?x -> get!y -> STOP Consumer || Barista = order!coffee -> how-much!2 -> pay!2 -> get!coffee -> STOP

7

slide-8
SLIDE 8

Inputs, outputs, and parallel composition

Consumer = order!coffee -> how-much?x -> get?y -> pay!x -> STOP Barista = order?y -> how-much!2 -> pay?x -> get!y -> STOP Consumer || Barista = order!coffee -> how-much!2 -> STOP

8

slide-9
SLIDE 9

Adding concurrency to hybrid programs

  • Adding channels to hybrid programs
  • Providing trace semantics
  • Devising a sequentialization algorithm
  • Extending KeYmaera X to provide a proof-of-concept implementation supporting our

augmented syntax Our ur C Cont

  • ntributions

ns

9

slide-10
SLIDE 10

Theory

slide-11
SLIDE 11

Local variables

Consumer = x:=1; pay!x; x:=0 Barista = pay?x; x:=x+1

11

slide-12
SLIDE 12

Global variables

12

slide-13
SLIDE 13

13

Syntax of concurrent hybrid programs

slide-14
SLIDE 14

Trace semantics

14

slide-15
SLIDE 15

Trace semantics

15

slide-16
SLIDE 16

Trace semantics

16

slide-17
SLIDE 17

Implementation

slide-18
SLIDE 18

Current Implementation

  • Extended existing KeYmaera X [1]

theorem prover

  • Augmented KeYmaera X parser and lexer

to handle necessary syntax

  • Added new Parallel program type
  • Propagated new Channel concept

throughout existing KeYmaera X codebase

Author horing ng P Paral allel P Prog

  • gram

ams

18

[1] http://www.ls.cs.cmu.edu/KeYmaeraX/ Authoring parallel programs in KeYmaera X web interface

slide-19
SLIDE 19

Current Implementation

  • Implemented subset of the core and

derived axioms needed to prove the safety of parallel programs

  • Full set of axioms still to be

implemented

  • But able to complete proofs of small

examples in current implementation Proof

  • ofs f

for Paral allel P Prog

  • gram

ams

19

Parallel axioms suggested in KeYmaera X web interface

slide-20
SLIDE 20

Current Implementation

20

Proof tree in KeYmaera X web interface Completed proof in KeYmaera X web interface

slide-21
SLIDE 21

21

Future Work

  • Providing full implementation of our extension in KeYmaera X
  • Providing a formal definition of equality based on trace semantics
  • Formally proving the sequentialization axioms
  • Introduce more constructs to make calculus for concurrent hybrid programs more expressive
  • Example: wake up a stalled program when an ODE of another program reaches a certain

state

slide-22
SLIDE 22

22

Thank you!

  • Code available on GitHub: https://github.com/hturki/KeYmaeraX-release/tree/parallel