Skip to main content

Experiments with implementations of two theoretical constructions

  • Conference paper
  • First Online:
Logic at Botik '89 (Logic at Botik 1989)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 363))

Included in the following conference series:

Abstract

This paper reports two experiments with implementations of constructions from theoretical computer science. The first one deals with Kleene's and Rogers' second recursion theorems and the second is an implementation of Cook's linear time simulation of two way deterministic pushdown automata (2DPDAs). Both experiments involve the treatment of programs as data objects and their execution by means of interpreters.

For our implementations we have been using a small LISP-like language called Mixwell, originally devised for the partial evaluator MIX used in the second experiment. LISP-like languages are especially suitable since programs are data (S-expressions) so the tedious coding of programs as Gödel numbers so familiar from recursive function theory is completely avoided.

We programmed the constructions in the standard proofs of Kleene's and Rogers' recursion theorems and found (as expected) the programs so constructed to be far too inefficient for practical use. We then designed and implemented a new programming language called Reflect in which Kleene and Rogers “fixed-point” programs can be expressed elegantly and much more efficiently. We have programmed some examples in Reflect in an as yet incomplete attempt to find out for which sort of problems the second recursion theorems are useful program generating tools.

The second experiment concerns an automaton that can solve many non-trivial pattern matching problems. Cook [4] has shown that any 2DPDA can be simulated in linear time by a clever memoization technique. We wrote a simple interpreter to execute 2DPDA programs and an interpreter using Cook's algorithm, and we observed that the latter was indeed much faster on certain language recognition problems. Both have, however, a high computational overhead, since they in effect work by interpretation rather than compilation. In order to alleviate this we applied the principle of partial evaluation, see [5], to specialize each of the two interpreters to fixed 2DPDAs. The result was a substantial speedup.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Alfred Aho, John Hopcroft, Jeffrey Ullman: The Design and Analysis of Computer Algorithms. Addison-Wesley, 1974.

    Google Scholar 

  2. Torben Amtoft, Thomas Nikolajsen, Jesper Larsson Träff: Implementation of some Theoretical Constructs. DIKU, University of Copenhagen, student project report 1988.

    Google Scholar 

  3. Manuel Blum: A Machine-Independent Theory of the Complexity of Recursive Functions. Journal of the Association for Computing Machinery, vol. 14, no. 2, April 1967, pp. 322–336.

    Google Scholar 

  4. Stephen A. Cook: Linear Time Simulation of Deterministic Two-Way Pushdown Automata. Information Processing 71, pp. 75–80, North-Holland Publishing Company, 1972.

    Google Scholar 

  5. A. P. Ershov: Mixed Computation: Potential applications and problems for study. Theoretical Computer Science 18, pp. 41–67, 1982.

    Google Scholar 

  6. Neil D. Jones: A Note on Linear Time Simulation of Deterministic Two-Way Pushdown Automata. Information Processing Letters, vol. 6 no. 4, 1977.

    Google Scholar 

  7. Neil D. Jones, Peter Sestoft, Harald Søndergaard: MIX: A Self-applicable partial Evaluator for Experiments in Compiler Generation (Revised Version). Lisp and Symbolic Computation, issue 2, fall 1988.

    Google Scholar 

  8. Akira Kanda: Theory of Computation. Lecture notes, DIKU, University of Copenhagen, 1985.

    Google Scholar 

  9. Stephen Cole Kleene: Introduction to Metamathematics. North-Holland, 1952.

    Google Scholar 

  10. A. I. Mal'cev: Algorithms and recursive functions. Wolters-Noordhoff Publishing, 1970.

    Google Scholar 

  11. Hartley Rogers: Theory of Recursive Functions and Effective Computability. McGraw-Hill, 1967.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Albert R. Meyer Michael A. Taitslin

Rights and permissions

Reprints and permissions

Copyright information

© 1989 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hansen, T.A., Nikolajsen, T., Träff, J.L., Jones, N.D. (1989). Experiments with implementations of two theoretical constructions. In: Meyer, A.R., Taitslin, M.A. (eds) Logic at Botik '89. Logic at Botik 1989. Lecture Notes in Computer Science, vol 363. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-51237-3_11

Download citation

  • DOI: https://doi.org/10.1007/3-540-51237-3_11

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-51237-0

  • Online ISBN: 978-3-540-46180-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics