isabelle s use of unifjcation
play

Isabelles use of unifjcation When using rule , erule , drule Isabelle - PowerPoint PPT Presentation

Isabelles use of unifjcation When using rule , erule , drule Isabelle uses a process known as higher-order unifjcation What is: Unifjcation ...and specifjcally, higher-order unifjcation? 1 Isabelles use of unifjcation When using


  1. Isabelle’s use of unifjcation When using rule , erule , drule Isabelle uses a process known as higher-order unifjcation What is: • Unifjcation • ...and specifjcally, higher-order unifjcation? 1

  2. Isabelle’s use of unifjcation When using rule , erule , drule Isabelle uses a process known as higher-order unifjcation What is: • Unifjcation • ...and specifjcally, higher-order unifjcation? 1

  3. Unifjcation Given two terms t , u defjned over: • Set of variables • Constant symbols for some notion of equivalence or equality? 2 can we fjnd a substitution θ such that: t θ = u θ

  4. First-order unifjcation In fjrst-order unifjcation terms are fjrst-order terms : Equality is syntactic identity Substitutions are fjnite functions from variables to terms This process may be familiar: • Part of operational semantics of logic programming (e.g. Prolog) • Used widely in fjrst-order theorem proving 3 t , u , v ::= X | c | f ( t 1 , . . . , t n )

  5. First-order unifjcation In fjrst-order unifjcation terms are fjrst-order terms : Equality is syntactic identity Substitutions are fjnite functions from variables to terms This process may be familiar: • Part of operational semantics of logic programming (e.g. Prolog) • Used widely in fjrst-order theorem proving 3 t , u , v ::= X | c | f ( t 1 , . . . , t n )

  6. First-order unifjcation In fjrst-order unifjcation terms are fjrst-order terms : Equality is syntactic identity Substitutions are fjnite functions from variables to terms This process may be familiar: • Part of operational semantics of logic programming (e.g. Prolog) • Used widely in fjrst-order theorem proving 3 t , u , v ::= X | c | f ( t 1 , . . . , t n )

  7. Example Suppose X and Y are variables Unify: 5 6 Y with X 5 5 Solution X 5 6 and Y 5 5 4 Suppose + is a function symbol and 5 and 6 are constants

  8. Example Suppose X and Y are variables Unify: with Solution X 5 6 and Y 5 5 4 Suppose + is a function symbol and 5 and 6 are constants +(+( 5 , 6 ) , Y ) + ( X , +( 5 , 5 ))

  9. Example Suppose X and Y are variables Unify: with 4 Suppose + is a function symbol and 5 and 6 are constants +(+( 5 , 6 ) , Y ) + ( X , +( 5 , 5 )) Solution X �→ +( 5 , 6 ) and Y �→ +( 5 , 5 )

  10. Properties of fjrst-order unifjcation Has many nice properties: • Decidable • Most general unifjers exist • Linear-time algorithm via Martelli and Montanori 5

  11. Isabelle’s terms First-order unifjcation inappropriate: • Notion of equality is -equivalence • Substitutions are capture avoiding substitutions from -calculus Need higher-order unifjcation... 6 Terms in Isabelle are typed λ -terms

  12. Isabelle’s terms First-order unifjcation inappropriate: Need higher-order unifjcation... 6 Terms in Isabelle are typed λ -terms • Notion of equality is β ( η ) -equivalence • Substitutions are capture avoiding substitutions from λ -calculus

  13. Isabelle’s terms First-order unifjcation inappropriate: Need higher-order unifjcation... 6 Terms in Isabelle are typed λ -terms • Notion of equality is β ( η ) -equivalence • Substitutions are capture avoiding substitutions from λ -calculus

  14. Properties of higher-order unifjcation x c -calculus) theory of simply-typed x x c are both equivalent to c (in equational x c c and Note x x F and F • Unifjability test is undecidable (Goldfarb and Huet) Consider two different solutions: c and F c Unify (where F is a variable of function type and c is a constant): Example: • Unifjer set may be infjnite • When unifjers do exist, most general unifjers need not 7

  15. Properties of higher-order unifjcation • Unifjability test is undecidable (Goldfarb and Huet) • When unifjers do exist, most general unifjers need not • Unifjer set may be infjnite Example: Unify (where F is a variable of function type and c is a constant): F c and c Consider two different solutions: and 7 F �→ λ x . c F �→ λ x . x Note ( λ x . c ) c and ( λ x . x ) c are both equivalent to c (in equational theory of simply-typed λ -calculus)

  16. All is not lost! Gerard Huet discovered a semi-decision procedure for higher-order unifjcation in 1970s Huet’s algorithm: • Finds unifjers when they exist • May not terminate if unifjers do not exist • Generally works well in practice Most Isabelle unifjcation problems are pattern unifjcation problems: • Decidable subfragment • Discovered by Miller whilst working on Prolog • Most general unifjers exist • Effjcient algorithms exist for pattern unifjcation (Qian: linear time/space) Isabelle uses pattern unifjcation to reduce calls to Huet’s algorithm 8

  17. All is not lost! Gerard Huet discovered a semi-decision procedure for higher-order unifjcation in 1970s Huet’s algorithm: • Finds unifjers when they exist • May not terminate if unifjers do not exist • Generally works well in practice Most Isabelle unifjcation problems are pattern unifjcation problems: • Decidable subfragment • Most general unifjers exist • Effjcient algorithms exist for pattern unifjcation (Qian: linear time/space) Isabelle uses pattern unifjcation to reduce calls to Huet’s algorithm 8 • Discovered by Miller whilst working on λ Prolog

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