Skip to main content

Type Analysis for CHIP

  • Conference paper
  • First Online:
Algebraic Methodology and Software Technology (AMAST 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1548))

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.

This work has been supported by the ESPRIT 4 Project 22532 DiSCiPl.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. K.R. Apt and R. Ben-Eliyahu. Meta-variables in Logic Programming, or in Praise of Ambivalent SyntaxFundamenta Informaticae28(1–2):22–36, 1996.

    MathSciNet  Google Scholar 

  2. K.R. Apt and E. Marchiori. Reasoning about Prolog programs: from modes through types to assertionsFormal Aspects of Computing, 6(6A):743–7641994.

    Article  MATH  Google Scholar 

  3. 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.

    Google Scholar 

  4. F. Benhamou and W. Older. Applying Interval Arithmetic to Real, Integer and Boolean ConstraintsJournal of Logic Programming, 32(1):1–24July1997.

    Google Scholar 

  5. J. Boye. Directional Types in Logic Programming. Linköping studies in science and technology, dissertation no. 437, Linköping University, 1996.

    Google Scholar 

  6. P. Cousot and R. Cousot. Abstract Interpretation and Application to Logic ProgrammingJournal of Logic Programming13(2–3):103–1791992.

    Article  MATH  MathSciNet  Google Scholar 

  7. M. Comini, W. Drabent, J. Małuszyński, and P. Pietrzak. A type-based diagnoser for CHIP. ESPRIT DiSCiPl deliverable September1998.

    Google Scholar 

  8. 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.

    Google Scholar 

  9. K. L. Clark. Predicate logic as computational formalismTechnical Report 79/59, Imperial College, LondonDecember1979.

    Google Scholar 

  10. The CLIP Group. CIAO System Reference Manual. Facultad de Informática, UPM, Madrid, August1997. CLIP3/97.1.

    Google Scholar 

  11. M. Comini, G. Levi, M. C. Meo, and G. Vitiello. Abstract diagnosis. Journal of Logic Programming1998.To appear.

    Google Scholar 

  12. Cosytec SA. CHIP System Documentation, 1996.

    Google Scholar 

  13. W. Drabent and J. Makluszynski. Inductive Assertion Method for Logic ProgramsTheoretical Computer Science, 59:133–1551988.

    Article  MathSciNet  MATH  Google Scholar 

  14. W. Drabent and P. Pietrzak. Inferring call and success types for CLP programs. ESPRIT DiSCiPl deliverable September1998.

    Google Scholar 

  15. W. Drabent and P. Pietrzak. Type analysis for CHIP. In proceedings of Types for Constraint Logic Programming, post-conference workshop of JICSLP’981998.

    Google Scholar 

  16. 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.

  17. P. Dart and J. Zobel. A regular type language for logic programs. In F. PfenningeditorTypes in Logic Programming, pages 157–187. MIT Press, 1992.

    Google Scholar 

  18. M. Falaschi, G. Levi, M. Martelli, and C. Palamidessi. Declarative modelling of the operational behaviour of logic languagesTheoretical Computer Science69(3):289–3181989.

    Article  MATH  MathSciNet  Google Scholar 

  19. 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.

  20. 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.

    Google Scholar 

  21. 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.

    Google Scholar 

  22. 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.

    Google Scholar 

  23. P. Van Hentenryck, A. Cortesi, and B. Le Charlier. Type analysis of Prolog using type graphsJournal of Logic Programming22(3):179–209March 1995.

    Google Scholar 

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

    Google Scholar 

  25. P.M. Hill and J.W. Lloyd. The Gödel Programming Language. MIT Press, 1994.

    Google Scholar 

  26. 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.

    Article  MATH  MathSciNet  Google Scholar 

  27. 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.

    Google Scholar 

  28. P. Mishra. Towards a theory of types in Prolog. In Proceedings of the IEEE International Symposium on Logic Programming, pages 289–2981984.

    Google Scholar 

  29. 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.

    Google Scholar 

  30. 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.

    Article  Google Scholar 

  31. E. Yardeni and E. Y. Shapiro. A type system for logic programsJournal of Logic Programming10(2)125–1531991.

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics