Automating Algebraic Specifications of Non-freely Generated Data Types

  • Andriy Dunets
  • Gerhard Schellhorn
  • Wolfgang Reif
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5311)


Non-freely generated data types are widely used in case studies carried out in the theorem prover KIV. The most common examples are stores, sets and arrays. We present an automatic method that generates finite counterexamples for wrong conjectures and therewith offers a valuable support for proof engineers saving their time otherwise spent on unsuccessful proof attempts. The approach is based on the finite model finding and uses Alloy Analyzer [1] to generate finite instances of theories in KIV [6]. Most definitions of functions or predicates on infinite structures do not preserve the semantics if a transition to arbitrary finite substructures is made. We propose the constraints which should be satisfied by the finite substructures, identify a class of amenable definitions and present a practical realization using Alloy. The technique is evaluated on the library of basic data types as well as on some examples from case studies in KIV.


Algebraic specifications abstract data types finite models first-order logic theorem proving SAT checking 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    The Alloy Project,
  2. 2.
    Ahrendt, W.: Deductive search for errors in free data type specifications using model generation. In: Voronkov, A. (ed.) CADE 2002. LNCS (LNAI), vol. 2392. Springer, Heidelberg (2002)Google Scholar
  3. 3.
    Ahrendt, W., Beckert, B., Hähnle, R., Menzel, W., Reif, W., Schellhorn, G., Schmitt, P.: Integrating Automated and Interactive Theorem Proving. In: Bibel, W., Schmitt, P. (eds.) Automated Deduction – A Basis for Applications. Kluwer Academic Publishers, Dordrecht (1998)Google Scholar
  4. 4.
    Balser, M.: Verifying Concurrent Systems with Symbolic Execution. PhD thesis, Universität Augsburg, Fakultät für Informatik (2005)Google Scholar
  5. 5.
    Balser, M., Bäumler, S., Knapp, A., Reif, W., Thums, A.: Interactive verification of UML state machines. In: Davies, J., Schulte, W., Barnett, M. (eds.) ICFEM 2004. LNCS, vol. 3308, pp. 434–448. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  6. 6.
    Balser, M., Reif, W., Schellhorn, G., Stenzel, K., Thums, A.: Formal system development with KIV. In: Maibaum, T.S.E. (ed.) FASE 2000. LNCS, vol. 1783. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  7. 7.
    Claessen, K.: Equinox, a new theorem prover for full first-order logic with equality. Dagstuhl Seminar 05431 on Deduction and Applications (October 2005)Google Scholar
  8. 8.
    Claessen, K., Srensson, N.: New techniques that improve mace-style model finding. In: Proc. of Workshop on Model Computation (MODEL) (2003)Google Scholar
  9. 9.
    Dunets, A., Schellhorn, G., Reif, W.: Bounded Relational Analysis of Free Data Types. In: Beckert, B., Hähnle, R. (eds.) TAP 2008. LNCS, vol. 4966, pp. 99–115. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  10. 10.
    Ehrig, H., Mahr, B.: Fundamentals of Algebraic Specification. Springer, Heidelberg (1985)CrossRefzbMATHGoogle Scholar
  11. 11.
    Ehrig, H., Mahr, B.: Algebraic techniques in software development: A review of progress up to the mid nineties. In: Current Trends in Theoretical Computer Science, pp. 134–152 (2001)Google Scholar
  12. 12.
    Harel, D., Kozen, D., Tiuryn, J.: Dynamic Logic. MIT Press, Cambridge (2000)zbMATHGoogle Scholar
  13. 13.
    Harrison, J.: Inductive definitions: Automation and application. In: TPHOLs, pp. 200–213 (1995)Google Scholar
  14. 14.
    Jackson, D.: Automating first-order relational logic. In: Proceedings of the 8th ACM SIGSOFT Symposium, pp. 130–139. ACM Press, New York (2000)Google Scholar
  15. 15.
    Kuncak, V., Jackson, D.: Relational analysis of algebraic datatypes. In: Proceedings of the 13th ACM SIGSOFT Symposium (2005)Google Scholar
  16. 16.
    McCune, W.: Mace4 reference manual and guide (2003)Google Scholar
  17. 17.
    McCune, W.: Otter 3.3 reference manual (2003)Google Scholar
  18. 18.
    McCune, W.: Prover9 manual (April 2008)Google Scholar
  19. 19.
    Meng, J., Quigley, C., Paulson, L.C.: Automation for interactive proof: First prototype. Inf. Comput. 204(10), 1575–1596 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    Mosses, P.D.: CASL Reference Manual, The Complete Documentation of the Common Algebraic Specification Language. LNCS, vol. 2960. Springer, Heidelberg (2004)zbMATHGoogle Scholar
  21. 21.
    Owre, S., Rushby, J.M., Shankar, N.: PVS: A Prototype Verification System. In: Kapur, D. (ed.) CADE 1992. LNCS (LNAI), vol. 607, pp. 748–752. Springer, Heidelberg (1992)Google Scholar
  22. 22.
    Paulson, L.C.: Isabelle - A Generic Theorem Prover (with a contribution by T. Nipkow). LNCS, vol. 828. Springer, Heidelberg (1994)Google Scholar
  23. 23.
    Pike, L., Miner, P., Torres-Pomales, W.: Diagnosing a failed proof in fault-tolerance: A disproving challenge problem. In: DISPROVING 2006 Participants Proceedings, pp. 24–33 (2006)Google Scholar
  24. 24.
    Ramananandro, T.: Mondex, an electronic purse: specification and refinement checks with the Alloy model-finding method. Formal Aspects of Computing 20(1), 21–39 (2008)CrossRefGoogle Scholar
  25. 25.
    Reif, W.: Korrektheit von Spezifikationen und generischen Moduln. PhD thesis, Universität Karlsruhe, Germany (1991) (in German)Google Scholar
  26. 26.
    Reif, W., Schellhorn, G.: Theorem Proving in Large Theories. In: Bibel, W., Schmitt, P. (eds.) Automated Deduction—A Basis for Applications, vol. III, 2. Kluwer Academic Publishers, Dordrecht (1998)Google Scholar
  27. 27.
    Reif, W., Schellhorn, G., Thums, A.: Flaw detection in formal specifications. In: Goré, R.P., Leitsch, A., Nipkow, T. (eds.) IJCAR 2001. LNCS (LNAI), vol. 2083, pp. 642–657. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  28. 28.
    Schellhorn, G.: Verification of Abstract State Machines. PhD thesis, Universität Ulm, Fakultät für Informatik (1999), Google Scholar
  29. 29.
    Slaney, J.K.: Finder: Finite domain enumerator - system description. In: CADE, pp. 798–801 (1994)Google Scholar
  30. 30.
    Stenzel, K.: A formally verified calculus for full Java Card. In: Rattray, C., Maharaj, S., Shankland, C. (eds.) AMAST 2004. LNCS, vol. 3116, pp. 491–505. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  31. 31.
    Thums, A.: Fehlersuche in Formalen Spezifikationen. Master’s thesis, Universität Ulm, Germany (1998) (in German)Google Scholar
  32. 32.
    Torlak, E., Jackson, D.: Kodkod: A relational model finder. In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 632–647. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  33. 33.
    Weber, T.: SAT-based Finite Model Generation for Higher-Order Logic. PhD thesis, Institut für Informatik, Technische Universität München, Germany (April 2008)Google Scholar
  34. 34.
  35. 35.
    Zhang, J., Zhang, H.: Sem: a system for enumerating models. In: IJCAI, pp. 298–303 (1995)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Andriy Dunets
    • 1
  • Gerhard Schellhorn
    • 1
  • Wolfgang Reif
    • 1
  1. 1.Lehrstuhl für Softwaretechnik und Programmiersprachen Institut für InformatikUniversität AugsburgAugsburgGermany

Personalised recommendations