Abstract
Jones optimality implies that a program specializer is strong enough to remove an entire level of self-interpretation. This paper argues that Jones optimality, which was originally devised as a criterion for self-applicable specializers, plays a fundamental role in the use of a binding-time improvement prepass prior to specialization. We establish that, regardless of the binding-time improvements applied to a subject program (no matter how extensively), a specializer that is not Jones-optimal is strictly weaker than a specializer that is Jones-optimal. We describe the main approaches that increase the strength of a specializer without requiring its modification, namely incremental specialization and the interpretive approach, and show that they are equally powerful when the specializer is bti-universal. Since this includes the generation of program specializers from interpreters, the theoretical possibility of bootstrapping powerful specializers is established.
Similar content being viewed by others
References
Abramov, S.M., Glück, R.: Combining semantics with non-standard interpreter hierarchies. In: Kapoor, S., Prasad, S. (eds.) Foundations of Software Technology and Theoretical Computer Science. Proceedings. LNCS, vol. 1974, pp. 201–213. Springer, Berlin (2000)
Amtoft, T., Consel, C., Danvy, O., Malmkjær, K.: The abstraction and instantiation of string-matching programs. In: Mogensen, T.Æ., Schmidt, D., Sudborough, I.H. (eds.) The Essence of Computation: Complexity, Analysis, Transformation. LNCS, vol. 2566, pp. 295–330. Springer, Berlin (2002)
Barker, S., Leuschel, M., Varea, M.: Efficient and flexible access control via Jones-optimal logic program specialization. Higher-Order Symb. Comput. 21(1–2), 5–35 (2008)
Bondorf, A.: Similix. 5.0 Manual. DIKU, University of Copenhagen, Denmark (1993). Included in the Similix distribution. http://www.diku.dk/forskning/topps/activities/similix.html, 82 pages
Bulyonkov, M.A.: Extracting polyvariant binding time analysis from polyvariant specializer. In: Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 59–65. ACM Press, New York (1993)
Christensen, N.H., Glück, R.: Offline partial evaluation can be as accurate as online partial evaluation. ACM TOPLAS 26(1), 191–220 (2004)
Consel, C., Danvy, O.: Partial evaluation of pattern matching in strings. Inf. Proces. Lett. 30(2), 79–86 (1989)
Consel, C., Danvy, O.: For a better support of static data flow. In: Hughes, J. (ed.) Functional Programming Languages and Computer Architecture. Proceedings. LNCS, vol. 523, pp. 496–519. Springer, Berlin (1991)
Danvy, O., López, P.E.M.: Tagging, encoding, and Jones optimality. In: Degano, P. (ed.) Programming Languages and Systems. Proceedings. LNCS, vol. 2618, pp. 335–347. Springer, Berlin (2003)
Danvy, O., Malmkjær, K., Palsberg, J.: The essence of eta-expansion in partial evaluation. Lisp Symb. Comput. 8(3), 209–227 (1995)
Debois, S.: Imperative-program transformation by instrumented-interpreter specialization. Higher-Order Symb. Comput. 21(1–2), 37–58 (2008)
Ershov, A.P.: On the partial computation principle. Inf. Process. Lett. 6(2), 38–41 (1977)
Feigin, B., Mycroft, A.: Jones optimality and hardware virtualization. In: Partial Evaluation and Semantics-Based Program Manipulation. Proceedings, pp. 169–175. ACM Press, New York (2008)
Futamura, Y.: Partial evaluation of computing process – an approach to a compiler-compiler. Syst. Comput. Controls 2(5), 45–50 (1971). Reprinted in Higher-Order Symb. Comput. 12(4), 381–391 (1999)
Futamura, Y., Nogi, K.: Generalized partial computation. In: Bjørner, D., Ershov, A.P., Jones, N.D. (eds.) Partial Evaluation and Mixed Computation, pp. 133–151. North-Holland, Amsterdam (1988)
Futamura, Y., Konishi, Z., Glück, R.: WSDFU: Program transformation system based on generalized partial computation. In: Mogensen, T., Schmidt, D., Sudborough, I.H. (eds.) The Essence of Computation: Complexity, Analysis, Transformation. LNCS, vol. 2566, pp. 358–378. Springer, Berlin (2002)
Gade, J., Glück, R.: On Jones-optimal specializers: a case study using Unmix. In: Kobayashi, N. (ed.) Programming Languages and Systems. Proceedings. LNCS, vol. 4279, pp. 406–422. Springer, Berlin (2006)
Glück, R.: On the generation of specializers. J. Funct. Program. 4(4), 499–514 (1994)
Glück, R.: Jones optimality, binding-time improvements, and the strength of program specializers. In: Proceedings of the Asian Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 9–19. ACM Press, New York (2002)
Glück, R.: The translation power of the Futamura projections. In: Broy, M., Zamulin, A.V. (eds.) Perspectives of System Informatics. Proceedings, LNCS, vol. 2890, pp. 133–147. Springer, Berlin (2003)
Glück, R., Jørgensen, J.: Generating optimizing specializers. In: IEEE International Conference on Computer Languages, pp. 183–194. IEEE Computer Society Press, Silver Spring (1994)
Glück, R., Jørgensen, J.: Generating transformers for deforestation and supercompilation. In: Charlier, Le B. (ed.) Static Analysis. Proceedings. LNCS, vol. 864, pp. 432–448. Springer, Berlin. (1994)
Glück, R., Jørgensen, J.: Efficient multi-level generating extensions for program specialization. In: Hermenegildo, M., Swierstra, S.D. (eds.) Programming Languages: Implementations, Logics and Programs. Proceedings. LNCS, vol. 982, pp. 259–278. Springer, Berlin (1995)
Glück, R., Klimov, A.V.: Occam’s razor in metacomputation: the notion of a perfect process tree. In: Cousot, P., Falaschi, M., Filé, G., Rauzy, A. (eds.) Static Analysis. Proceedings. LNCS, vol. 724, pp. 112–123. Springer, Berlin (1993)
Glück, R., Klimov, A.V.: A regeneration scheme for generating extensions. Inf. Process. Lett. 62(3), 127–134 (1997)
Hatcliff, J.: An introduction to online and offline partial evaluation using a simple flowchart language. In: Hatcliff, J., Mogensen, T.Æ., Thiemann, P. (eds.) Partial Evaluation. Practice and Theory. LNCS, vol. 1706, pp. 20–82. Springer, Berlin (1999)
Heering, J.: Partial evaluation and ω-completeness of algebraic specifications. Theor. Comput. Sci. 43(2–3), 149–167 (1986)
Jones, N.D.: Challenging problems in partial evaluation and mixed computation. In: Bjørner, D., Ershov, A.P., Jones, N.D. (eds.) Partial Evaluation and Mixed Computation, pp. 1–14. North-Holland, Amsterdam (1988)
Jones, N.D.: Partial evaluation, self-application and types. In: Paterson, M.S. (ed.) Automata, Languages and Programming. Proceedings. LNCS, vol. 443, pp. 639–659. Springer, Berlin (1990)
Jones, N.D.: Transformation by interpreter specialization. Sci. Comput. Program. 52(1–3), 307–339 (2004)
Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)
Jørgensen, J.: Generating a compiler for a lazy language by partial evaluation. In: Conference Record of the Nighteenth Symposium on Principles of Programming Languages, pp. 258–268. ACM Press, New York (1992)
Leuschel, M., De Schreye, D.: Towards creating specialized integrity checks through partial evaluation of metainterpreters. In: Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 253–263. ACM Press, New York (1995)
Makholm, H.: On Jones-optimal specialization for strongly typed languages. In: Taha, W. (ed.) Semantics, Applications, and Implementation of Program Generation. Proceedings. LNCS, vol. 1924, pp. 129–148. Springer, Berlin (2000)
Mogensen, T.Æ.: Partially static structures in a self-applicable partial evaluator. In: Bjørner, D., Ershov, A.P., Jones, N.D. (eds.) Partial Evaluation and Mixed Computation, pp. 325–347. North-Holland, Amsterdam (1988)
Mogensen, T.Æ.: Separating binding times in language specifications. In: Fourth International Conference on Functional Programming and Computer Architecture, London, UK, pp. 14–25. ACM Press and Addison-Wesley, Reading (1989)
Mogensen, T.Æ.: Self-applicable partial evaluation for pure lambda calculus. In: ACM SIGPLAN Workshop on Partial Evaluation and Semantics-based Program Manipulation, pp. 116–121. Yale University, New Haven (1992)
Mogensen, T.Æ.: Evolution of partial evaluators: removing inherited limits. In: Danvy, O., Glück, R., Thiemann, P. (eds.) Partial Evaluation. Proceedings. LNCS, vol. 1110, pp. 303–321. Springer, Berlin (1996)
Mogensen, T.Æ.: Inherited limits. In: Hatcliff, J., Mogensen, T.Æ., Thiemann, P. (eds.) Partial Evaluation. Practice and Theory. LNCS, vol. 1706, pp. 189–202. Springer, Berlin (1999)
Sestoft, P.: The structure of a self-applicable partial evaluator. In: Ganzinger, H., Jones, N.D. (eds.) Programs as Data Objects. LNCS, vol. 217, pp. 236–256. Springer, Berlin (1986)
Sestoft, P.: ML pattern match compilation and partial evaluation. In: Danvy, O., Glück, R., Thiemann, P. (eds.) Partial Evaluation. Proceedings. LNCS, vol. 1110, pp. 446–464. Springer, Berlin (1996)
Skalberg, S.: Mechanical proof of the optimality of a partial evaluator. Master’s thesis, DIKU, Department of Computer Science, University of Copenhagen (1999)
Sørensen, M.H., Glück, R., Jones, N.D.: A positive supercompiler. J. Funct. Program. 6(6), 811–838 (1996)
Sperber, M., Thiemann, P.: Realistic compilation by partial evaluation. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. pp. 206–214. ACM Press, New York (1996)
Sperber, M., Glück, R., Thiemann, P.: Bootstrapping higher-order program transformers from interpreters. In: George, K.M., Carroll, J.H., Oppenheim, D., Hightower, J. (eds.) Proceedings of the 1996 ACM Symposium on Applied Computing. pp. 408–413. ACM Press, New York (1996)
Taha, W., Makholm, H., Hughes, J.: Tag elimination and Jones-optimality. In: Danvy, O., Filinsky, A., (eds.) Programs as Data Objects. Proceedings. LNCS, vol. 2053, pp. 257–275. Springer, Berlin (2001)
Thiemann, P., Glück, R.: The generation of a higher-order online partial evaluator. In: Takeichi, M., Ida, T. (eds.) Fuji International Workshop on Functional and Logic Programming, pp. 239–253. World Scientific, Singapore (1995)
Thiemann, P., Sperber, M.: Polyvariant expansion and compiler generators. In: Bjørner, D., Broy, M., Pottosin, I.V. (eds.) Perspectives of System Informatics. Proceedings. LNCS, vol. 1181, pp. 285–296. Springer, Berlin (1996)
Turchin, V.F.: Program transformation with metasystem transitions. J. Funct. Program. 3(3), 283–313 (1993)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Glück, R. An investigation of Jones optimality and BTI-universal specializers. Higher-Order Symb Comput 21, 283–309 (2008). https://doi.org/10.1007/s10990-008-9033-5
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10990-008-9033-5