Higher-Order and Symbolic Computation

, Volume 14, Issue 4, pp 387–409

From Syntactic Theories to Interpreters: Automating the Proof of Unique Decomposition

  • Yong Xiao
  • Amr Sabry
  • Zena M. Ariola
Article

Abstract

Developing syntactic theories for reasoning about programming languages usually involves proving a unique-decomposition lemma. The proof of such a lemma is tedious, error-prone, and is usually attempted many times during the design of a theory. We therefore investigate the automation of such proofs.

We map the unique-decomposition lemma to the problems of checking equivalence and ambiguity of syntactic definitions. Because checking these properties of context-free grammars is undecidable, we work with regular tree grammars and use algorithms on finite tree automata to perform the checking. To make up for the insufficient expressiveness of regular tree grammars, we extend the basic framework with built-in types and constants, contexts, and polymorphic types.

Our implementation extends an earlier system by Xiao et al. [16] that translates semantic specifications expressed as syntactic theories to interpreters. We have successfully used the combined system to generate interpreters and verify the unique-decomposition lemma for a number of examples.

syntactic theories interpreters proof automation regular tree grammars finite tree automata 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aho, A., Sethi, R., and Ullman, J. Compilers-Principles, Techniques, and Tools. Addison-Wesley, Reading, MA, 1985.Google Scholar
  2. 2.
    Ariola, Z.M. and Felleisen, M. The call-by-need lambda calculus. J. Functional Programming, 7(3) (1997) 265-301.Google Scholar
  3. 3.
    Barendregt, H.P. The Lambda Calculus: Its Syntax and Semantics, Vol. 103 of Studies in Logic and the Foundations of Mathematics. Elsevier Science Publishers B.V., Amsterdam, 1984.Google Scholar
  4. 4.
    Comon, H., Dauchet, M., Gilleron, R., Jacquemart, F., Lugiez, D., Tison, S., and Tommasi, M. Tree Automata Techniques and Applications, 1999. Book draft available at http://www.grappa.univ-lille3.fr/tata.Google Scholar
  5. 5.
    de Bruijn, N. The mathematical language AUTOMATH, its usage, and some of its extensions. In Proceedings of the Symposium on Automatic Demonstration. Versailles, France, M. Laudet (Ed.). LNM, Vol. 125, Springer-Verlag, 1968, pp. 29-61.Google Scholar
  6. 6.
    Dowek, G., Felty, A., Herbelin, H., Huet, G., Murthy, C., Parent, C., Paulin-Mohring, C., and Werner, B. The Coq proof assistant user's guide. Technical Report Rapport Techniques 154, INRIA, Rocquencourt, France, 1993. Version 5.8.Google Scholar
  7. 7.
    Fähndrich, M. and Boyland, J. Statically checkable pattern abstractions. In ACM SIGPLAN International Conference on Functional Programming. ACM Press, New York, 1997, pp. 75-84.Google Scholar
  8. 8.
    Felleisen, M. The calculi of lambda-v-CS-conversion: A syntactic theory of control and state in imperative higher-order programming languages. Ph.D. Thesis, Indiana University, 1987.Google Scholar
  9. 9.
    Fiskio-Lasseter, J. and Sabry, A. Putting operational techniques to the test: A syntactic theory for behavioral Verilog. In Electronic Notes in Theoretical Computer Science, Vol. 26, 1999, pp. 32-49. Also in Third International Workshop on Higher Order Operational Techniques in Semantics.Google Scholar
  10. 10.
    Gécseg, F. and Steinby, M. Tree Automata. Budapest, Akadémiai Kiadó , 1984.Google Scholar
  11. 11.
    Hopcroft, J. and Ullman, J. Introduction toAutomata Theory, Languages, and Computation, Computer Science. Addison-Wesley, Reading, MA, 1979.Google Scholar
  12. 12.
    Launchbury, J. and Sabry, A. Monadic state: Axiomatization and type safety. In ACM SIGPLAN International Conference on Functional Programming. ACM Press, New York, 1997, pp. 227-238.Google Scholar
  13. 13.
    Mason, I.A. Computing with contexts. Higher-Order and Symbolic Computation, 12(2) (1999) 171-201.Google Scholar
  14. 14.
    Pfenning, F. and Schürmann, C. System description: Twelf-a meta-logical framework for deductive systems. In Proceedings of the 16th International Conference on Automated Deduction. Trento, Italy, H. Ganzinger (Ed.). Springer-Verlag, Berlin, 1999, pp. 202-206.Google Scholar
  15. 15.
    Semmelroth, M. and Sabry, A. Monadic encapsulation in ML. In ACM SIGPLAN International Conference on Functional Programming. ACM Press, New York, 1999, pp. 8-17.Google Scholar
  16. 16.
    Xiao, Y., Ariola, Z.M., and Mauny, M. From syntactic theories to interpreters: A specification language and its compiler. In Proceedings of the First International Workshop on Rule-based Programming. Montréal, Canada, N. Derschowitz and C. Kirchner (Eds.). 2000, pp. 1-16. The proceedings are also available at http://www.loria.fr/~ckirchne/=rule2000/proceedings/.Google Scholar

Copyright information

© Kluwer Academic Publishers 2001

Authors and Affiliations

  • Yong Xiao
    • 1
  • Amr Sabry
    • 2
  • Zena M. Ariola
    • 1
  1. 1.Department of Computer and Information ScienceUniversity of OregonEugeneUSA
  2. 2.Computer Science DepartmentIndiana UniversityBloomingtonUSA

Personalised recommendations