software specification in casl the common algebraic
play

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


  1. Software specification in CASL - The Common Algebraic Specification Language Till Mossakowski, Lutz Schr¨ oder January 2007

  2. Semantics of CASL basic specifications (recalled)

  3. Semantics of CASL basic specifications (recalled) 3 The CASL logic (institution) • Signatures: a signature provides the vocabulary T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  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¨ oder: Casl ; January 2007

  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¨ oder: Casl ; January 2007

  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¨ oder: Casl ; January 2007

  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¨ oder: Casl ; January 2007

  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¨ oder: Casl ; January 2007

  9. Semantics of CASL basic specifications (recalled) 4 CASL many-sorted signatures • a set S of sorts, T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  10. Semantics of CASL basic specifications (recalled) 4 CASL many-sorted signatures • a set S of sorts, • an S ∗ × S -indexed set ( TF w,s ) w,s ∈ S ∗ × S of total operation symbols, T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  11. Semantics of CASL basic specifications (recalled) 4 CASL many-sorted signatures • a set S of sorts, • an S ∗ × S -indexed set ( TF w,s ) w,s ∈ S ∗ × S of total operation symbols, • an S ∗ × S -indexed set ( PF w,s ) w,s ∈ S ∗ × S of partial operation symbols, such that TF w,s ∩ PF w,s = ∅ , T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  12. Semantics of CASL basic specifications (recalled) 4 CASL many-sorted signatures • a set S of sorts, • an S ∗ × S -indexed set ( TF w,s ) w,s ∈ S ∗ × S of total operation symbols, • an S ∗ × S -indexed set ( PF w,s ) w,s ∈ S ∗ × S of partial operation symbols, such that TF w,s ∩ PF w,s = ∅ , • an S ∗ -indexed set ( P w ) w ∈ S ∗ of predicate symbols Signature morphisms map these components in a compatible way T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  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¨ oder: Casl ; January 2007

  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 s M for each sort s ∈ S (let w M denote the Cartesian product s M 1 × · · · × s M n when w = s 1 . . . s n ), T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  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 s M for each sort s ∈ S (let w M denote the Cartesian product s M 1 × · · · × s M n when w = s 1 . . . s n ), • a partial function f M from w M to s M 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¨ oder: Casl ; January 2007

  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 s M for each sort s ∈ S (let w M denote the Cartesian product s M 1 × · · · × s M n when w = s 1 . . . s n ), • a partial function f M from w M to s M 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 p M ⊆ w M for each predicate symbol p ∈ P w . T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  17. Semantics of CASL basic specifications (recalled) 7 Example Σ Nat -models • Nat M = I N , 0 M =0, suc M ( x ) = x + 1 , � x − 1 , x > 0 pre M ( x ) = undefined, otherwise T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  18. Semantics of CASL basic specifications (recalled) 7 Example Σ Nat -models • Nat M = I N , 0 M =0, suc M ( x ) = x + 1 , � x − 1 , x > 0 pre M ( x ) = undefined, otherwise • Nat N = I N ∪ {∞} , 0 N =0, � ∞ , if x = ∞ suc N ( x ) = x + 1 , otherwise , � x − 1 , if 0 < x � = ∞ pre N ( x ) = undefined , otherwise T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  19. Semantics of CASL basic specifications (recalled) 7 Example Σ Nat -models • Nat M = I N , 0 M =0, suc M ( x ) = x + 1 , � x − 1 , x > 0 pre M ( x ) = undefined, otherwise • Nat N = I N ∪ {∞} , 0 N =0, � ∞ , if x = ∞ suc N ( x ) = x + 1 , otherwise , � x − 1 , if 0 < x � = ∞ pre N ( x ) = undefined , otherwise • Nat T = {∗} , 0 T = ∗ , suc T ( ∗ ) = ∗ , pre T ( ∗ ) = ∗ T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  20. Semantics of CASL basic specifications (recalled) 7 Example Σ Nat -models • Nat M = I N , 0 M =0, suc M ( x ) = x + 1 , � x − 1 , x > 0 pre M ( x ) = undefined, otherwise • Nat N = I N ∪ {∞} , 0 N =0, � ∞ , if x = ∞ suc N ( x ) = x + 1 , otherwise , � x − 1 , if 0 < x � = ∞ pre N ( x ) = undefined , otherwise • Nat T = {∗} , 0 T = ∗ , suc T ( ∗ ) = ∗ , pre T ( ∗ ) = ∗ T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  21. Semantics of CASL basic specifications (recalled) 8 • Nat K = I N , 0 N = K , suc K ( x ) = x , � y, if TM x outputs y on input x pre K ( x ) = undefined , otherwise T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  22. Semantics of CASL basic specifications (recalled) 8 • Nat K = I N , 0 N = K , suc K ( x ) = x , � y, if TM x outputs y on input x pre K ( x ) = undefined , otherwise • Nat F = I N , 0 F ( x ) = 0 , suc F ( f )( x ) = f ( x ) + 1 , N → I pre F ( f ) undefined for each f T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  23. Semantics of CASL basic specifications (recalled) 9 CASL many-sorted terms Given a signature Σ and a variable system ( X s ) s ∈ S , the set of terms is defined inductively as follows: • variables x ∈ X s are terms of sort s T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  24. Semantics of CASL basic specifications (recalled) 9 CASL many-sorted terms Given a signature Σ and a variable system ( X s ) s ∈ S , the set of terms is defined inductively as follows: • variables x ∈ X s are terms of sort s • applications f w,s ( t 1 , . . . , t n ) is a term of sort s , if f ∈ TF w,s ∪ PF w,s and t i is a term of sort s i , w = s 1 . . . s n . T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  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¨ oder: Casl ; January 2007

  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 ν # ( f w,s ( t 1 , . . . , t n )) = f M w,s ( ν # ( t 1 ) , . . . , ν # ( t n )) if all components are defined (undefined otherwise) T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

  27. Semantics of CASL basic specifications (recalled) 11 CASL formulae The set of (Σ , X ) -formulae is defined inductively as follows: • strong equations t 1 = t 2 T.Mossakowski, L. Schr¨ oder: Casl ; January 2007

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend