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.
Supplemental Material
Available for Download
Online appendix to typing linear constraints on article 21.
- Apt, K. R. 1997. From Logic Programming to Prolog. Prentice-Hall, Inc., Upper Saddle River, NJ. Google Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- Borrelli, F., Bemporad, A., and Morari, M. 2003. Geometric algorithm for multiparametric linear programming. J. Optim. Theory Appl. 118, 3, 515--540.Google Scholar
Digital Library
- Brown, C. W. 2003. QEPCAD B: A program for computing with semi-algebraic sets using CADs. ACM SIGSAM Bull. 37, 4, 97--108. Google Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- Collins, G. E. and Hong, H. 1991. Partial cylindrical algebraic decomposition for quantifier elimination. J. Symbol. Comput. 12, 3, 299--328. Google Scholar
Digital Library
- Davenport, J. H. and Heintz, J. 1988. Real quantifier elimination is doubly exponential. J. Symbol Comput. 5, 1-2, 29--35. Google Scholar
Digital Library
- Dolzmann, A. and Sturm, T. 1997. REDLOG: Computer algebra meets computer logic. ACM SIGSAM Bull. 31, 2, 2--9. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- Etalle, S., Bossi, A., and Cocco, N. 1999. Termination of well-moded programs. J. Logic Program. 38, 2, 243--257.Google Scholar
Cross Ref
- Gal, T. 1995. Postoptimal Analyses, Parametric Programming, and Related Topics 2nd Ed. de Gruyter and Co., Berlin, Germany.Google Scholar
- Gal, T. and Nedoma, J. 1972. Multiparametric linear programming. Manage. Sci. 18, 406--422.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- Greenberg, H. J. 1996. Consistency, redundancy, and implied equalities in linear systems. Ann. Math. Artif. Intell. 17, 1-2, 37--83. Google Scholar
Digital Library
- Hanus, M. 1995. Compile-time analysis of nonlinear constraints in CLP(R). New Gen. Comput. 13, 2, 155--186.Google Scholar
Cross Ref
- Holzbaur, C. 1995. OFAI clp(q,r) manual, edition 1.3.3. Tech. rep. TR-95-09, Austrian Research Institute.Google Scholar
- Howe, J. M. and King, A. 2000. Abstracting numeric constraints with boolean functions. Inform. Process. Lett. 75, 1-2, 17--23. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Jaffar, J. and Maher, M. 1994. Constraint logic programming: A survey. J. Logic Program. 19,20, 503--581.Google Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Khachiyan, L. 1979. A polynomial algorithm in linear programming. Soviet Math. 20, 191--194.Google Scholar
- 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 Scholar
- Lassez, J.-L. and McAllon, K. 1992. A canonical form for generalized linear constraints. J. Symbol. Comput. 13, 1, 1--24. Google Scholar
Digital Library
- Le Verge, H. 1992. A note on Chernikova's algorithm. Tech. rep. 635, IRISA, Campus Universitaire de Beaulieu, Rennes, France.Google Scholar
- Loechner, V. 2010. Polylib: A library for manipulating parameterized polyhedra. http://icps.u-strasbg.fr/polylib, Version 5.22.5.Google Scholar
- Loechner, V. and Wilde, D. K. 1997. Parameterized polyhedra and their vertices. Int. J. Paral. Prog. 25, 525--549. Google Scholar
Digital Library
- Marriott, K. and Stuckey, P. J. 1998. Programming with Constraints: An Introduction. MIT Press, Cambridge, MA.Google Scholar
Cross Ref
- Mesnard, F. and Ruggieri, S. 2003. On proving left-termination of constraint logic programs. ACM Trans. Comput. Logic 4, 2, 207--259. Google Scholar
Digital Library
- 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 Scholar
- Murty, K. G. 1983. Linear Programming. John Wiley & Sons, New York, NJ.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Schechter, M. 1987. Polyhedral functions and multiparametric linear programming. J. Optim. Theory Appl. 53, 2, 269--280. Google Scholar
Digital Library
- Schrijver, A. 1986. Theory of Linear and Integer Programming. John Wiley & Sons, New York, NJ. Google Scholar
Digital Library
- Shoenfield, J. 1967. Mathematical Logic. Addison-Wesley, Reading, MA.Google Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- Strzebonski, A. 2000. Solving systems of strict polynomial inequalities. J. Symbol. Comput. 29, 3, 471--480. Google Scholar
Digital Library
- Stuckey, P. J. 1991. Incremental linear constraint solving and implicit equalities. ORSA J. Comput. 3, 269--274.Google Scholar
Cross Ref
- Van Den Vries, L. 1988. Alfred Tarski's elimination theory for closed fields. J. Symbol. Logic 53, 1, 7--19.Google Scholar
Cross Ref
- Wilde, D. K. 1993. A library for doing polyhedral operations. Tech. rep. PI 785, IRISA, Campus Universitaire de Beaulieu, Rennes, France.Google Scholar
Index Terms
Typing linear constraints
Recommendations
Typing Linear Constraints for Moding CLP(${\cal R}$) Programs
SAS '08: Proceedings of the 15th international symposium on Static AnalysisWe present a type system for linear constraints over reals and its use in mode analysis of CLP programs. The type system is designed to reason about the properties of definiteness, lower and upper bounds of variables of a linear constraint. Two proof ...
Typing constraint logic programs
We present a prescriptive type system with parametric polymorphism and subtyping for constraint logic programs. The aim of this type system is to detect programming errors statically. It introduces a type discipline for constraint logic programs and ...
Variable ranges in linear constraints
SAC '10: Proceedings of the 2010 ACM Symposium on Applied ComputingWe introduce an extension of linear constraints, called linear- range constraints, which allows for (meta-)reasoning about the approximation width of variables. Semantics for linear- range constraints is provided in terms of parameterized linear ...






Comments