Abstract
This paper proposes a tool to support reasoning about (partial) correctness of constraint logic programs. The tool infers a specification that approximates the semantics of a given program. The semantics of interest is an operational “call-success” semantics. The main intended application is program debugging. We consider a restricted class of specifications, which are regular types of constrained atoms.
Our type inference approach is based on bottom-up abstract interpretation, which is used to approximate the declarative semantics (c-semantics). By using “magic transformations” we can describe the call-success semantics of a program by the declarative semantics of another program. We are focused on CLP over finite domains. Our prototype program analyzer works for the programming language CHIP.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This work has been supported by the ESPRIT 4 Project 22532 DiSCiPl.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
K.R. Apt and R. Ben-Eliyahu. Meta-variables in Logic Programming, or in Praise of Ambivalent SyntaxFundamenta Informaticae28(1–2):22–36, 1996.
K.R. Apt and E. Marchiori. Reasoning about Prolog programs: from modes through types to assertionsFormal Aspects of Computing, 6(6A):743–7641994.
A. Bossi and N. Cocco. Verifying correctness of logic programs. In Proceedings of the International Joint Conference on Theory and Practice of Software Development TAPSOFT’ 89, vol. 2, pages 96–110. Springer-Verlag, 1989. Lecture Notes in Computer Science.
F. Benhamou and W. Older. Applying Interval Arithmetic to Real, Integer and Boolean ConstraintsJournal of Logic Programming, 32(1):1–24July1997.
J. Boye. Directional Types in Logic Programming. Linköping studies in science and technology, dissertation no. 437, Linköping University, 1996.
P. Cousot and R. Cousot. Abstract Interpretation and Application to Logic ProgrammingJournal of Logic Programming13(2–3):103–1791992.
M. Comini, W. Drabent, J. Małuszyński, and P. Pietrzak. A type-based diagnoser for CHIP. ESPRIT DiSCiPl deliverable September1998.
M. Comini, W. Drabent, and P. Pietrzak. Diagnosis of CHIP programs using type information. In proceedings of Types for Constraint Logic Programming, post-conference workshop of JICSLP’981998.
K. L. Clark. Predicate logic as computational formalismTechnical Report 79/59, Imperial College, LondonDecember1979.
The CLIP Group. CIAO System Reference Manual. Facultad de Informática, UPM, Madrid, August1997. CLIP3/97.1.
M. Comini, G. Levi, M. C. Meo, and G. Vitiello. Abstract diagnosis. Journal of Logic Programming1998.To appear.
Cosytec SA. CHIP System Documentation, 1996.
W. Drabent and J. Makluszynski. Inductive Assertion Method for Logic ProgramsTheoretical Computer Science, 59:133–1551988.
W. Drabent and P. Pietrzak. Inferring call and success types for CLP programs. ESPRIT DiSCiPl deliverable September1998.
W. Drabent and P. Pietrzak. Type analysis for CHIP. In proceedings of Types for Constraint Logic Programming, post-conference workshop of JICSLP’981998.
W. Drabent. On completeness of the inductive assertion method for logic programs. Unpublished note (available from http://www.ipipan.waw.pl/~drabent), Institute of Computer Science, Polish Academy of Sciences, May1988.
P. Dart and J. Zobel. A regular type language for logic programs. In F. PfenningeditorTypes in Logic Programming, pages 157–187. MIT Press, 1992.
M. Falaschi, G. Levi, M. Martelli, and C. Palamidessi. Declarative modelling of the operational behaviour of logic languagesTheoretical Computer Science69(3):289–3181989.
T. Fruewirth, E. Shapiro, M. Vardi, and E. Yardeni. Logic programs as types for logic programs. InG. Kahn, editor, Annual IEEE Symposium on Logic in Computer Science (LICS), pages 300–309, Amsterdam, July 1991. IEEE Computer Society Press. Corrected version available from http://WWW.pst.informatik.uni-muenchen.de/~fruehwir.
J. Gallagher and D. A. deWaal. Regular Approximations of Logic Programs and Their UsesTechnical Report CSTR-92-06 Department of Computer Science, University of Bristol 1992.
J. Gallagher and D. A. deWaal. Fast and Precise Regular Approximations of Logic Programs. In P. Van Hentenryck editor Proc. of the Eleventh International Conference on Logic Programming, pages 599–613. MIT Press, 1994.
F. Gécseg and M. Steinby. Tree languages. In G. Rozenberg and A. Salomaa, editorsHandbook of Formal Languages volume 3, Beyond Words. Springer-Verlag, 1997.
P. Van Hentenryck, A. Cortesi, and B. Le Charlier. Type analysis of Prolog using type graphsJournal of Logic Programming22(3):179–209March 1995.
P. Van Hentenryck. Constraint Satisfaction in Logic Programming. MIT Press, 1989.
P.M. Hill and J.W. Lloyd. The Gödel Programming Language. MIT Press, 1994.
G. Janssens and M. Bruynooghe. Deriving descriptions of possible values of program variables by means of abstract interpretation. Journal of Logic Programming13(2&3):205–2581992.
T.K. Lakshman and U.S. Reddy. Typed Prolog: A semantic reconstruction of the Mycroft-O’Keefe type system. In V. Saraswat and K. Uedaeditors, Proc. of the 8th International Logic Programming Symposium, pages 202–217 MIT Press, 1991.
P. Mishra. Towards a theory of types in Prolog. In Proceedings of the IEEE International Symposium on Logic Programming, pages 289–2981984.
G. Puebla, F. Bueno, and Hermenegildo M. A framework for assertionbased debugging in constraint logic programming. In proceedings of Types for Constraint Logic Programming, post-conference workshop of JICSLP’981998.
Z. Somogyi, F. Hederson, and T. Conway. The execution algorithm of Mercury: an efficient purely declarative logic programming languageJournal of Logic Programming29(1-3)14–641996.
E. Yardeni and E. Y. Shapiro. A type system for logic programsJournal of Logic Programming10(2)125–1531991.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Drabent, W., Pietrzak, P. (1998). Type Analysis for CHIP. In: Haeberer, A.M. (eds) Algebraic Methodology and Software Technology. AMAST 1999. Lecture Notes in Computer Science, vol 1548. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49253-4_28
Download citation
DOI: https://doi.org/10.1007/3-540-49253-4_28
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65462-9
Online ISBN: 978-3-540-49253-5
eBook Packages: Springer Book Archive