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

definitive semantic descriptions
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Definitive Semantic Descriptions

Peter D. Mosses

BRICS & Department of Computer Science University of Aarhus, Denmark 1st APPSEM-II Workshop, Nottingham, March 2003

slide-2
SLIDE 2

Conventional semantic descriptions

Abstract syntax (fragment) Expressions e ∈ Exp

e ::= con | x | e0 bop e1 | ∼e | ...

Commands c ∈ Com

c ::= x:=e | c0;c1 | if e then c | ...

. . .

slide-3
SLIDE 3

Conventional semantic descriptions

Auxiliary entities (fragment) Environments ρ ∈ Env = Var → BV Stores

σ ∈ S = Loc → SV ...

. . .

slide-4
SLIDE 4

Conventional semantic descriptions

Semantics (SOS fragment)

Expressions

ρ ⊢ e,σ − → e′,σ′

ρ(x) = l, σ(l) = v ρ ⊢ x,σ − → v,σ

(1)

slide-5
SLIDE 5

Conventional semantic descriptions

Semantics (SOS fragment)

Commands

ρ ⊢ c,σ − → c′,σ′

ρ ⊢ e,σ − → e′,σ′ ρ ⊢ if e then c,σ − → if e′ then c,σ′

(2)

ρ ⊢ if true then c,σ − → c,σ

(3)

ρ ⊢ if false then c,σ − → nil,σ

(4)

slide-6
SLIDE 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)

slide-7
SLIDE 7

Conventional descriptions of constructs

Commands

c ∈ Com ρ ∈ Env,σ ∈ S,... ρ ⊢ c,σ − → c′,σ′

slide-8
SLIDE 8

Conventional descriptions of constructs

Commands: Conditional

c ::= if e then c V ⊇ {true,false} ρ ⊢ e,σ − → e′,σ′ ρ ⊢ if e then c,σ − → if e′ then c,σ′

(5) . . .

slide-9
SLIDE 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

slide-10
SLIDE 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?
slide-11
SLIDE 11

Definitive descriptions of constructs

Commands

c ∈ Com c

X

− → c′ Final ⊇ {nil}

slide-12
SLIDE 12

Definitive descriptions of constructs

Commands: Conditional

c ::= if e then c V ⊇ {true,false} e

X

− → e′ if e then c

X

− → if e′ then c

(6) . . .

slide-13
SLIDE 13

Definitive descriptions of constructs

Expressions

e ∈ Exp e

X

− → e′ Final ⊇ Con

slide-14
SLIDE 14

Definitive descriptions of constructs

Expressions: Constant Identifier

e ::= x ρ : Env U = {ρ,...}, ρ(x) = con x

U

− → con

(7)

slide-15
SLIDE 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

slide-16
SLIDE 16

Conclusion

  • Describe individual constructs definitively
  • Contribute to libraries
  • Refer to libraries