skip to main content
research-article
Free Access

Typing linear constraints

Published:13 August 2010Publication History
Skip Abstract Section

Abstract

We present a type system for linear constraints over the reals intended for reasoning about the input-output directionality of variables. Types model the properties of definiteness, range width or approximation, lower and upper bounds of variables in a linear constraint. Several proof procedures are presented for inferring the type of a variable and for checking validity of type assertions. We rely on theory and tools for linear programming problems, linear algebra, parameterized polyhedra and negative constraints. An application of the type system is proposed in the context of the static analysis of constraint logic programs. Type assertions are at the basis of the extension of well-moding from pure logic programming. The proof procedures (both for type assertion validity and for well-moding) are implemented and their computational complexity is discussed. We report experimental results demonstrating the efficiency in practice of the proposed approach.

Skip Supplemental Material Section

Supplemental Material

References

  1. Apt, K. R. 1997. From Logic Programming to Prolog. Prentice-Hall, Inc., Upper Saddle River, NJ. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Bagnara, R., Hill, P. M., Ricci, E., and Zaffanella, E. 2005. Not necessarily closed convex polyhedra and the double description method. Formal Aspects Comput. 17, 2, 222--257. Google ScholarGoogle ScholarCross RefCross Ref
  3. Bagnara, R., Hill, P. M., and Zaffanella, E. 2008. The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems. Sci. Comput. Program. 72, 1-2, 3--21. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Bagnara, R., Hill, P. M., and Zaffanella, E. 2009. Applications of polyhedral computations to the analysis and verification of hardware and software systems. Theor. Comput. Sci. 410, 46, 4672--4691. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Baker, N. and Søndegaard, H. 1993. Definiteness analysis for CLP(R). In Proceedings of the 16th Australian Computer Science Conference. G. Gupta, G. Mohay, and R. Topor, Eds. Australian Computer Science Communications, vol. 15. 321--332.Google ScholarGoogle Scholar
  6. Basu, S., Pollack, R., and Roy, M.-F. 1996. On the combinatorial and algebraic complexity of quantifier elimination. J. ACM 43, 6, 1002--1045. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Becket, R., Garcia de la Banda, M., Marriott, K., Somogyi, Z., Stuckey, P. J., and Wallace, M. 2006. Adding constraint solving to mercury. In Proceedings of the 8th International Symposium on Practical Aspects of Declarative Languages. P. Van Hentenryck, Ed. Lecture Notes in Computer Science, vol. 3819. Springer, 118--133. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Berkelaar, M., Eikland, K., and Notebaert, P. 2010. lp_solve: Open source (mixed-integer) linear programming system. http://lpsolve.sourceforge.net, Version 5.5.0.15.Google ScholarGoogle Scholar
  9. Borgwardt, K. H. 2007. Average-Case analysis of the double description method and the beneath-beyond algorithm. Discrete Comput. Geom. 37, 2, 175--204. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Borrelli, F., Bemporad, A., and Morari, M. 2003. Geometric algorithm for multiparametric linear programming. J. Optim. Theory Appl. 118, 3, 515--540.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Brown, C. W. 2003. QEPCAD B: A program for computing with semi-algebraic sets using CADs. ACM SIGSAM Bull. 37, 4, 97--108. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Chernikova, N. V. 1965. An algorithm for finding the general formula for non-negative solutions of systems of linear inequalities. U.S.S.R. Comput. Math. Math. Phys. 5, 228--233.Google ScholarGoogle ScholarCross RefCross Ref
  13. Codish, M., Genaim, S., Søndegaard, H., and Stuckey, P. 2001. Higher-Precision groundness analysis. In Proceedings of the 17th International Conference on Logic Programming. P. Codognet, Ed. Lecture Notes in Computer Science, vol. 2237. Springer, 135--149. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Collins, G. E. and Hong, H. 1991. Partial cylindrical algebraic decomposition for quantifier elimination. J. Symbol. Comput. 12, 3, 299--328. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Davenport, J. H. and Heintz, J. 1988. Real quantifier elimination is doubly exponential. J. Symbol Comput. 5, 1-2, 29--35. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Dolzmann, A. and Sturm, T. 1997. REDLOG: Computer algebra meets computer logic. ACM SIGSAM Bull. 31, 2, 2--9. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Dolzmann, A., Sturm, T., and Weispfenning, V. 1998a. A new approach for automatic theorem proving in real geometry. J. Autom. Reason. 21, 3, 357--380. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Dolzmann, A., Sturm, T., and Weispfenning, V. 1998b. Real quantifier elimination in practice. In Algorithmic Algebra and Number Theory, B. H. Matzat, G.-M. Greuel, and G. Hiss, Eds. Springer, 221--248.Google ScholarGoogle Scholar
  19. Etalle, S., Bossi, A., and Cocco, N. 1999. Termination of well-moded programs. J. Logic Program. 38, 2, 243--257.Google ScholarGoogle ScholarCross RefCross Ref
  20. Gal, T. 1995. Postoptimal Analyses, Parametric Programming, and Related Topics 2nd Ed. de Gruyter and Co., Berlin, Germany.Google ScholarGoogle Scholar
  21. Gal, T. and Nedoma, J. 1972. Multiparametric linear programming. Manage. Sci. 18, 406--422.Google ScholarGoogle Scholar
  22. Garcia de la Banda, M., Hermenegildo, M., Bruynooghe, M., Dumortier, V., Janssens, G., and Simoens, W. 1996. Global analysis of constraint logic programs. ACM Trans. Program. Lang. Syst. 18, 5, 564--614. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Genaim, S., Codish, M., and Howe, J. M. 2001. Worst-Case groundness analysis using definite boolean functions. Theory Pract. Logic Program. 1, 5, 611--615. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Goldman, A. J. 1956. Resolution and separation theorems for polyhedral convex sets. In Linear Inequalities and Related Systems, H. W. Kuhn and A. W. Tucker, Eds. Princeton University Press, Princeton, NJ.Google ScholarGoogle Scholar
  25. Greenberg, H. J. 1996. Consistency, redundancy, and implied equalities in linear systems. Ann. Math. Artif. Intell. 17, 1-2, 37--83. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Hanus, M. 1995. Compile-time analysis of nonlinear constraints in CLP(R). New Gen. Comput. 13, 2, 155--186.Google ScholarGoogle ScholarCross RefCross Ref
  27. Holzbaur, C. 1995. OFAI clp(q,r) manual, edition 1.3.3. Tech. rep. TR-95-09, Austrian Research Institute.Google ScholarGoogle Scholar
  28. Howe, J. M. and King, A. 2000. Abstracting numeric constraints with boolean functions. Inform. Process. Lett. 75, 1-2, 17--23. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Huynh, T., Joskowicz, L., Lassez, C., and Lassez, J.-L. 1991. Practical tools for reasoning about linear constraints. Fundam. Inf. 15, 3-4, 357--380. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Jaffar, J. and Maher, M. 1994. Constraint logic programming: A survey. J. Logic Program. 19,20, 503--581.Google ScholarGoogle Scholar
  31. Jaffar, J., Maher, M., Marriott, K., and Stuckey, P. J. 1998. The semantics of constraint logic programs. J. Logic Program. 37, 1-3, 1--46.Google ScholarGoogle ScholarCross RefCross Ref
  32. Jaffar, J., Michaylov, S., Stuckey, P., and Yap, R. 1992. The CLP(R) language and system. ACM Trans. Program. Lang. Syst. 14, 3, 339--395. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Keerthi, S. S. and Sridharan, K. 1990. Solution of parameterized linear inequalities by Fourier elimination and its applications. J. Optim. Theory Appl. 65, 1, 161--169. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Kelly, A. D., Marriott, K., Macdonald, A., Stuckey, P. J., and Yap, R. 1998. Optimizing compilation of CLP(R). ACM Trans. Program. Lang. Syst. 20, 6, 1223--1250. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Khachiyan, L. 1979. A polynomial algorithm in linear programming. Soviet Math. 20, 191--194.Google ScholarGoogle Scholar
  36. Lagoon, V., Mesnard, F., and Stuckey, P. J. 2003. Termination analysis with types is more accurate. In Proceedings of the 19th International Conference on Logic Programming. c. Palamidessi Ed. Lecture Notes in Computer Science. Springer, 254--268.Google ScholarGoogle Scholar
  37. Lassez, J.-L. and McAllon, K. 1992. A canonical form for generalized linear constraints. J. Symbol. Comput. 13, 1, 1--24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Le Verge, H. 1992. A note on Chernikova's algorithm. Tech. rep. 635, IRISA, Campus Universitaire de Beaulieu, Rennes, France.Google ScholarGoogle Scholar
  39. Loechner, V. 2010. Polylib: A library for manipulating parameterized polyhedra. http://icps.u-strasbg.fr/polylib, Version 5.22.5.Google ScholarGoogle Scholar
  40. Loechner, V. and Wilde, D. K. 1997. Parameterized polyhedra and their vertices. Int. J. Paral. Prog. 25, 525--549. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Marriott, K. and Stuckey, P. J. 1998. Programming with Constraints: An Introduction. MIT Press, Cambridge, MA.Google ScholarGoogle ScholarCross RefCross Ref
  42. Mesnard, F. and Ruggieri, S. 2003. On proving left-termination of constraint logic programs. ACM Trans. Comput. Logic 4, 2, 207--259. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Motzkin, T., Raiffa, H., Thompson, G., and Thrall, R. 1953. The double description method. In Contributions to the Theory of Games -- Vol. II, H. Kuhn and A. Tucker, Eds. Annals of Mathematics Studies, vol. 28. Princeton University Press, Princeton, NJ. 51--73.Google ScholarGoogle Scholar
  44. Murty, K. G. 1983. Linear Programming. John Wiley & Sons, New York, NJ.Google ScholarGoogle Scholar
  45. Refalo, P. 1998. Approaches to the incremental detection of implicit equalities with the revised simplex method. In Principles of Declarative Programming, C. Palamidessi, H. Glaser, and K. Meinke, Eds. Lecture Notes in Computer Science, vol. 1490. Springer, 481--497. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Renegar, J. 1992. On the computational complexity and geometry of the first-order theory of the reals. J. Symbol. Comput. 13, 3, 255--352.Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Ruggieri, S. and Mesnard, F. 2008. Typing linear constraints for moding CLP(R) programs. In Proceedings of the 15th Static Analysis Symposium. M. Alpuente and G. Vidal, Eds. Lecture Notes in Computer Science, vol. 5079. Springer, 128--143. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Schechter, M. 1987. Polyhedral functions and multiparametric linear programming. J. Optim. Theory Appl. 53, 2, 269--280. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Schrijver, A. 1986. Theory of Linear and Integer Programming. John Wiley & Sons, New York, NJ. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Shoenfield, J. 1967. Mathematical Logic. Addison-Wesley, Reading, MA.Google ScholarGoogle Scholar
  51. Somogyi, Z., Henderson, F., and Conway, T. 1996. The execution algorithm of Mercury, an efficient purely declarative logic programming language. J. Logic Program. 29, 1--3, 17--64.Google ScholarGoogle ScholarCross RefCross Ref
  52. Spoto, F., Mesnard, F., and Payet, E. 2010. A termination analyser for Java bytecode based on path-length. ACM Trans. Program. Lang. Syst. 32, 3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. Strzebonski, A. 2000. Solving systems of strict polynomial inequalities. J. Symbol. Comput. 29, 3, 471--480. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. Stuckey, P. J. 1991. Incremental linear constraint solving and implicit equalities. ORSA J. Comput. 3, 269--274.Google ScholarGoogle ScholarCross RefCross Ref
  55. Van Den Vries, L. 1988. Alfred Tarski's elimination theory for closed fields. J. Symbol. Logic 53, 1, 7--19.Google ScholarGoogle ScholarCross RefCross Ref
  56. Wilde, D. K. 1993. A library for doing polyhedral operations. Tech. rep. PI 785, IRISA, Campus Universitaire de Beaulieu, Rennes, France.Google ScholarGoogle Scholar

Index Terms

  1. Typing linear constraints

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM Transactions on Programming Languages and Systems
        ACM Transactions on Programming Languages and Systems  Volume 32, Issue 6
        August 2010
        215 pages
        ISSN:0164-0925
        EISSN:1558-4593
        DOI:10.1145/1749608
        Issue’s Table of Contents

        Copyright © 2010 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 13 August 2010
        • Accepted: 1 December 2009
        • Revised: 1 August 2009
        • Received: 1 November 2008
        Published in toplas Volume 32, Issue 6

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!