Skip to main content

A Compiler Generator for Constraint Logic Programs

  • Conference paper
Perspectives of System Informatics (PSI 2003)

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

Abstract

The cogen approach to program specialisation, writing a compiler generator instead of a specialiser, has been used with considerable success. This paper demonstrates that the cogen approach is also applicable to the specialisation of constraint logic programs and leads to effective specialisers. We present the basic specialisation technique for CLP(Q) programs and show how we can handle non-declarative features as well. We present an implemented system along with experimental results.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (May 1994) (DIKU report 94/19)

    Google Scholar 

  2. Beckman, L., Haraldson, A., Oskarsson, Ö., Sandewall, E.: A partial evaluator and its use as a programming tool. Artificial Intelligence 7, 319–357 (1976)

    Article  MATH  Google Scholar 

  3. Birkedal, L., Welinder, M.: Hand-writing program generator generators. In: Hermenegildo, M., Penjam, J. (eds.) PLILP 1994. LNCS, vol. 844, pp. 198–214. Springer, Heidelberg (1994)

    Google Scholar 

  4. Fioravanti, F., Pettorossi, A., Proietti, M.: Automated strategies for specializing constraint logic programs. In: Lau, K.-K. (ed.) LOPSTR 2000. LNCS, vol. 2042, pp. 125–146. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  5. Fioravanti, F., Pettorossi, A., Proietti, M.: Verifying ctl properties of infinite-state systems by specializing constraint logic programs. In: Proceedings of VCL 2001, Florence, Italy (September 2001)

    Google Scholar 

  6. Holst, C.K., Launchbury, J.: Handwriting cogen to avoid problems with static typing. In: Draft Proceedings, Fourth Annual Glasgow Workshop on Functional Programming, Skye, Scotland, pp. 210–218. Glasgow University (1991)

    Google Scholar 

  7. Holst, C.K.: Syntactic currying: yet another approach to partial evaluation. Technical report, DIKU, Department of Computer Science, University of Copenhagen (1989)

    Google Scholar 

  8. Jaffar, J., Michaylov, S., Yap, R.H.C.: A methodology for managing hard constraints in CLP systems. In: Proceedings of the ACM SIGPLAN 1991 Conference on Programming Language Design and Implementation, Toronto, Ontario, Canada, June 1991, vol. 26, pp. 306–316 (1991)

    Google Scholar 

  9. Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)

    MATH  Google Scholar 

  10. Leuschel, M.: The ecce partial deduction system and the dppd library of benchmarks. Obtainable via (1996-2002), http://www.ecs.soton.ac.uk/~mal

  11. Leuschel, M., Jørgensen, J., Vanhoof, W., Bruynooghe, M.: Offline specialisation in Prolog using a hand-written compiler generator. In: Theory and Practice of Logic Programming, p. 52 (2003) (to appear)

    Google Scholar 

  12. Marriott, K., Stuckey, P.: The 3 r’s of optimizing constraint logic programs: Refinement, removal, and reordering. In: Proceedings of POPL 1993, pp. 334–344. ACM Press, New York (1993)

    Chapter  Google Scholar 

  13. Mesnard, F., Ruggieri, S.: On proving left termination of constraint logic programs. ACM Transactions on Computational Logic (2003) (to appear)

    Google Scholar 

  14. Peralta, J.C., Gallagher, J.P.: Convex hull abstractions in specialization of clp programs. In: Leuschel, M. (ed.) LOPSTR 2002. LNCS, vol. 2664. Springer, Heidelberg (2002)

    Google Scholar 

  15. Peralta, J.C.: Analysis and Specialisation of Imperative Programs: An approach using CLP. PhD thesis, Department of Computer Science, University of Bristol (2000)

    Google Scholar 

  16. Prestwich, S.: The PADDY partial deduction system. Technical Report ECRC- 92-6, ECRC, Munich, Germany (1992)

    Google Scholar 

  17. Romanenko, S.A.: A compiler generator produced by a self-applicable specializer can have a surprisingly natural and understandable structure. In: Bjørner, D., Ershov, A.P., Jones, N.D. (eds.) Partial Evaluation and Mixed Computation, pp. 445–463. North-Holland, Amsterdam (1988)

    Google Scholar 

  18. Sahlin, D.: Mixtus: An automatic partial evaluator for full Prolog. New Generation Computing 12(1), 7–51 (1993)

    Article  MATH  Google Scholar 

  19. Smith, D.A.: Partial evaluation of pattern matching in constraint logic programming languages. In: Jones, N.D., Hudak, P. (eds.) ACM Symposium on Partial Evaluation and Semantics-Based Program Manipulation. Sigplan Notices 26(9), pp. 62–71. ACM Press, New York (1991)

    Google Scholar 

  20. Smith, D.A., Hickey, T.: Partial evaluation of a CLP language. In: Debray, S.K., Hermenegildo, M. (eds.) Proceedings of the North American Conference on Logic Programming, pp. 119–138. MIT Press, Cambridge (1990)

    Google Scholar 

  21. Tao, Y., Grosky, W., Liu, C.: An automatic partial deduction system for constraint logic programs. In: 9th International Conference on Tools with Artificial Intelligence (ICTAI 1997), Newport Beach, CA, USA, November 1997, pp. 149–157. IEEE Computer Society, Los Alamitos (1997)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Craig, SJ., Leuschel, M. (2004). A Compiler Generator for Constraint Logic Programs. In: Broy, M., Zamulin, A.V. (eds) Perspectives of System Informatics. PSI 2003. Lecture Notes in Computer Science, vol 2890. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-39866-0_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-39866-0_17

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20813-6

  • Online ISBN: 978-3-540-39866-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics