Formalising an intermediate language for POSIX shell
Nicolas Jeannerod S´ eminaire Gallium, Septembre 18, 2017
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 1 / 35
Formalising an intermediate language for POSIX shell Nicolas - - PowerPoint PPT Presentation
Formalising an intermediate language for POSIX shell Nicolas Jeannerod S eminaire Gallium, Septembre 18, 2017 Nicolas Jeannerod S eminaire Gallium September 18, 2017 1 / 35 Big picture Nicolas Jeannerod S eminaire Gallium
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 1 / 35
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 2 / 35
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 2 / 35
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 2 / 35
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 2 / 35
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 2 / 35
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 2 / 35
Gallery of horrors in shell Dynamic!
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 3 / 35
Gallery of horrors in shell Dynamic!
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 4 / 35
Gallery of horrors in shell Dynamic!
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 4 / 35
Gallery of horrors in shell Dynamic!
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 5 / 35
Gallery of horrors in shell Dynamic!
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 5 / 35
Gallery of horrors in shell Dynamic!
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 5 / 35
Gallery of horrors in shell Dynamic!
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 5 / 35
Gallery of horrors in shell Dynamic!
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 5 / 35
Gallery of horrors in shell Dynamic!
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 5 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 6 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 7 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 7 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 7 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 7 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 7 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 7 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 7 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 7 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 7 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 8 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 8 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 8 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 8 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 8 / 35
Gallery of horrors in shell Expansion
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 8 / 35
Gallery of horrors in shell Inconstant semantics
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 9 / 35
Gallery of horrors in shell Inconstant semantics
1 The parsing gives us ["rm"; "-r"; "$file"]; 2 We apply parameter expansion and get ["rm"; "-r"; "git-sucks"]; 3 We apply field splitting, but only where we just applied the
4 We flatten everything: ["rm"; "-r"; "git"; "sucks"]; 5 We evaluate that so-called simple command. Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 10 / 35
Gallery of horrors in shell Inconstant semantics
1 The parsing gives us ["rm"; "-r"; "$file"]; 2 We apply parameter expansion and get ["rm"; "-r"; "git-sucks"]; 3 We apply field splitting, but only where we just applied the
4 We flatten everything: ["rm"; "-r"; "git"; "sucks"]; 5 We evaluate that so-called simple command. Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 10 / 35
Gallery of horrors in shell Inconstant semantics
1 The parsing gives us ["rm"; "-r"; "$file"]; 2 We apply parameter expansion and get ["rm"; "-r"; "git-sucks"]; 3 We apply field splitting, but only where we just applied the
4 We flatten everything: ["rm"; "-r"; "git"; "sucks"]; 5 We evaluate that so-called simple command. Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 10 / 35
Gallery of horrors in shell Inconstant semantics
1 The parsing gives us ["rm"; "-r"; "$file"]; 2 We apply parameter expansion and get ["rm"; "-r"; "git-sucks"]; 3 We apply field splitting, but only where we just applied the
4 We flatten everything: ["rm"; "-r"; "git"; "sucks"]; 5 We evaluate that so-called simple command. Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 10 / 35
Gallery of horrors in shell Inconstant semantics
1 The parsing gives us ["rm"; "-r"; "$file"]; 2 We apply parameter expansion and get ["rm"; "-r"; "git-sucks"]; 3 We apply field splitting, but only where we just applied the
4 We flatten everything: ["rm"; "-r"; "git"; "sucks"]; 5 We evaluate that so-called simple command. Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 10 / 35
Gallery of horrors in shell Inconstant semantics
1 The parsing gives us ["rm"; "-r"; "$file"]; 2 We apply parameter expansion and get ["rm"; "-r"; "git-sucks"]; 3 We apply field splitting, but only where we just applied the
4 We flatten everything: ["rm"; "-r"; "git"; "sucks"]; 5 We evaluate that so-called simple command. Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 10 / 35
Gallery of horrors in shell Inconstant semantics
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 11 / 35
Gallery of horrors in shell Inconstant semantics
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 11 / 35
Gallery of horrors in shell Inconstant semantics
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 11 / 35
Gallery of horrors in shell Inconstant semantics
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 11 / 35
Gallery of horrors in shell Inconstant semantics
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 11 / 35
Gallery of horrors in shell Inconstant semantics
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 11 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 12 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 13 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 13 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 13 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 13 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 14 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 14 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 14 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 14 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 14 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 14 / 35
Gallery of horrors in shell Control flow
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 14 / 35
The CoLiS language Requirements
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 15 / 35
The CoLiS language Requirements
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 16 / 35
The CoLiS language Requirements
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 16 / 35
The CoLiS language Requirements
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 16 / 35
The CoLiS language Requirements
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 16 / 35
The CoLiS language Requirements
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 16 / 35
The CoLiS language Requirements
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 16 / 35
The CoLiS language Requirements
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 16 / 35
The CoLiS language Requirements
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 16 / 35
The CoLiS language Requirements
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 16 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 17 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 18 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 18 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 18 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 18 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 18 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 18 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 19 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 19 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 19 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 19 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 19 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 19 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 19 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 19 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 19 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 19 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 20 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 20 / 35
The CoLiS language Definitions
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 20 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 21 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 22 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 22 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 22 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 22 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 22 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 22 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 22 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 22 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 23 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 23 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 23 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 24 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 24 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 25 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 25 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 25 / 35
Formalisation Formulation
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 25 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 26 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 27 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 28 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 28 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 28 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 29 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 30 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 31 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 31 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 32 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 32 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 33 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 34 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 34 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 34 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 34 / 35
Formalisation Proof
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 34 / 35
Nicolas Jeannerod S´ eminaire Gallium September 18, 2017 35 / 35