rewriting logic with maude
play

Rewriting logic with Maude Lars Tveito June 1, 2015 Introduction - PowerPoint PPT Presentation

Rewriting logic with Maude Lars Tveito June 1, 2015 Introduction Maude is a system for writing system specifications. Introduction Maude is a system for writing system specifications. Systems are modeled using equational and rewriting logic.


  1. Rewriting logic with Maude Lars Tveito June 1, 2015

  2. Introduction Maude is a system for writing system specifications.

  3. Introduction Maude is a system for writing system specifications. Systems are modeled using equational and rewriting logic.

  4. Introduction Maude is a system for writing system specifications. Systems are modeled using equational and rewriting logic. Maude has tools for exploring the state space for properties.

  5. Introduction Maude is a system for writing system specifications. Systems are modeled using equational and rewriting logic. Maude has tools for exploring the state space for properties. A model-checker is provided.

  6. Introduction Maude is a system for writing system specifications. Systems are modeled using equational and rewriting logic. Maude has tools for exploring the state space for properties. A model-checker is provided. Rewriting logic is reflective; this allows for meta-modeling.

  7. Introduction Maude is a system for writing system specifications. Systems are modeled using equational and rewriting logic. Maude has tools for exploring the state space for properties. A model-checker is provided. Rewriting logic is reflective; this allows for meta-modeling. This greatly enhances it’s expressive power (for instance, LTL can be modeled in maude, which is done in its model-checker).

  8. Introduction Maude is a system for writing system specifications. Systems are modeled using equational and rewriting logic. Maude has tools for exploring the state space for properties. A model-checker is provided. Rewriting logic is reflective; this allows for meta-modeling. This greatly enhances it’s expressive power (for instance, LTL can be modeled in maude, which is done in its model-checker). Additional tools, like confluence checker, completeness checker and a theorem prover can be acquired.

  9. Introduction Maude is a system for writing system specifications. Systems are modeled using equational and rewriting logic. Maude has tools for exploring the state space for properties. A model-checker is provided. Rewriting logic is reflective; this allows for meta-modeling. This greatly enhances it’s expressive power (for instance, LTL can be modeled in maude, which is done in its model-checker). Additional tools, like confluence checker, completeness checker and a theorem prover can be acquired. A LTLR model checker exits; this could be interesting for this talk, but is not examined further here.

  10. Signatures A signature consists of a set of sorts, and a set of function symbol declarations.

  11. Signatures A signature consists of a set of sorts, and a set of function symbol declarations. Definition[4]: A many-sorted signature ( S , Σ) consists of a set S , whose elements are sorts, and an S ∗ × S -sorted family { Σ w , s | w ∈ S ∗ , s ∈ S } of function symbols. Σ w , s is the set of function symbols with arity w and value of sort s . We can write f : w → s ∈ Σ for Σ w , s . If w is the empty word, then f is often called a constant of sort s .

  12. Ground terms We can express ground terms using only constants and function symbols.

  13. Ground terms We can express ground terms using only constants and function symbols. Definition[4]: Given a many-sorted signature ( S , Σ) , we can define a S -sorted set of ground terms T Σ = {T Σ , s | s ∈ S } inductively: Σ ǫ, s ⊆ T Σ , s . Every constant of sort s is a ground term of sort s . If f ∈ Σ s 1 ,..., s n , s and t 1 ∈ T Σ , s 1 , ..., t n ∈ T Σ , sn and 1 ≥ n , then f ( t 1 , ..., t n ) ∈ T Σ , s . A function applied to ground terms of the right sort are also ground terms. Each set T Σ , s is the smallest set that satisfies the above conditions.

  14. Variables Variables are placeholders for terms .

  15. Variables Variables are placeholders for terms . Definition[4]: Given a many-sorted signature ( S , Σ) , a variable set X is a S -sorted family X = { X s | s ∈ S } of pairwise disjoint sets, also disjoint from Σ .

  16. Variables Variables are placeholders for terms . Definition[4]: Given a many-sorted signature ( S , Σ) , a variable set X is a S -sorted family X = { X s | s ∈ S } of pairwise disjoint sets, also disjoint from Σ . Note that: The definition implies that no variable have different sorts, so X s ∩ X s ′ = ∅ should hold. Also, the definition implies that a variable cannot be a function-symbol, so X s ∩ Σ = ∅ .

  17. Terms Terms are just like ground terms, that can also contain free variables.

  18. Terms Terms are just like ground terms, that can also contain free variables. Definition[4]: Given a many-sorted signature ( S , Σ) , and a variable set X = { X s | s ∈ S } , the S -sorted set of terms T Σ ( X ) = {T Σ , s ( X ) | s ∈ S } can be defined inductively: X s ⊆ T Σ , s ( X ) for s ∈ S ; a variable of sort s is also a term of sort s . Σ ǫ, s ⊆ T Σ , s ( X ) for s ∈ S ; a constant of sort s is also a term of sort s . f ( t 1 , ... t n ) ∈ T Σ , s ( X ) if f ∈ Σ s 1 ... s n , s and t i ∈ T Σ , s i ( X ) for each 1 ≤ i ≤ n . T Σ ( X ) is the smallest S -sorted set satisfying the above conditions.

  19. Rewriting Typically a an equational theory (Σ , E ) represents the static part of a system (things that don’t change)[3].

  20. Rewriting Typically a an equational theory (Σ , E ) represents the static part of a system (things that don’t change)[3]. A rewrite theory R = (Σ , E , R ) the dynamic part of a system (where things do change).

  21. Rewriting Typically a an equational theory (Σ , E ) represents the static part of a system (things that don’t change)[3]. A rewrite theory R = (Σ , E , R ) the dynamic part of a system (where things do change). The strengths of rewriting comes from naturally being able to express systems that are: Non-deterministic (or non-confluent) Concurrent Distributed

  22. Rewriting Typically a an equational theory (Σ , E ) represents the static part of a system (things that don’t change)[3]. A rewrite theory R = (Σ , E , R ) the dynamic part of a system (where things do change). The strengths of rewriting comes from naturally being able to express systems that are: Non-deterministic (or non-confluent) Concurrent Distributed In other words; we need rewriting rules to model state change .

  23. Substitution Substitution is a mapping from a variables to terms[4][1].

  24. Substitution Substitution is a mapping from a variables to terms[4][1]. Substitutions are functions on the form: { x 1 �→ t 1 , ..., x n �→ t n }

  25. Substitution Substitution is a mapping from a variables to terms[4][1]. Substitutions are functions on the form: { x 1 �→ t 1 , ..., x n �→ t n } It is a function σ : X → T Σ ( Y ) , where X is a set of variables and T Σ (Y) is a set of terms.

  26. Substitution Substitution is a mapping from a variables to terms[4][1]. Substitutions are functions on the form: { x 1 �→ t 1 , ..., x n �→ t n } It is a function σ : X → T Σ ( Y ) , where X is a set of variables and T Σ (Y) is a set of terms. σ is extended to σ : T Σ ( X ) → T Σ ( Y ) , which takes a term and simultaneously replaces each variable in a term t according to the substitution.

  27. Substitution Substitution is a mapping from a variables to terms[4][1]. Substitutions are functions on the form: { x 1 �→ t 1 , ..., x n �→ t n } It is a function σ : X → T Σ ( Y ) , where X is a set of variables and T Σ (Y) is a set of terms. σ is extended to σ : T Σ ( X ) → T Σ ( Y ) , which takes a term and simultaneously replaces each variable in a term t according to the substitution. Example Given a substitution σ = { x �→ a , y �→ f ( b ) } and a term t = g ( x , f ( y )) then σ t is g ( a , f ( f ( b ))) .

  28. Matching Definition[4]: Given a term t and a term u , then t matches u if there is a substitution such that σ t = u .

  29. Matching Definition[4]: Given a term t and a term u , then t matches u if there is a substitution such that σ t = u . Example Given a term t = g ( x , f ( y )) and a term u = g ( a , f ( f ( b ))) , then t matches u because σ g ( x , f ( y )) = g ( a , f ( f ( b ))) where σ is the substitution σ = { x �→ a , y �→ f ( b ) } .

  30. Equations and rewrite rules A rewrite rule consists of a label , a left-hand side term t and a right-hand side t ′ .

  31. Equations and rewrite rules A rewrite rule consists of a label , a left-hand side term t and a right-hand side t ′ . The semantics of a rewrite rule is that a term t may become t ′ ; rules can (conceptually) be applied concurrently.

  32. Equations and rewrite rules A rewrite rule consists of a label , a left-hand side term t and a right-hand side t ′ . The semantics of a rewrite rule is that a term t may become t ′ ; rules can (conceptually) be applied concurrently. An equation is just a rewrite rule with a few underlying assumptions.

  33. Equations and rewrite rules A rewrite rule consists of a label , a left-hand side term t and a right-hand side t ′ . The semantics of a rewrite rule is that a term t may become t ′ ; rules can (conceptually) be applied concurrently. An equation is just a rewrite rule with a few underlying assumptions. An equation is symmetric (so t = t ′ and t ′ = t ).

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