Skip to main content
Log in

Compile-time analysis of nonlinear constraints in CLPR

  • Regular Papers
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

Solving nonlinear constraints over real numbers is a complex problem. Hence constraint logic programming languages like CLPR or Prolog III solve only linear constraints and delay nonlinear constraints until they become linear. This efficient implementation method has the disadvantage that sometimes computed answers are unsatisfiable or infinite loops occur due to the unsatisfiability of delayed nonlinear constraint These problems could be solved by using a more powerful constraint solver which can deal with nonlinear constraints like in RISC-CLP(Real). Since such powerful constraint solvers are not very efficient, we propose a compromise between these two extremes. We characterize a class of CLPR programs for which all delayed nonlinear constraints become linear at run time. Programs belonging to this class can be safely executed with the efficient CLPR method while the remaining programs need a more powerful constraint solver.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abramsky, S. and Hankin, C., eds.Abstract Interpretation of Declarative Languages, Ellis Horwood, 1987.

  2. Aiba, A., Sakai, K., Sato, Y., Hawley, D. J., and Hasegawa, R., “Constraint Logic Programming Language CAL,” inProc. Int. Conf. on Fifth Generation Computer Systems, pp. 263–276, 1988.

  3. Baker, N. and Søndergaard, H., “Definiteness Analysis Analysis for CLPR,”Technical Report, 92/25, University of Melbourne, 1992.

  4. Bruynooghe, M., “A Practical Framework for the Abstract Interpretation of Logic Programs,”Journal of Logic Programming, 10, pp. 91–124, 1991.

    Article  MATH  MathSciNet  Google Scholar 

  5. Colmerauer, A., “An Introduction to Prolog III,”Communications of the ACM, 33, 7, pp. 69–90, 1990.

    Article  Google Scholar 

  6. Cortesi, A., File, G., and Winsborough, W., “Prop Revisited: Propositional Formula as Abstract Domain for Groundness Analysis,” inProc. IEEE Symposium on Logic in Computer Science, pp. 322–327, 1991.

  7. Cousot, P. and Cousot, R., “Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction of Approximation of Fixpoints,” inProc. of the 4th ACM Symposium on Principles of Programming Languages, pp. 238–252, 1977.

  8. Debray, S. K., “Static Inference of Modes and Data Dependencies in Logic Programs,”ACM Transactions on Programming Languages and Systems, 11, 3, pp. 418–450. 1989.

    Article  Google Scholar 

  9. García de la Banda and Hermenegildo, M., “A Practical Approach to the Global Analysis of CLP Programs,” inProc. International Logic Programming Symposium, Vancouver, MIT Press, pp. 437–455, 1993.

  10. Hanus, M., “Parametric Order-Sorted Types in Logic Programming,” inProc. of the TAPSOFT ’91, Springer LNCS 494, pp. 181–200, 1991.

  11. Hanus, M., “On the Completeness of Residuation,” inProc. of the 1992 Joint International Conference and Symposium on Logic Programming, MIT Press, pp. 192–206, 1992.

  12. Hanus, M., “Analysis of Nonlinear Constraints in CLPR,” inProc. Tenth International Conference on Logic Programming, MIT Press, pp. 83–99, 1993.

  13. Heintze, N., Jaffar, J., Michaylov, S., Stuckey, P., and Yap, R.,The CLP R Programmer’s Manual, Version 1.1, IBM Thomas J. Watson Research Center, Yorktown Heights, 1991.

    Google Scholar 

  14. Hong, H., “Non-Linear Real Constraints in Constraint Logic Programming,” inProc. of the 3rd International Conference on Algebraic and Logic Programming, Springer LNCS 632, pp. 201–212, 1992.

  15. Jaffar, J. and Lassez, J.-L., “Constraint Logic Programming,” inProc. of the 14th ACM Symposium on Principles of Programming Languages, Munich, pp. 111–119, 1987.

  16. Jaffar, J., Michaylov, S., Stuckey, P. J., and Yap, R. H. C., “An Abstract Machine for CLPR,” inProc. SIGPLAN Conference on Programming Language Design and Implementation, SIGPLAN Notices, 27, 7, pp. 128–139. 1992.

  17. Jaffar, J., Michaylov, S., Stuckey, P.J., and Yap, R. H. C., “The CLPR Language and System,”ACM Transactions on Programming Languages and Systems, 14,3, pp. 339–395, 1992.

    Article  Google Scholar 

  18. Jaffar, J., Michaylov, S., and Yap, R. H. C., “A Methodology for Managing Hard Constraints in CLP Systems,” inProc. ACM SIGPLAN’91 Conference on Programming Language Design and Implementation, SIGPLAN Notices, 26, 6, pp. 306–316, 1991.

  19. Jørgensen, N., Marriott, K., and Michaylov, S., “Some Global Compile-Time Optimizations for CLPR,”, inProc. 1991 International Logic Programming Symposium, MIT Press, pp. 420–434, 1991.

  20. Le Charlier, B., Musumbu, K., and Van Hentenryck, P., “A Generic Abstract Interpretation Algorithm and Its Complexity Analysis,” inProc. International Conference on Logic Programming, MIT Press, pp. 64–78, 1991.

  21. Marriott, K. and Søndergaard, H., “Analysis of Constraint Logic Programs,” inProc. of the 1990 North American Conference on Logic Programming, MIT Press, pp.531–547, 1990.

  22. Marriott, K., Søndergaard, H., and Dart, P., “A Characterization of Non-Floundering Logic Programs,” inProc. of the 1990 North American Conference on Logic Programming, MIT Press, pp. 661–680, 1990.

  23. Mellish, C. S., “Some Global Optimizations for a Prolog Compiler,”Journal of Logic Programming, 1, pp. 43–66, 1985.

    Article  Google Scholar 

  24. Nilsson, U., “Towards a Framework for the Abstract Interpretation of Logic Programs,” inProc. of the Workshop on Programming Language Implementation and Logic Programming, Springer LNCS 348, Orléans, pp. 68–82, 1988.

  25. Nilsson, U., “Systematic Semantic Approximations of Logic Programs,” inProc. of the 2nd Int. Workshop on Programming Language Implementation and Logic Programming, Springer LNCS 456, pp. 293–306, 1990.

  26. Pfenning, F., ed.,Types in Logic Programming, MIT Press, 1992.

  27. Van Hentenryck, P.,Constraint Satisfaction in Logic Programming, MIT Press, 1989.

Download references

Author information

Authors and Affiliations

Authors

Additional information

This paper is an extended and revised version of Ref. 12). The research described in this paper was made during the author’s stay at the Max-planck-Institut für Informatik in Saarbrücken, Germany. It was supported in part by the German Ministry for Research and Technology (BMFT) under grant ITS 9103 and by the ESPRIT Basic Research Working Group 6028 (Construction of Computational Logics). The responsibility for the contents of this publication lies with the author.

Michael Hanus, Prof. Dr.: He received his degrees from the Universities of Dortmund and Saarbrücken. He wrote his dissertation on type systems for logic languages and his habilitation on the integration of functional and logic programming languages. From 1984 to 1994, he held research positions at the University of Dortmund and the Max-Planck-Institut für Informatik in Saarbrücken. Since 1995, he is Professor for Computer Science at the RWTH Aachen. His research interests are in the field of declarative languages. In particular, he is interested in the implementation of logic languages, extensions to logic languages, like types and constraints, the integration of functional and logic languages, and program analysis techniques for logic, functional logic and constraint logic languages.

About this article

Cite this article

Hanus, M. Compile-time analysis of nonlinear constraints in CLPR . New Gener Comput 13, 155–186 (1995). https://doi.org/10.1007/BF03038312

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03038312

Keywords

Navigation