definitive semantic descriptions
play

Definitive Semantic Descriptions Peter D. Mosses BRICS & - PowerPoint PPT Presentation

Definitive Semantic Descriptions Peter D. Mosses BRICS & Department of Computer Science University of Aarhus, Denmark 1st APPSEM-II Workshop, Nottingham, March 2003 Conventional semantic descriptions Abstract syntax (fragment) Expressions


  1. Definitive Semantic Descriptions Peter D. Mosses BRICS & Department of Computer Science University of Aarhus, Denmark 1st APPSEM-II Workshop, Nottingham, March 2003

  2. Conventional semantic descriptions Abstract syntax (fragment) Expressions e ∈ Exp e :: = con | x | e 0 bop e 1 | ∼ e | ... Commands c ∈ Com c :: = x : = e | c 0 ; c 1 | if e then c | ... . . .

  3. Conventional semantic descriptions Auxiliary entities (fragment) Environments ρ ∈ Env = Var → BV σ ∈ S = Loc → SV ... Stores . . .

  4. Conventional semantic descriptions Semantics (SOS fragment) ρ ⊢ � e , σ � − → � e ′ , σ ′ � Expressions ρ ( x ) = l , σ ( l ) = v (1) ρ ⊢ � x , σ � − → � v , σ �

  5. Conventional semantic descriptions Semantics (SOS fragment) ρ ⊢ � c , σ � − → � c ′ , σ ′ � Commands ρ ⊢ � e , σ � − → � e ′ , σ ′ � (2) → � if e ′ then c , σ ′ � ρ ⊢ � if e then c , σ � − ρ ⊢ � if true then c , σ � − → � c , σ � (3) ρ ⊢ � if false then c , σ � − → � nil , σ � (4)

  6. Possibility of reuse of parts of descriptions? • usually cut-and-paste, edit, . . . • explicit modules don’t help much . . . Best chance for reuse with descriptions of individual constructs (or of a few closely-related constructs)

  7. Conventional descriptions of constructs Commands c ∈ Com ρ ∈ Env , σ ∈ S ,... ρ ⊢ � c , σ � − → � c ′ , σ ′ �

  8. Conventional descriptions of constructs Commands: Conditional c :: = if e then c V ⊇ { true , false } ρ ⊢ � e , σ � − → � e ′ , σ ′ � (5) → � if e ′ then c , σ ′ � ρ ⊢ � if e then c , σ � − . . .

  9. Possibility of reuse of parts of descriptions! • a language description is the collection of the descriptions of its individual constructs • need to develop libraries of descriptions of individual constructs and auxiliary entities Unfortunately, there’s a major problem: combining constructs sometimes requires reformulation of their descriptions

  10. We need definitive descriptions of constructs! • conventional SOS and denotational semantics don’t support definitive descriptions • modular SOS [see the proceedings] and action semantics definitely do • does monadic denotational semantics?

  11. Definitive descriptions of constructs Commands c ∈ Com X → c ′ − c Final ⊇ { nil }

  12. Definitive descriptions of constructs Commands: Conditional c :: = if e then c V ⊇ { true , false } X → e ′ − e (6) → if e ′ then c X − if e then c . . .

  13. Definitive descriptions of constructs Expressions e ∈ Exp X → e ′ − e Final ⊇ Con

  14. Definitive descriptions of constructs Expressions: Constant Identifier e :: = x ρ Env : U = { ρ ,... } , ρ ( x ) = con (7) U − → con x

  15. Status • Libraries of definitive descriptions of constructs (and auxiliary entities) are being developed for MSOS and action semantics • A language-independent abstract syntax is being developed • Bisimulation proofs can be language- independent too, based on the definitive descriptions of the constructs involved

  16. Conclusion • Describe individual constructs definitively • Contribute to libraries • Refer to libraries

Recommend


More recommend