1 / 23

Anchored Semi- Unification

Anchored Semi- Unification. Tobias Tebbi Final Talk – Master Thesis. Overview. Motivation: Translation Validation Nonnested Recursion Schemes Anchored Semi- Unification. Motivation: Translation Validation. Check semantic equivalence of input and output of an optimization phase.

veata
Download Presentation

Anchored Semi- Unification

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Anchored Semi-Unification Tobias Tebbi Final Talk – Master Thesis

  2. Overview • Motivation: Translation Validation • Nonnested RecursionSchemes • Anchored Semi-Unification

  3. Motivation: Translation Validation • Check semantic equivalence of input and output of an optimization phase. return return

  4. RecursionSchemes • Encode the CFGs as recursion schemes return return

  5. RecursionSchemes • We can unfold the definitions of the procedures. if return if if return if return

  6. RecursionSchemes • results in the same infinite tree. if return if if return if return

  7. RecursionSchemes • results in the same infinite tree. • If the schemes produce the same tree, then the initial CFGs are equivalent. if return if if return if return

  8. Unification Modulo Nonnested Recursion Schemes • Restriction to nonnested schemes: • Unification: Find substitution of variables such that • Tree equivalence problem was known to be decidable [Sabelfeld00,Courcelle78] • We reduce the unification problem to anchored semi-unification

  9. Semi-Unification • Semi-unification is undecidable • We reduce to a new decidable fragment: anchored semi-unification • We skip the reduction for this talk

  10. Ordinary Unification • Terms: • Substitutions substitute variables by terms • Given ,find a substitution such that . • We call a unifier of • Example Unifier

  11. Semi-Unification • Terms: • An instance variable is a variant of • This must be respected by substitutions:where is withevery variable being replaced by • Example: is ok is forbidden

  12. Semi-Unification Example We search for a solution

  13. Semi-Unification Example since

  14. Semi-Unification Example since since

  15. Semi-Unification Example By definition of

  16. Semi-Unification Example Splitting the equation

  17. Semi-Unification Example Removing trivial equations

  18. Semi-Unification Example Now we can construct a solution

  19. Semi-Unification Rules • ifinstance-free • if instance-free

  20. Semi-Unification Rules • But semi-unification is undecidable! • The rules always terminate but … • … they can get stuck. • Example:Substituting would produce .We forbid this to ensure termination.

  21. if instance-free • if instance-free Anchored Semi-Unification • Anchoredness: Invariant to ensure progress • Intuition: Whenever we see an instance variable, we can replace it by an instance-free term. • Definition: There is a partial equivalence relation on variables such that • If , then with instance-free • If , then • If , then • If and , then

  22. Complexity • The rules I presented need exponential time • There is an algorithm with time • Idea from Unification-Closure[Huet78]: Don‘ t perform substitutions but just record equivalences in a union-find structure.

  23. References • B. Courcelle. A representation of trees by languages II. Theoretical Computer Science, 7(1):25-55, 1978. • V. Sabelfeld. The tree equivalence of linear recursion schemes. Theoretical Computer Science, 238(1-2):1-29, 2000. • G. P. Huet, Résolution d'Equations dans des Langages d'ordre 1,2,...,, Thèse d`État, Université de Paris VII, 1978 • F. Baader and W. Snyder. Unification theory. In Handbook of Automated Reasoning, volume 1, pages 445-534. Elsevier, 2001.

More Related