Software specification in CASL - The Common Algebraic Specification - - PowerPoint PPT Presentation

software specification in casl the common algebraic
SMART_READER_LITE
LIVE PREVIEW

Software specification in CASL - The Common Algebraic Specification - - PowerPoint PPT Presentation

Software specification in CASL - The Common Algebraic Specification Language Till Mossakowski, Lutz Schr oder January 2007 Semantics of CASL basic specifications (recalled) Semantics of CASL basic specifications (recalled) 3 The CASL


slide-1
SLIDE 1

Software specification in CASL - The Common Algebraic Specification Language

Till Mossakowski, Lutz Schr¨

  • der

January 2007

slide-2
SLIDE 2

Semantics of CASL basic specifications (recalled)

slide-3
SLIDE 3

Semantics of CASL basic specifications (recalled) 3

The CASL logic (institution)

  • Signatures: a signature provides the vocabulary

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-4
SLIDE 4

Semantics of CASL basic specifications (recalled) 3

The CASL logic (institution)

  • Signatures: a signature provides the vocabulary
  • Signature morphisms: for extending and renaming

signatures

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-5
SLIDE 5

Semantics of CASL basic specifications (recalled) 3

The CASL logic (institution)

  • Signatures: a signature provides the vocabulary
  • Signature morphisms: for extending and renaming

signatures

  • Models: interpret the vocabulary of a signature with

mathematical objects (sets, functions, relations)

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-6
SLIDE 6

Semantics of CASL basic specifications (recalled) 3

The CASL logic (institution)

  • Signatures: a signature provides the vocabulary
  • Signature morphisms: for extending and renaming

signatures

  • Models: interpret the vocabulary of a signature with

mathematical objects (sets, functions, relations)

  • Sentences (formulae): for axiomatizing models

denote true or false in a given model

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-7
SLIDE 7

Semantics of CASL basic specifications (recalled) 3

The CASL logic (institution)

  • Signatures: a signature provides the vocabulary
  • Signature morphisms: for extending and renaming

signatures

  • Models: interpret the vocabulary of a signature with

mathematical objects (sets, functions, relations)

  • Sentences (formulae): for axiomatizing models

denote true or false in a given model

  • Terms: parts of sentences, denote data values

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-8
SLIDE 8

Semantics of CASL basic specifications (recalled) 3

The CASL logic (institution)

  • Signatures: a signature provides the vocabulary
  • Signature morphisms: for extending and renaming

signatures

  • Models: interpret the vocabulary of a signature with

mathematical objects (sets, functions, relations)

  • Sentences (formulae): for axiomatizing models

denote true or false in a given model

  • Terms: parts of sentences, denote data values
  • Satisfaction of sentences in models

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-9
SLIDE 9

Semantics of CASL basic specifications (recalled) 4

CASL many-sorted signatures

  • a set S of sorts,

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-10
SLIDE 10

Semantics of CASL basic specifications (recalled) 4

CASL many-sorted signatures

  • a set S of sorts,
  • an S∗ × S-indexed set (TFw,s)w,s∈S∗×S of total operation

symbols,

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-11
SLIDE 11

Semantics of CASL basic specifications (recalled) 4

CASL many-sorted signatures

  • a set S of sorts,
  • an S∗ × S-indexed set (TFw,s)w,s∈S∗×S of total operation

symbols,

  • an S∗ × S-indexed set (PFw,s)w,s∈S∗×S of partial operation

symbols, such that TFw,s ∩ PFw,s = ∅,

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-12
SLIDE 12

Semantics of CASL basic specifications (recalled) 4

CASL many-sorted signatures

  • a set S of sorts,
  • an S∗ × S-indexed set (TFw,s)w,s∈S∗×S of total operation

symbols,

  • an S∗ × S-indexed set (PFw,s)w,s∈S∗×S of partial operation

symbols, such that TFw,s ∩ PFw,s = ∅,

  • an S∗-indexed set (Pw)w∈S∗ of predicate symbols

Signature morphisms map these components in a compatible way

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-13
SLIDE 13

Semantics of CASL basic specifications (recalled) 5

Example signatures

  • ΣNat = ({Nat}, {0 : Nat, succ: Nat−

→Nat}, {pre: Nat− → ?Nat}, ∅)

  • ({Elem}, ∅, ∅, {

< : Elem ∗ Elem})

  • ({Elem, List},

{Nil : Elem, Cons: Elem ∗ List− →List}, ∅, ∅)

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-14
SLIDE 14

Semantics of CASL basic specifications (recalled) 6

CASL many-sorted models

For a many-sorted signature Σ = (S, TF, PF, P) a many-sorted model M ∈ Mod(Σ) consists of

  • a non-empty carrier set sM for each sort s ∈ S (let wM

denote the Cartesian product sM

1 × · · · × sM n when

w = s1 . . . sn),

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-15
SLIDE 15

Semantics of CASL basic specifications (recalled) 6

CASL many-sorted models

For a many-sorted signature Σ = (S, TF, PF, P) a many-sorted model M ∈ Mod(Σ) consists of

  • a non-empty carrier set sM for each sort s ∈ S (let wM

denote the Cartesian product sM

1 × · · · × sM n when

w = s1 . . . sn),

  • a partial function f M from wM to sM for each function

symbol f ∈ TF w,s or f ∈ PF w,s, the function being required to be total in the former case,

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-16
SLIDE 16

Semantics of CASL basic specifications (recalled) 6

CASL many-sorted models

For a many-sorted signature Σ = (S, TF, PF, P) a many-sorted model M ∈ Mod(Σ) consists of

  • a non-empty carrier set sM for each sort s ∈ S (let wM

denote the Cartesian product sM

1 × · · · × sM n when

w = s1 . . . sn),

  • a partial function f M from wM to sM for each function

symbol f ∈ TF w,s or f ∈ PF w,s, the function being required to be total in the former case,

  • a predicate pM ⊆ wM for each predicate symbol p ∈ Pw.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-17
SLIDE 17

Semantics of CASL basic specifications (recalled) 7

Example ΣNat-models

  • NatM = I

N, 0M=0, sucM(x) = x + 1, preM(x) = x − 1, x > 0 undefined, otherwise

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-18
SLIDE 18

Semantics of CASL basic specifications (recalled) 7

Example ΣNat-models

  • NatM = I

N, 0M=0, sucM(x) = x + 1, preM(x) = x − 1, x > 0 undefined, otherwise

  • NatN = I

N ∪ {∞}, 0N=0, sucN(x) = ∞, if x = ∞ x + 1, otherwise , preN(x) = x − 1, if 0 < x = ∞ undefined, otherwise

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-19
SLIDE 19

Semantics of CASL basic specifications (recalled) 7

Example ΣNat-models

  • NatM = I

N, 0M=0, sucM(x) = x + 1, preM(x) = x − 1, x > 0 undefined, otherwise

  • NatN = I

N ∪ {∞}, 0N=0, sucN(x) = ∞, if x = ∞ x + 1, otherwise , preN(x) = x − 1, if 0 < x = ∞ undefined, otherwise

  • NatT = {∗}, 0T = ∗, sucT(∗) = ∗, preT(∗) = ∗

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-20
SLIDE 20

Semantics of CASL basic specifications (recalled) 7

Example ΣNat-models

  • NatM = I

N, 0M=0, sucM(x) = x + 1, preM(x) = x − 1, x > 0 undefined, otherwise

  • NatN = I

N ∪ {∞}, 0N=0, sucN(x) = ∞, if x = ∞ x + 1, otherwise , preN(x) = x − 1, if 0 < x = ∞ undefined, otherwise

  • NatT = {∗}, 0T = ∗, sucT(∗) = ∗, preT(∗) = ∗

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-21
SLIDE 21

Semantics of CASL basic specifications (recalled) 8

  • NatK = I

N, 0N = K, sucK(x) = x, preK(x) = y, if TM x outputs y on input x undefined, otherwise

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-22
SLIDE 22

Semantics of CASL basic specifications (recalled) 8

  • NatK = I

N, 0N = K, sucK(x) = x, preK(x) = y, if TM x outputs y on input x undefined, otherwise

  • NatF = I

N → I N, 0F(x) = 0, sucF(f)(x) = f(x) + 1, preF(f) undefined for each f

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-23
SLIDE 23

Semantics of CASL basic specifications (recalled) 9

CASL many-sorted terms

Given a signature Σ and a variable system (Xs)s∈S, the set

  • f terms is defined inductively as follows:
  • variables x ∈ Xs are terms of sort s

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-24
SLIDE 24

Semantics of CASL basic specifications (recalled) 9

CASL many-sorted terms

Given a signature Σ and a variable system (Xs)s∈S, the set

  • f terms is defined inductively as follows:
  • variables x ∈ Xs are terms of sort s
  • applications fw,s(t1, . . . , tn) is a term of sort s, if

f ∈ TF w,s ∪PF w,s and ti is a term of sort si, w = s1 . . . sn.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-25
SLIDE 25

Semantics of CASL basic specifications (recalled) 10

Semantics of terms

Given a Σ-model and a variable valuation ν: X − →M, the semantics ν# of terms is defined as follows:

  • variables ν#(x) = ν(x)

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-26
SLIDE 26

Semantics of CASL basic specifications (recalled) 10

Semantics of terms

Given a Σ-model and a variable valuation ν: X − →M, the semantics ν# of terms is defined as follows:

  • variables ν#(x) = ν(x)
  • applications ν#(fw,s(t1, . . . , tn)) = f M

w,s(ν#(t1), . . . , ν#(tn))

if all components are defined (undefined otherwise)

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-27
SLIDE 27

Semantics of CASL basic specifications (recalled) 11

CASL formulae

The set of (Σ, X)-formulae is defined inductively as follows:

  • strong equations t1 = t2

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-28
SLIDE 28

Semantics of CASL basic specifications (recalled) 11

CASL formulae

The set of (Σ, X)-formulae is defined inductively as follows:

  • strong equations t1 = t2
  • existential equations t1

e

= t2

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-29
SLIDE 29

Semantics of CASL basic specifications (recalled) 11

CASL formulae

The set of (Σ, X)-formulae is defined inductively as follows:

  • strong equations t1 = t2
  • existential equations t1

e

= t2

  • predications pw(t1, . . . , tn)

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-30
SLIDE 30

Semantics of CASL basic specifications (recalled) 11

CASL formulae

The set of (Σ, X)-formulae is defined inductively as follows:

  • strong equations t1 = t2
  • existential equations t1

e

= t2

  • predications pw(t1, . . . , tn)
  • definedness assertions def(t)

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-31
SLIDE 31

Semantics of CASL basic specifications (recalled) 11

CASL formulae

The set of (Σ, X)-formulae is defined inductively as follows:

  • strong equations t1 = t2
  • existential equations t1

e

= t2

  • predications pw(t1, . . . , tn)
  • definedness assertions def(t)
  • conjunctions, disjunctions, implications, equivalences of

formulae

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-32
SLIDE 32

Semantics of CASL basic specifications (recalled) 11

CASL formulae

The set of (Σ, X)-formulae is defined inductively as follows:

  • strong equations t1 = t2
  • existential equations t1

e

= t2

  • predications pw(t1, . . . , tn)
  • definedness assertions def(t)
  • conjunctions, disjunctions, implications, equivalences of

formulae

  • universal, existential, unique-existential quantifications

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-33
SLIDE 33

Semantics of CASL basic specifications (recalled) 12

Satisfaction of atomic formulae

A formula ϕ is satisfied in a model M w.r.t. a valuation ν: X − →M (short notation: M, ν | = ϕ), if

  • M, ν |

= t1 = t2 if ν#(t1) = ν#(t2) or both sides are undefined,

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-34
SLIDE 34

Semantics of CASL basic specifications (recalled) 12

Satisfaction of atomic formulae

A formula ϕ is satisfied in a model M w.r.t. a valuation ν: X − →M (short notation: M, ν | = ϕ), if

  • M, ν |

= t1 = t2 if ν#(t1) = ν#(t2) or both sides are undefined,

  • M, ν |

= t1

e

= t2 if ν#(t1) = ν#(t2) and both sides defined,

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-35
SLIDE 35

Semantics of CASL basic specifications (recalled) 12

Satisfaction of atomic formulae

A formula ϕ is satisfied in a model M w.r.t. a valuation ν: X − →M (short notation: M, ν | = ϕ), if

  • M, ν |

= t1 = t2 if ν#(t1) = ν#(t2) or both sides are undefined,

  • M, ν |

= t1

e

= t2 if ν#(t1) = ν#(t2) and both sides defined,

  • M, ν |

= pw(t1, . . . , tn) if (ν#(t1), . . . , ν#(tn)) is defined and ∈ pM

w ,

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-36
SLIDE 36

Semantics of CASL basic specifications (recalled) 12

Satisfaction of atomic formulae

A formula ϕ is satisfied in a model M w.r.t. a valuation ν: X − →M (short notation: M, ν | = ϕ), if

  • M, ν |

= t1 = t2 if ν#(t1) = ν#(t2) or both sides are undefined,

  • M, ν |

= t1

e

= t2 if ν#(t1) = ν#(t2) and both sides defined,

  • M, ν |

= pw(t1, . . . , tn) if (ν#(t1), . . . , ν#(tn)) is defined and ∈ pM

w ,

  • M, ν |

= def(t) if ν#(t) is defined

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-37
SLIDE 37

Semantics of CASL basic specifications (recalled) 13

Satisfaction of compound formulae

A standard in first-order logic, i.e.

  • a conjuction is satisfied iff all the conjuncts are satisfied

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-38
SLIDE 38

Semantics of CASL basic specifications (recalled) 13

Satisfaction of compound formulae

A standard in first-order logic, i.e.

  • a conjuction is satisfied iff all the conjuncts are satisfied
  • similar for disjunction etc.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-39
SLIDE 39

Semantics of CASL basic specifications (recalled) 13

Satisfaction of compound formulae

A standard in first-order logic, i.e.

  • a conjuction is satisfied iff all the conjuncts are satisfied
  • similar for disjunction etc.
  • a universal (existential) quantification is satisfied when all

(some) of the changes of the valuation for the quantified variable lead to satisfcation in the model: M, ν | = ∀x : s . φ iff M, ξ | = φ for all valuation ξ that differ from ν only on x : s

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-40
SLIDE 40

Semantics of CASL basic specifications (recalled) 14

Satisfaction of closed formulae

A closed formula (sentences) is satisfied in a model iff it is satisfied w.r.t. the empty valuation: M | = ϕ iff M, ∅ | = ϕ

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-41
SLIDE 41

Semantics of CASL basic specifications (recalled) 15

Sort generation constraints

A Σ-sort-generation constraint (S′, F ′) consists of

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-42
SLIDE 42

Semantics of CASL basic specifications (recalled) 15

Sort generation constraints

A Σ-sort-generation constraint (S′, F ′) consists of

  • a set of sorts S′ ⊆ S

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-43
SLIDE 43

Semantics of CASL basic specifications (recalled) 15

Sort generation constraints

A Σ-sort-generation constraint (S′, F ′) consists of

  • a set of sorts S′ ⊆ S
  • a set of (qualified) operation symbols F ′ ⊆ TF ∪ PF

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-44
SLIDE 44

Semantics of CASL basic specifications (recalled) 15

Sort generation constraints

A Σ-sort-generation constraint (S′, F ′) consists of

  • a set of sorts S′ ⊆ S
  • a set of (qualified) operation symbols F ′ ⊆ TF ∪ PF

M | = (S′, F ′) iff the carriers of sorts in S′ are generated by terms in F ′ (with variables of sorts outside S′)

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-45
SLIDE 45

Semantics of CASL basic specifications (recalled) 15

Sort generation constraints

A Σ-sort-generation constraint (S′, F ′) consists of

  • a set of sorts S′ ⊆ S
  • a set of (qualified) operation symbols F ′ ⊆ TF ∪ PF

M | = (S′, F ′) iff the carriers of sorts in S′ are generated by terms in F ′ (with variables of sorts outside S′) i.e. for each s ∈ S′, a ∈ sM, there is some term t (with variables of sorts outside S′) and some valuation ν with ν#(t) = a.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-46
SLIDE 46

Semantics of CASL basic specifications (recalled) 16

Example ΣNat-models

  • NatM = I

N, 0M=0, sucM(x) = x + 1, preM(x) = x − 1, x > 0 undefined, otherwise

  • NatN = I

N ∪ {∞}, 0N=0, sucN(x) = ∞, if x = ∞ x + 1, otherwise , preN(x) = x − 1, if 0 < x = ∞ undefined, otherwise

  • NatT = {∗}, 0T = ∗, sucT(∗) = ∗, preT(∗) = ∗

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-47
SLIDE 47

Semantics of CASL basic specifications (recalled) 17

  • NatK = I

N, 0N = K, sucK(x) = x, preK(x) = y, if TM x outputs y on input x undefined, otherwise

  • NatF = I

N → I N, 0F(x) = 0, sucF(f)(x) = f(x) + 1, preF(f) undefined for each f

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-48
SLIDE 48

Semantics of CASL Structured Specifications

slide-49
SLIDE 49

Semantics of CASL Structured Specifications 19

Institutions

  • Basic idea: abstract away from the details of signature,

model, sentence, satisfaction.

  • The semantics of Casl structured specifications is defined

for an arbitrary institution.

  • first-order, higher-order, polymorphic, modal, temporal,

process, behavioural, ASM- und Z-like and object-oriented logics have been shown to be institutions.

  • Hence, you may replace the Casl institution with your

favourite institution.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-50
SLIDE 50

Semantics of CASL Structured Specifications 20

The CASL institution revisited

Given a signature morphism σ: Σ− →Σ′, Σ = (S, TF, PF, P) and a Σ′-model M ′, the reduct M ′|σ is defined as follows

  • sM := σ(s)M′ for s ∈ S,
  • f M

w,s := σ(fw,s)M′ for f ∈ TF w,s ∪ PF w,s,

  • pM

w := σ(pw)M′ for p ∈ Pw.

A Σ-formula ϕ is translated along σ by just replacing the symbols in ϕ according to σ.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-51
SLIDE 51

Semantics of CASL Structured Specifications 21

The Satisfaction Condition

Theorem M ′ | = σ(ϕ) iff M ′|σ | = ϕ That is: Truth is invariant under change

  • f

notation and enlargement of context.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-52
SLIDE 52

Semantics of CASL Structured Specifications 22

Σ → Σ’ Sen Σ

σ

Sen Σ’ Mod Σ Mod Σ’

Sen σ Mod σ |=Σ |=Σ’

Signatures Sentences Satisfaction Models

Institutions

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-53
SLIDE 53

Semantics of CASL Structured Specifications 23

Institutions, formally

  • category Sign of signatures,
  • a sentence functor Sen: Sign−

→Set,

  • a model functor Mod: Signop−

→CAT ,

  • a satisfaction relation |

=Σ ⊆ |Mod(Σ)| × Sen(Σ), such that the following satisfaction condition holds: M ′ | =Σ′ Sen(σ)(ϕ) ⇔ Mod(σ)(M)′ | =Σ ϕ

  • r shortly

M ′ | =Σ′ σ(ϕ) ⇔ M ′|σ | =Σ ϕ.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-54
SLIDE 54

Semantics of CASL Structured Specifications 24

Benefits of institutions

  • Institution independent semantics (and proof system) of

structured specifications, architectural specifications, refinement, behavioural abstraction etc.

  • ASMs over arbitrary institutions (Zucca 1999, TCS 216)
  • Borrowing of parts of a logic from other logics
  • Combination of logics
  • Heterogeneous specification and tools
  • Abstract model theory with deep results (Diaconescu)

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-55
SLIDE 55

Semantics of CASL Structured Specifications 25

Semantics of basic specifications

Σ ⊢ BASIC-SPEC ✄ (Σ′, Ψ) Σ ⊢ BASIC-SPEC qua SPEC ✄ Σ′ Σ ⊢ BASIC-SPEC ✄ (Σ′, Ψ) M′ = {M ∈ Mod(Σ′) | M|Σ ∈ M, M | = Ψ} Σ, M ⊢ BASIC-SPEC qua SPEC ⇒ Σ′, M′

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-56
SLIDE 56

Semantics of CASL Structured Specifications 26

Semantics of translations

Σ ⊢ SPEC ✄ Σ′ Σ ⊢ SPEC with σ: Σ′− →Σ′′ ✄ Σ′′ Σ, M ⊢ SPEC ⇒ Σ′, M′ M′′ = {M ∈ Mod(Σ′′) | M|σ ∈ M′} Σ, M ⊢ SPEC with σ: Σ′− →Σ′′ ⇒ Σ′′, M′′

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-57
SLIDE 57

Semantics of CASL Structured Specifications 27

Semantics of reductions

Σ ⊢ SPEC ✄ Σ′ Σ ⊢ SPEC hide σ: Σ′′− →Σ′ ✄ Σ′′ Σ, M ⊢ SPEC ⇒ Σ′, M′ M′′ = {M|σ | M ∈ M′} Σ, M ⊢ SPEC hide σ: Σ′′− →Σ′ ⇒ Σ′′, M′′

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-58
SLIDE 58

Semantics of CASL Structured Specifications 28

Semantics of extensions

Σ ⊢ SPEC1 ✄ Σ′ Σ′ ⊢ SPEC2 ✄ Σ′′ Σ ⊢ SPEC1 then SPEC2 ✄ Σ′′ Σ, M ⊢ SPEC1 ⇒ Σ′, M′ Σ′, M′ ⊢ SPEC2 ⇒ Σ′′, M′′ Σ, M ⊢ SPEC1 then SPEC2 ⇒ Σ′′, M′′

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-59
SLIDE 59

Semantics of CASL Structured Specifications 29

Semantics of views

∅, M⊥ ⊢ SPEC1 ⇒ Σ1, M1 ∅, M⊥ ⊢ SPEC2 ⇒ Σ2, M2 for each M ∈ M2, M|σ ∈ M1 ⊢ view SPEC1 to SPEC2 = σ ⇒ σ, M1, M2

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-60
SLIDE 60

Semantics of CASL Structured Specifications 30

Semantics of parameterization (simplified)

Import⊂

◮Formal Parameter⊂ ◮Body

Import

◮Actual Parameter

σ ∪ id

  • ⊂ ◮Instantiation

σ ∪ incl

  • The right square is required to be a pushout, that is, all

symbols shared between the body and the actual parameter must occur also in the formal parameter. Models: those models of the instantiation whose reducts are models of the body and of the actual parameter.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-61
SLIDE 61

Semantics of CASL Structured Specifications 31

Development graphs S = N, L

Nodes in N: (ΣN, ΓN) with

  • ΣN signature,
  • ΓN ⊆ Sen(ΣN) set of local axioms.

Links in L:

  • global M

σ

◮N, where σ : ΣM → ΣN,

  • local M ....................

σ

◮N where σ : ΣM → ΣN, or

  • hiding M

σ h

◮N where σ : ΣN → ΣM

going against the direction of the link.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-62
SLIDE 62

Semantics of CASL Structured Specifications 32

Semantics of development graphs

ModS(N) consists of those ΣN-models n for which

  • 1. n satisfies the local axioms ΓN,
  • 2. for each K

σ

◮N ∈ S, n|σ is a K-model,

  • 3. for each K ....................

σ

◮N ∈ S,

n|σ satisfies the local axioms ΓK,

  • 4. for each K

σ h

◮N ∈ S,

n has a σ-expansion k (i.e. k|σ = n) that is a K-model.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007
slide-63
SLIDE 63

Semantics of CASL Structured Specifications 33

Theorem links

Theorem links come in two versions:

  • global theorem links M

σ

>N, where σ: ΣM −

→ΣN,

  • S |

= M σ

>N iff for all n ∈ ModS(N), n|σ ∈ ModS(M).

  • local theorem links M .........

σ

>N, where σ: ΣM −

→ΣN,

  • S |

= M ........... σ

>N iff for all n ∈ ModS(N), n|σ |

= ΓM.

  • the calculus reduces these to local proof obligations.

T.Mossakowski, L. Schr¨

  • der: Casl; January 2007