Abstract
In this work, we develop a binding-time analysis for the logic programming language Mercury. We introduce a precise domain of binding-times, based on the type information available in Mercury programs, that allows the analyser to reason with partially static data structures. The analysis is polyvariant, and deals with the module structure and higher-order capabilities of Mercury programs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Andersen, L.O.: Binding-time analysis and the taming of C pointers. In: PEPM 1993, pp. 47–58. ACM, New York (1993)
Asai, K.: Binding-time analysis for both static and dynamic expressions. New Generation Computing 20(1), 27–52 (2001)
Asai, K.: Binding-time analysis for both static and dynamic expressions. In: Static Analysis Symposium, pp. 117–133 (1999)
Bondorf, A.: Automatic autoprojection of higher order recursive equations. Science of Computer Programming 17, 3–34 (1991)
Bondorf, A., Jørgensen, J.: Efficient analyses for realistic off-line partial evaluation. Journal of Functional Programming 3(3), 315–346 (1993)
Bruynooghe, M., Leuschel, M., Sagonas, K.: A polyvariant binding-time analysis for off-line partial deduction. In: Hankin, C. (ed.) ESOP 1998. M. Bruynooghe, M. Leuschel, K. Sagonas, vol. 1381, pp. 27–41. Springer, Heidelberg (1998)
Bruynooghe, M., Vanhoof, W., Codish, M.: Pos(T): Analyzing dependencies in typed logic programs. In: Bjørner, D., Broy, M., Zamulin, A.V. (eds.) PSI 2001. LNCS, vol. 2244, pp. 406–420. Springer, Heidelberg (2001)
Bueno, F., de la Banda, M., Hermenegildo, M., Marriott, K., Puebla, G., Stuckey, P.: A model for inter-module analysis and optimizing compilation. In: Lau, K.-K. (ed.) LOPSTR 2000. LNCS, vol. 2042, pp. 64–71. Springer, Heidelberg (2001)
Consel, C.: Binding time analysis for higher order untyped functional languages. In: 1990 ACM Conference on Lisp and Functional Programming, Nice, France, pp. 264–272. ACM, New York (1990)
Consel, C., et al.: A uniform approach for compile-time and run-time specialization. In: Danvy, O., Thiemann, P., Glück, R. (eds.) Dagstuhl Seminar 1996. LNCS, vol. 1110, pp. 54–72. Springer, Heidelberg (1996)
Conway, T., Henderson, F., Somogyi, Z.: Code generation for Mercury. In: Lloyd, J. (ed.) Proceedings of the International Symposium on Logic Programming, pp. 242–256. MIT Press, Cambridge (1995)
Dussart, D., Heldal, R., Hughes, J.: Module-sensitive program specialisation. In: SIGPLAN 1997 Conference on Programming Language Design and Implementation, Las Vegas, June 1997, pp. 206–214. ACM, New York (1997)
Futamura, Y.: Partial evaluation of a computation process — an approach to a compiler-compiler. Systems, Computers, Controls 2(5), 45–50 (1971)
Glück, R., Jørgensen, J.: An automatic program generator for multi-level specialization. Lisp and Symbolic Computation 10, 113–158 (1997)
Gomard, C.K., Jones, N.D.: A partial evaluator for the untyped lambda-calculus. Journal of Functional Programming 1(1), 21–69 (1991)
Heintze, N.: Set-based analysis of ML programs. In: ACM Conference on Lisp and Functional Programming, pp. 306–317 (1994)
Henglein, F.: Efficient type inference for higher-order binding-time analysis. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 448–472. Springer, Heidelberg (1991)
Henglein, F.: Simple closure analysis. Technical Report D-193, DIKU Semantics Report (1992)
Henglein, F., Mossin, C.: Polymorphic binding-time analysis. In: Sannella, D. (ed.) ESOP 1994. LNCS, vol. 788, pp. 287–301. Springer, Heidelberg (1994)
Hornof, L., Noyé, J.: Accurate binding-time analysis for imperative languages: Flow, context, and return sensitivity. In: PEPM 1997, pp. 63–73. ACM, New York (1997)
Jacobs, D., Langen, A.: Static analysis of logic programs for independent AND-parallelism. Journal of Logic Programming 13(2 &3), 291–314 (1992)
Janssens, G., Bruynooghe, M.: Deriving descriptions of possible values of program variables by means of abstract interpretation. Journal of Logic Programming 13(2&3), 205–258 (1992)
Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)
Jones, N.D., Sestoft, P., Søndergaard, H.: An experiment in partial evaluation: The generation of a compiler generator. In: Jouannaud, J.-P. (ed.) RTA 1985. LNCS, vol. 202, pp. 124–140. Springer, Heidelberg (1985)
Jørgensen, J., Leuschel, M.: Efficiently generating efficient generating extensions in Prolog. In: Danvy, O., Thiemann, P., Glück, R. (eds.) Dagstuhl Seminar 1996. LNCS, vol. 1110, pp. 238–262. Springer, Heidelberg (1996)
Lagoon, V., Mesnard, F., Stuckey, P.: Termination analysis with types is more accurate. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol. 2916, pp. 254–268. Springer, Heidelberg (2003)
Lakshman, T.K., Reddy, U.S.: Typed Prolog: A semantic reconstruction of the Mycroft-O’Keefe type system. In: Saraswat, K., Ueda, V. (eds.) Proceedings of the 1991 International Symposium on Logic Programming (ISLP 1991), San Diego, CA, pp. 202–220. MIT Press, Cambridge (1991)
Launchbury, J.: Dependent sums express separation of binding times. In: Davis, K., Hughes, J. (eds.) Functional Programming, Glasgow, Scotland, pp. 238–253. Springer, Heidelberg (1989/1990)
Leuschel, M., Craig, S.J., Bruynooghe, M., Vanhoof, W.: Specializing interpreters using offline partial deduction. In: Bruynooghe, M., Lau, K.-K. (eds.) Program Development in Computational Logic. LNCS, vol. 3049, pp. 340–375. Springer, Heidelberg (2004)
Leuschel, M., Jørgensen, J., Vanhoof, W., Bruynooghem, M.: Offline specialisation in Prolog using a hand-written compiler generator. Theory and Practice of Logic Programming 4(1), 139–191 (2002)
Lloyd, J.W.: Declarative error diagnosis. New Generation Computing 5, 133–154 (1987)
Mogensen, T.: Binding Time Analysis for Polymorphically Typed Higher Order Languages. In: Díaz, J., Orejas, F. (eds.) TAPSOFT 1989 and CCIPL 1989. LNCS, vol. 352, pp. 298–312. Springer, Heidelberg (1989)
Mogensen, T., Bondorf, A.: Logimix: A self-applicable partial evaluator for Prolog. In: Leuschel, M. (ed.) LOPSTR 2002. LNCS, vol. 2664, pp. 214–227. Springer, Heidelberg (2003)
Mycroft, A., O’Keefe, R.A.: A polymorphic type system for Prolog. Artificial Intelligence 23(3), 295–307 (1984)
Palsberg, J.: Closure analysis in constraint form. ACM Transactions on Programming Languages and Systems 17(1), 47–62 (1995)
Puebla, G., Hermenegildo, M.: Some issues in analysis and specialization of modular Ciao-Prolog programs. In: Leuschel, M. (ed.) Proceedings of the Workshop on Optimization and Implementation of Declarative Languages, Las Cruces. Electronic Notes in Theoretical Computer Science, vol. 30(2), Elsevier Science, Amsterdam (1999)
Smaus, J.-G.: Analysis of polymorphically typed logic programs using ACIunification. In: Nieuwenhuis, R., Voronkov, A. (eds.) LPAR 2001. LNCS (LNAI), vol. 2250, pp. 280–295. Springer, Heidelberg (2001)
Smaus, J.-G., Hill, P.M., King, A.: Mode Analysis Domains for Typed Logic Programs. In: Logic Program Synthesis and Transformation, pp. 82–101 (1999)
Somogyi, Z.: A system of precise modes for logic programs. In: International Conference on Logic Programming, pp. 769–787 (1987)
Somogyi, Z., et al.: The Melbourne Mercury compiler, release 0.9
Somogyi, Z., Henderson, F., Conway, T.: The implementation of Mercury, an efficient purely declarative logic programming language. In: Proceedings of the ILPS 1994 Postconference Workshop on Implementation Techniques for Logic Programming Languages (1994)
Somogyi, Z., Henderson, F., Conway, T.: Logic programming for the real world. In: Proceedings of the ILPS 1995 Postconference Workshop on Visions for the Future of Logic Programming (1995)
Somogyi, Z., Henderson, F., Conway, T.: The execution algorithm of Mercury, an efficient purely declarative logic programming language. Journal of Logic Programming 29(1-3), 17–64 (1996)
Somogyi, Z., Henderson, F., Conway, T., Bromage, A., Dowd, T., Jeffery, D., Ross, P., Schachte, P., Taylor, S.: Status of the Mercury system. In: Proceedings of the JICSLP 1996 Workshop on Parallelism and Implementation Technology for (Constraint) Logic Programming Languages (1996)
Van Hentenryck, P., Cortesi, A., Le Charlier, B.: Type analysis of Prolog using type graphs. Journal of Logic Programming 22(3), 179–209 (1995)
Vanhoof, W.: Binding-time analysis by constraint solving: a modular and higherorder approach for Mercury. In: Parigot, M., Voronkov, A. (eds.) LPAR 2000. LNCS (LNAI), vol. 1955, pp. 399–416. Springer, Heidelberg (2000)
Vanhoof, W., Bruynooghe, M.: Binding-time analysis for Mercury. In: De Schreye, D. (ed.) 16th International Conference on Logic Programming, pp. 500–514. MIT Press, Cambridge (1999)
Vanhoof, W., Bruynooghe, M.: Binding-time analysis for Mercury. In: Preproceedings of LOPSTR 1999, Venice, Italy, Technical Report, University of Venice (1999)
Vanhoof, W.: Techniques for on- and off-line specialisation of logic programs. Phd, Department of Computer Science, K.U.Leuven, Leuven, Belgium, June 2001, pp : xiv+323+xxxiii (2001)
Vanhoof, W., Bruynooghe, M.: Binding-time annotations without binding-time analysis. In: Nieuwenhuis, R., Voronkov, A. (eds.) LPAR 2001. LNCS (LNAI), vol. 2250, pp. 707–722. Springer, Heidelberg (2001)
Vanhoof, W., Bruynooghe, M.: When size does matter - Termination analysis for typed logic programs. In: Pettorossi, A. (ed.) LOPSTR 2001. LNCS, vol. 2372, pp. 129–147. Springer, Heidelberg (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Vanhoof, W., Bruynooghe, M., Leuschel, M. (2004). Binding-Time Analysis for Mercury. In: Bruynooghe, M., Lau, KK. (eds) Program Development in Computational Logic. Lecture Notes in Computer Science, vol 3049. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-25951-0_7
Download citation
DOI: https://doi.org/10.1007/978-3-540-25951-0_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-22152-4
Online ISBN: 978-3-540-25951-0
eBook Packages: Springer Book Archive