Skip to main content

Source-Tracking Unification

  • Conference paper
Automated Deduction – CADE-19 (CADE 2003)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 2741))

Included in the following conference series:

Abstract

We propose a practical path-based framework for deriving and simplifying source-tracking information for term unification in the empty theory. Such a framework is useful for debugging unification-based systems, including the diagnosis of ill-typed programs and the generation of success and failure proofs in logic programming.

The objects of source-tracking are deductions in the logic of unification. The semantics of deductions are paths over a unification graph whose labels form the language of suffixes of a semi-Dyck set. Based on this framework, two algorithms for generating proofs are presented: the first uses context-free shortest-path algorithms to generate optimal (shortest) proofs in time O(n 3), where n is the number of vertices of the unification graph. The second algorithm integrates easily with standard unification algorithms, entailing an overhead of only a constant factor, but generates non-optimal proofs. These non-optimal proofs may be further simplified by group rewrite rules.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Baader, F., Siekmann, J.: Unification theory. In: Gabbay, D.M., Hogger, C.J., Robinson, J.A. (eds.) Handbook of Logic in Artificial Intelligence and Logic Programmaning. Oxford University Press, Oxford (1993)

    Google Scholar 

  2. Barrett, C., Jakob, R., Marathe, M.: Formal language constraint path problems. SIAM Journal of Computing 30, 809–837 (2000)

    Article  MATH  Google Scholar 

  3. Beaven, M., Stansifer, R.: Explaining type errors in polymorphic languages. ACM Letters on Programming Languages (1994)

    Google Scholar 

  4. Bertot, Y.: Origin Functions in λ-calculus and Term Rewriting Systems. In: Raoult, J.-C. (ed.) CAAP 1992. LNCS, vol. 581. Springer, Heidelberg (1992)

    Google Scholar 

  5. Chen, T.Y., Lassez, J.-L., Port, G.S.: Maximal unifiable subsets and minimal non-unifiable subsets. New Generation Computing, 133–152 (1986)

    Google Scholar 

  6. Choppella, V.: Implementation of unification source-tracking (July 2002), http://www.cs.indiana.edu/hyplan/chaynes/unif.tar.gz

  7. Choppella, V.: Unification Source-tracking with Application to Diagnosis of Type Inference. PhD thesis, Indiana University, IUCS Tech Report TR566 (August 2002)

    Google Scholar 

  8. Corbin, J., Bidoit, M.: A rehabilitation of Robinson’s unification algorithm. In: Mason, R.E.A. (ed.) Information Processing, pp. 909–914. Elsevier Science Publishers (North Holland), Amsterdam (1983)

    Google Scholar 

  9. Cox, P.T.: Finding backtrack points for intelligent backtracking. In: Campbell, J. (ed.) Prolog Implementation, pp. 216–233 (1984)

    Google Scholar 

  10. Dinesh, T., Tip, F.: A case-study of slicing-based approach for locating type errors. In: Proc. 2nd International Conference on the Theory and Practice of Algebraic Specifications (ASF+SDF 1997) (September 1997)

    Google Scholar 

  11. Duggan, D., Bent, F.: Explaining type inference. Science of Computer Programming 27(1), 37–83 (1996)

    Article  MATH  Google Scholar 

  12. Harrison, M.A.: Introduction to Formal Language Theory. Addison-Wesley, Reading (1978)

    MATH  Google Scholar 

  13. Johnson, G.F., Walz, J.A.: A maximum-flow approach to anomaly isolation in unification-based incremental type inference. In: Proceedings of the 13th ACM Symposium on Programming Languages, pp. 44–57 (1986)

    Google Scholar 

  14. Lassez, J., Maher, M.J., Marriot, K.: Unification revisited. In: Minker, J. (ed.) Deductive Databases and Logic Programming, ch. 15, pp. 587–625. Morgan Kaufmann, San Francisco (1988)

    Google Scholar 

  15. Le Chenadec, P.: On the logic of unification. Journal of Symbolic computation 8(1), 141–199 (1989)

    Article  MATH  MathSciNet  Google Scholar 

  16. Lee, O., Yi, K.: Proofs about a folklore let-polymorphic type inference algorithm. ACM Transactions on Programming Languages 20(4), 707–723 (1998)

    Article  Google Scholar 

  17. Marathe, M.: Personal communication (May 2002)

    Google Scholar 

  18. Martelli, A., Montanari, U.: An efficient unification algorithm. ACM Trans. Program. Lang. Syst. 4(2), 258–282 (1982)

    Article  MATH  Google Scholar 

  19. Melski, D., Reps, T.: Interconvertibility of a class of set constraints and context-free-language reachability. Theoretical Computer Science 248(1-2), 29–98 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  20. Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17, 348–375 (1978)

    Article  MATH  MathSciNet  Google Scholar 

  21. Paterson, M., Wegman, M.: Linear unification. J. Comput. Syst. Sci. 16(2), 158–167 (1978)

    Article  MATH  MathSciNet  Google Scholar 

  22. Peterson, G.E., Stickel, M.E.: Complete sets of reductions for some equational theories. Journal for the ACM 28(2), 233–264 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  23. Port, G.S.: A simple approach to finding the cause of non-unifiability. In: Kowalski, R.A., Bowen, K.A. (eds.) Logic Programming: Proceedings of the Fifth International Conference and Symposium, pp. 651–665. MIT Press, Cambridge (1988)

    Google Scholar 

  24. Reps, T.: Program analysis via graph reachability. In: Maluszynski, J. (ed.) International Symposium on Logic Programming, pp. 5–19. MIT Press, Cambridge (1997)

    Google Scholar 

  25. Tip, F.: Generation of Program Analysis Tools. PhD thesis, Institute for Logic, Language and Computation, CWI, Amsterdam (1995)

    Google Scholar 

  26. van Deursen, A., Klint, P., Tip, F.: Origin Tracking. Journal of Symbolic Computation 15, 523–545 (1993); Special issue on automatic programming

    Google Scholar 

  27. Walz, J.A.: Extending Attribute Grammars and Type Inference Algorithms. PhD thesis, Cornell University (February 1989), TR 89-968

    Google Scholar 

  28. Wand, M.: Finding the source of type errors. In: 13th Annual ACM Symp. on Principles of Prog. Languages, January 1986, pp. 38–43 (1986)

    Google Scholar 

  29. Yang, J., Trinder, P., Michaelson, G., Wells, J.: Improved type error reporting. In: Proceeding of Implementation of Functional Languages, 12th International Workshop, September 2000, pp. 71–86 (2000)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Choppella, V., Haynes, C.T. (2003). Source-Tracking Unification. In: Baader, F. (eds) Automated Deduction – CADE-19. CADE 2003. Lecture Notes in Computer Science(), vol 2741. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45085-6_39

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-45085-6_39

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40559-7

  • Online ISBN: 978-3-540-45085-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics