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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
Barrett, C., Jakob, R., Marathe, M.: Formal language constraint path problems. SIAM Journal of Computing 30, 809–837 (2000)
Beaven, M., Stansifer, R.: Explaining type errors in polymorphic languages. ACM Letters on Programming Languages (1994)
Bertot, Y.: Origin Functions in λ-calculus and Term Rewriting Systems. In: Raoult, J.-C. (ed.) CAAP 1992. LNCS, vol. 581. Springer, Heidelberg (1992)
Chen, T.Y., Lassez, J.-L., Port, G.S.: Maximal unifiable subsets and minimal non-unifiable subsets. New Generation Computing, 133–152 (1986)
Choppella, V.: Implementation of unification source-tracking (July 2002), http://www.cs.indiana.edu/hyplan/chaynes/unif.tar.gz
Choppella, V.: Unification Source-tracking with Application to Diagnosis of Type Inference. PhD thesis, Indiana University, IUCS Tech Report TR566 (August 2002)
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)
Cox, P.T.: Finding backtrack points for intelligent backtracking. In: Campbell, J. (ed.) Prolog Implementation, pp. 216–233 (1984)
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)
Duggan, D., Bent, F.: Explaining type inference. Science of Computer Programming 27(1), 37–83 (1996)
Harrison, M.A.: Introduction to Formal Language Theory. Addison-Wesley, Reading (1978)
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)
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)
Le Chenadec, P.: On the logic of unification. Journal of Symbolic computation 8(1), 141–199 (1989)
Lee, O., Yi, K.: Proofs about a folklore let-polymorphic type inference algorithm. ACM Transactions on Programming Languages 20(4), 707–723 (1998)
Marathe, M.: Personal communication (May 2002)
Martelli, A., Montanari, U.: An efficient unification algorithm. ACM Trans. Program. Lang. Syst. 4(2), 258–282 (1982)
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)
Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17, 348–375 (1978)
Paterson, M., Wegman, M.: Linear unification. J. Comput. Syst. Sci. 16(2), 158–167 (1978)
Peterson, G.E., Stickel, M.E.: Complete sets of reductions for some equational theories. Journal for the ACM 28(2), 233–264 (1981)
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)
Reps, T.: Program analysis via graph reachability. In: Maluszynski, J. (ed.) International Symposium on Logic Programming, pp. 5–19. MIT Press, Cambridge (1997)
Tip, F.: Generation of Program Analysis Tools. PhD thesis, Institute for Logic, Language and Computation, CWI, Amsterdam (1995)
van Deursen, A., Klint, P., Tip, F.: Origin Tracking. Journal of Symbolic Computation 15, 523–545 (1993); Special issue on automatic programming
Walz, J.A.: Extending Attribute Grammars and Type Inference Algorithms. PhD thesis, Cornell University (February 1989), TR 89-968
Wand, M.: Finding the source of type errors. In: 13th Annual ACM Symp. on Principles of Prog. Languages, January 1986, pp. 38–43 (1986)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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