Hostname: page-component-cd9895bd7-gbm5v Total loading time: 0 Render date: 2024-12-18T01:57:13.206Z Has data issue: false hasContentIssue false

Demand analysis with partial predicates

Published online by Cambridge University Press:  01 January 2007

JULIO MARIÑO
Affiliation:
Facultad de Informática, Universidad Politécnica de Madrid Campus de Montegancedo s/u, 28660 Boadilla del Monte, Spain (e-mail: [email protected], [email protected], [email protected])
ÁNGEL HERRANZ
Affiliation:
Facultad de Informática, Universidad Politécnica de Madrid Campus de Montegancedo s/u, 28660 Boadilla del Monte, Spain (e-mail: [email protected], [email protected], [email protected])
JUAN JOSÉ MORENO-NAVARRO
Affiliation:
Facultad de Informática, Universidad Politécnica de Madrid Campus de Montegancedo s/u, 28660 Boadilla del Monte, Spain (e-mail: [email protected], [email protected], [email protected])

Abstract

To alleviate the inefficiencies caused by the interaction of the logic and functional sides, integrated languages may take advantage of demand information, i.e. knowing in advance which computations are needed and, to which extent, in a particular context. This work studies demand analysis – which is closely related to backwards strictness analysis – in a semantic framework of partial predicates, which in turn are constructive realizations of ideals in a domain. This will allow us to give a concise, unified presentation of demand analysis, to relate it to other analyses based on abstract interpretation or strictness logics, some hints for the implementation, and, more important, to prove the soundness of our analysis based on demand equations. There are also some innovative results. One of them is that a set constraint-based analysis has been derived in a stepwise manner using ideas taken from the area of program transformation. The other one is the possibility of using program transformation itself to perform the analysis, specially in those domains of properties where algorithms based on constraint solving are too weak.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2007

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Antoy, S., Echahed, R. and Hanus, M. 1997. Parallel evaluation strategies for functional logic languages. In International Conference on Logic Programming. MIT Press, 138152.CrossRefGoogle Scholar
Antoy, S., Echahed, R. and Hanus, M. 2000. A needed narrowing strategy. Journal of the ACM 47, 4 (July), 776822.CrossRefGoogle Scholar
Benton, P. 1992. Strictness analysis of lazy functional programs. Ph.D. thesis, University of Cambridge.Google Scholar
Charatonik, W. and Podelski, A. 1998. Co-definite set constraints. In Proceedings of the 9th International Conference on Rewriting Techniques and Applications, RTA'98, Nipkow, T., Ed. LNCS, vol. 1379. Springer-Verlag, 211225.CrossRefGoogle Scholar
Comini, M., Gori, R. and Levi, G. 2000. Logic programs as specifications in the inductive verification of logic programs. In APPIA-GULP-PRODE 2000 (AGP'2000), García, L. and Meo, M., Eds. Universidad de La Habana, 2238.Google Scholar
Falaschi, M., Hicks, P. and Winsborough, W. H. 2000. Demand transformation analysis for concurrent constraint programs. J. Log. Program. 42, 3, 185215.CrossRefGoogle Scholar
Gallagher, J. P. and Peralta, J. C. 2000. Using regular approximations for generalisation during partial evaluation. In Proceedings of the 2000 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'2000), Boston, Mass., Lawall, J., Ed. ACM Press, 4451.Google Scholar
Genius, D. 1996. Sequential implementation of parallel narrowing. In Proc. JICSLP'96 Workshop on Multi-Paradigm Logic Programming. 95104.Google Scholar
Hanus, M. 1994. The integration of functions into logic programming: from theory to practice. Journal of Logic Programming 19&20, 583628.CrossRefGoogle Scholar
Hanus, M., Antoy, S., Kuchen, H., López-Fraguas, F. J., Lux, W., Moreno-Navarro, J. J. and Steiner, F. 2003. Curry: An Integrated Functional Logic Language, 0.8 ed. Editor: Hanus, Michael.Google Scholar
Jacobs, D. and Langen, A. 1992. Static analysis of logic programs for independent and-parallelism. Journal of Logic Programming 13, 2&3, 291314.CrossRefGoogle Scholar
Jensen, T. 1994. Abstract interpretation over algebraic datatypes. In 4th. International Conference on Computer Languages. IEEE Press.Google Scholar
Loogen, R., Lopez Fraguas, F. and Rodríguez-Artalejo, M. 1987. A demand driven computation strategy for lazy narrowing. In Third International Conference on Functional Programming Languages and Computer Architecture, Kahn, G., Ed. Vol. 274. Springer, Portland, Oregon, USA, September 14–16, 385407.Google Scholar
Mariño, J. 2002. Semantics and analysis of functional logic programs. Ph.D. thesis, Universidad Politécnica de Madrid, Facultad de Informática.Google Scholar
Mariño, J. and Herranz, Á. 1993. Specialized compilation of lazy functional logic programs. In Segundo Congreso Nacional de Programación Declarativa – 2nd Spanish Conference on Declarative Programming (ProDe'93). Instituto de Investigación en Inteligencia Artificial, CSIC, 39–55.Google Scholar
Mariño, J., Herranz, A. and Moreno-Navarro, J. J. 1993. Demandedness analysis with dependancy information for lazy narrowing. In Workshop on Global Compilation, International Logic Programming Symposium October 26–30, 1993, Vancouver, BC, Canada, Winsborough, W. and Michaylov, S., Eds. Association for Logic Programming and Simon Fraser University. Penn State University Technical Report.Google Scholar
Mariño, J. and Moreno-Navarro, J. J. 1992. Efficient compilation of lazy narrowing into Prolog. In Workshop on Logic on Program Synthesis and Transformation – LOPSTR'92, Manchester (UK). ISBN 3-540-19806-7, Clement, T. and Lau, K., Eds. Workshops in Computing. University of Manchester, Springer Verlag, 253270.Google Scholar
Mariño, J. and Moreno-Navarro, J. J. 1995. Magic set transforms for functional logic programs. In Workshop on Functional and Logic Programming, Baiersbronn-Schwarzenberg (Germany). University of Dortmund.Google Scholar
Mariño, J. and Moreno-Navarro, J. J. 2000. Using static analysis to compile non-sequential functional logic programs. In Practical Aspects of Declarative Programming (PADL 2000), Pontelli, E. and Costa, V. Santos, Eds. Lecture Notes in Computer Science, vol. 1753. Springer, 6380.Google Scholar
Mariño, J. and Rey, J. M. 1998. The implementation of Curry via its translation into Prolog. In 7th Workshop on Functional and Logic Programming (WFLP98), Kuchen, , Ed. Number 63 in Working Papers. Westfälische Wilhelms-Universität MŸnster.Google Scholar
Moreno-Navarro, J., Kuchen, H., Loogen, R. and Rodríguez-Artalejo, M. 1990. Lazy narrowing in a graph machine. In 2nd International Conference on Algebraic and Logic Programming, ALP'90, Nancy (France), Kirchner, H. and Wechler, W., Eds. Lecture Notes in Computer Science. CRIN (Centre de Recherche en Informatique de Nancy), Springer, 298317.CrossRefGoogle Scholar
Moreno-Navarro, J. and Rodríguez-Artalejo, M. 1992. Logic programming with functions and predicates: The language Babel. Journal of Logic Programming 12, 191223.CrossRefGoogle Scholar
Moreno-Navarro, J. J. 1994. Expressivity of functional logic languages and their implementation. In Joint Conference on Declarative Programming GULP-PRODE'94, Alpuente, R. B. M., Ed. GULP (Italian ALP Chapter), Universidad Politécnica Valencia, Servicio de publicaciones Universidad Politécnica de Valencia.Google Scholar
Moreno-Navarro, J. J. 1996. Extending constructive negation for partial functions in lazy functional logic languages. In Extensions of Logic Programming. LNAI, vol. 1050. Springer, 213228.CrossRefGoogle Scholar
Moreno-Navarro, J. J., Kuchen, H., Mariño, J., Winkler, S. and Hans, W. 1993. Efficient lazy narrowing using demandedness analysis. In 5th International Symposium on Programming Language Implementation and Logic Programming, PLILP'93. Lecture Notes in Computer Science, vol. 714. Springer, 167183.CrossRefGoogle Scholar
Muthukumar, K. and Hermenegildo, M. 1991. Combined determination of sharing and freeness of program variables through abstract interpretation. In Proceedings of the Eighth International Conference on Logic Programming, Furukawa, K., Ed. The MIT Press, Paris, France, 4963.Google Scholar
Mycroft, A. 1980. The theory and practice of transforming call-by-need into call-by-value. In Proc. International Symposium on Programming. Lecture Notes in Computer Science, vol. 83. Springer, 269281.CrossRefGoogle Scholar
Pacholski, L. and Podelski, A. 1997. Set constraints – a pearl in research on constraints. In Proceedings of the Third International Conference on Principles and Practice of Constraint Programming – CP97, Smolka, G., Ed. Springer LNCS, vol. 1330. Springer-Verlag, 549561.CrossRefGoogle Scholar
Ramos, J., Silva, J. and Vidal, G. 2005. Fast narrowing-driven partial evaluation for inductively sequential programs. In International Conference on Functional Programming, ICFP05, Pierce, B., Ed. ACM Press, 228239.Google Scholar
Rey, J. M. 2003. Demand analysis via the dynamic generation of finite domains. Available at http://babel.ls.fi.upm.es/publications.Google Scholar
Sekar, R. and Ramakrishnan, I. 1995. Fast strictness analysis based on demand propagation. Transactions on Programming Languages and Systems 17, 6, 896937. Extended version of a paper in POPL90.CrossRefGoogle Scholar
van Leeuwen, J., Ed. 1990. Handbook of Theoretical Computer Science. Vol. B: Formal Models and Semantics. Elsevier.Google Scholar
Wadler, P. 1987. Strictness analysis on non-flat domains by abstract interpretation over finite domains. In Abstract Interpretation of Declarative Languages, Abramsky, S. and Hankin, C., Eds. Ellis-Horwood, Chapter 12.Google Scholar
Wadler, P. and Hughes, R. 1993. Projections for strictness analysis. In 5th International Symposium on Programming Language Implementation and Logic Programming, PLILP'93. Lecture Notes in Computer Science, vol. 714. Springer, 184200.Google Scholar
Zartmann, F. 1997. Denotational abstract interpretation of functional logic programs. In Static Analysis: Proceedings of the Fourth International Symposium, Hentenryck, P. V., Ed. Lecture Notes in Computer Science, vol. 1302. Springer, 141156.CrossRefGoogle Scholar