Abstract
We introduce an abstract domain consisting of atomic formulas constrained by linear arithmetic constraints (or convex hulls). This domain is used in an algorithm for specialization of constraint logic programs. The algorithm incorporates in a single phase both top-down goal directed propagation and bottom-up answer propagation, and uses a widening on the convex hull domain to ensure termination. We give examples to show the precision gained by this approach over other methods in the literature for specializing constraint logic programs. The specialization method can also be used for ordinary logic programs containing arithmetic, as well as constraint logic programs. Assignments, inequalities and equalities with arithmetic expressions can be interpreted as constraints during specialization, thus increasing the amount of specialization that can be achieved.
Supported in part by CONACYT Project I39201-A
Partially supported by European Framework 5 Project ASAP (IST-2001-38059)
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Krysztof R. Apt and Ernst-Rüdiger Olderog. Verification of Sequential and Concurrent Programs. Springer-Verlag, 1991.
F. Benoy and A. King. Inferring argument size relations in CLP(R). In Proceedings of the 6th International Workshop on Logic Program Synthesis and Transformation, pages 204–223, Sweden, 1996. Springer-Verlag, LNCS 1207.
Edmund M. Clarke, Orna Grumberg, and Doron Peled. Model Checking. The MIT Press, 2000.
P. Cousot and N. Halbwachs. Automatic discovery of linear restraints among variables of a program. In Proceedings of the Conference Record of the 5th ACM Symposium on Principles of Programming Languages, pages 84–97, Albuquerque, New Mexico, 1978. Also in “http://www.di.ens.fr/~cousot/COUSOTpapers/POPL78.shtml”.
G. Delzanno and A. Podelski. Model Checking in CLP. In W. R. Cleaveland, editor, 5th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 223–239. Springer-Verlag, LNCS 1579, 1999.
Fabio Fioravanti, Alberto Pettorossi, and Maurizio Proietti. Automated strategies for specialising constraint logic programs. In Kung-Kiu Lau, editor, 10th International Workshop on Logic-based Program Synthesis and Transformation, pages 125–146. Springer-Verlag, LNCS 2042, 2000.
Fabio Fioravanti, Alberto Pettorossi, and Maurizio Proietti. Verifying CTL properties of infinite state systems by specializing constraint logic programs. Technical Report DSSE-TR-2001-3, Department of Electronics and Computer Science, University of Southampton, 2001. Proceedings of the Second International Workshop on Verification and Computational Logic (VCL’01).
J. Gallagher. Specialisation of logic programs: A tutorial. In Proceedings PEPM’93, ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 88–98, Copenhagen, June 1993. ACM Press.
J. Gallagher, M. Codish, and E.Y. Shapiro. Specialisation of Prolog and FCP programs using abstract interpretation. New Generation Computing, 6:159–186, 1988.
J. Gallagher and D.A. de Waal. Deletion of redundant unary type predicates from logic programs. In K.K. Lau and T. Clement, editors, Logic Program Synthesis and Transformation, Workshops in Computing, pages 151–167. Springer-Verlag, 1993.
John P. Gallagher and L. Lafave. Regular approximation of computation paths in logic and functional languages. In O. Danvy, R. Gluck, and P. Thiemman, editors, Partial Evaluation, pages 115–136. Springer-Verlag, LNCS 1110, 1996.
John P. Gallagher and Julio C. Peralta. Regular tree languages as an abstract domain in program specialisation. Higher-Order and Symbolic Computation, 14(2–3):143–172, 2001.
J.M. Howe and A. King. Specialising finite domain programs using polyhedra. In A. Bossi, editor, Logic-Based Program Synthesis and Transformation (LOPSTR’99), volume 1817 of Springer-Verlag Lecture Notes in Computer Science, pages 118–135, April 2000.
Joxan Jaffar and Michael J. Maher. Constraint logic programming: A survey. The Journal of Logic Programming, 19(20):503–581, 1994.
N. Jones, C.K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Software Generation. Prentice Hall, 1993.
Neil D. Jones. Combining abstract interpretation and partial evaluation. In P. Van Hentenryck, editor, Symposium on Static Analysis (SAS’97), volume 1302 of Springer-Verlag Lecture Notes in Computer Science, pages 396–405, 1997.
M. Leuschel. Program specialisation and abstract interpretation reconciled. In Joxan Jaffar, editor, Proceedings of the Joint International Conference and Symposium on Logic Programming JICSLP’98, pages 220–234, Manchester, UK, June 1998. MIT Press.
M. Leuschel and S. Gruner. Abstract partial deduction using regular types and its application to model checking. In A. Pettorossi, editor, (Pre)Proceedings of LOPSTR-2001 11th International Workshop on Logic-based Program Synthesis and Transformation (LOPSTR-2001), Paphos, Cyprus, December 2001.
M. Leuschel and T. Massart. Infinite state model checking by abstract interpretation and program specialisation. In Annalisa Bossi, editor, Logic-Based Program Synthesis and Transformation, pages 62–81. Springer Verlag, LNCS 1817, 1999.
J.W. Lloyd and J.C. Shepherdson. Partial Evaluation in Logic Programming. Journal of Logic Programming, 11(3 & 4):217–242, 1991.
K. Marriott and P. Stuckey. The 3 R’s of optimizing constraint logic programs: Refinement, Removal and Reordering. In Proceedings of the Twentieth Symposium on Principles of Programming Languages, pages 334–344, Charleston, South Carolina, 1993. ACM Press.
Torben Æ. Mogensen. Partially static structures in a self-applicable partial evaluator. In D. Bjørner, A.P. Ershov, and N.D. Jones, editors, Partial Evaluation and Mixed Computation, pages 325–347. North-Holland, 1988.
Julio C. Peralta and John P. Gallagher. Imperative program specialisation: An approach using CLP. In Annalisa Bossi, editor, Logic-Based Program Synthesis and Transformation, pages 102–117. Springer Verlag, LNCS 1817, 1999.
G. Puebla, M. Hermenegildo, and J. P. Gallagher. An integration of partial evaluation in a generic abstract interpretation framework. In Olivier Danvy, editor, Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’99), Technical report BRICS-NS-99-1, University of Aarhus, pages 75–84, San Antonio, Texas, January 1999.
J. C. Reynolds. Transformational systems and the algebraic structure of atomic formulas. Machine Intelligence, pages 135–151, 1970.
Huseyin Sağlam and John P. Gallagher. Constrained regular approximations of logic programs. In N. Fuchs, editor, LOPSTR’97, pages 282–299. Springer-Verlag, LNCS 1463, 1997.
Danny De Schreye, Robert Glück, Jesper Jørgensen, Michael Leuschel, Bern Martens, and Morten Heine Sørensen. Conjunctive partial deduction: Foundations, control, algorithms, and experiments. The Journal of Logic Programming, 41(2–3):231–277, 1999. Erratum appeared in JLP 43(3): 265(2000).
U. A. Shankar. An Introduction to Assertional Reasoning for Concurrent systems. ACM Computing Surveys, 25(3):225–262, 1993.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Peralta, J.C., Gallagher, J.P. (2003). Convex Hull Abstractions in Specialization of CLP Programs. In: Leuschel, M. (eds) Logic Based Program Synthesis and Transformation. LOPSTR 2002. Lecture Notes in Computer Science, vol 2664. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45013-0_8
Download citation
DOI: https://doi.org/10.1007/3-540-45013-0_8
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40438-5
Online ISBN: 978-3-540-45013-9
eBook Packages: Springer Book Archive