Skip to main content
Log in

Formal Correctness of a Quadratic Unification Algorithm

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

We present a case study using ACL2 to verify a nontrivial algorithm that uses efficient data structures. The algorithm receives as input two first-order terms, and it returns a most general unifier of these terms if they are unifiable, failure otherwise. The verified implementation stores terms as directed acyclic graphs by means of a pointer structure. Its time complexity is \(O(n^2)\) and its space complexity \(O(n)\), and it can be executed in ACL2 at a speed comparable to a similar C implementation. We report the main issues encountered to achieve this formally verified implementation.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge, UK (1998)

    Google Scholar 

  2. Baader, F., Snyder, W.: Unification theory. In: Robinson, A., Voronkov, A. (eds.) Handbook of Automated Reasoning, vol. 1, pp. 445–532. Elsevier, Amsterdam (2001)

    Google Scholar 

  3. Corbin, J., Bidoit, M.: A rehabilitation of Robinson’s Unification Algorithm. Inf. Process. 83, 909–914 (1983) North-Holland

    Google Scholar 

  4. Greve, D., Wilding, M.: High-speed, analyzable simulators. Computer-Aided Reasoning: ACL2 Case Studies, chapter 8. Kluwer, Norwell, MA (2000)

    Google Scholar 

  5. Kaufmann, M., Manolios, P., Moore, J S.: Computer-Aided Reasoning: An Approach. Kluwer, Norwell, MA (2000)

    Google Scholar 

  6. Kaufmann, M., Moore, J S.: ACL2 home page, 2005. URL: http://www.cs.utexas.edu/users/moore/acl2

  7. Moore, J S.: An exercise in graph theory. Computer-Aided Reasoning: ACL2 Case Studies, chapter 5. Kluwer, Norwell, MA (2000)

    Google Scholar 

  8. Ruiz-Reina, J.L., Alonso, J.A., Hidalgo, M.J., Martín, F.J.: Formal proofs about rewriting using ACL2. Ann. Math. Artif. Intell. 36, 239–262 (2002), Kluwer

    Article  MathSciNet  Google Scholar 

  9. Ruiz-Reina, J.L., Alonso, J.A., Hidalgo, M.J., Martín, F.J.: A theory about first-order terms in ACL2. In: Third ACL2 Workshop, Grenoble, 2002. URL: http://www.cs.utexas.edu/users/moore/acl2/workshops.html

  10. Ruiz-Reina, J.L., Alonso, J.A., Hidalgo, M.J., Martín, F.J.: A formally verified quadratic unification algorithm. In: Fourth ACL2 Workshop, Austin, 2004. URL: http://www.cs.utexas.edu/users/moore/acl2/workshops.html

  11. Ruiz-Reina, J.L., Alonso, J.A., Hidalgo, M.J., Martín, F.J.: A verified quadratic dag unification algorithm in ACL2, 2005. URL: http://www.cs.us.es/~jruiz/q-dag-unification

  12. Steele, Jr., G.L.: Common Lisp The Language, 2nd edn. Digital, Bedford, MA (1990)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to José-Luis Ruiz-Reina.

Additional information

This work has been supported by project TIN2004-03884 (Ministerio de Educación y Ciencia, Spain) and FEDER funds.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Ruiz-Reina, JL., Martín-Mateos, FJ., Alonso, JA. et al. Formal Correctness of a Quadratic Unification Algorithm. J Autom Reasoning 37, 67–92 (2006). https://doi.org/10.1007/s10817-006-9030-5

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10817-006-9030-5

Key words

Navigation