Skip to main content

A Generic Persistence Model for (C)LP Systems (and Two Useful Implementations)

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2004)

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

Included in the following conference series:

Abstract

This paper describes a model of persistence in (C)LP languages and two different and practically very useful ways to implement this model in current systems. The fundamental idea is that persistence is a characteristic of certain dynamic predicates (i.e., those which encapsulate state). The main effect of declaring a predicate persistent is that the dynamic changes made to such predicates persist from one execution to the next one. After proposing a syntax for declaring persistent predicates, a simple, file-based implementation of the concept is presented and some examples shown. An additional implementation is presented which stores persistent predicates in an external database. The abstraction of the concept of persistence from its implementation allows developing applications which can store their persistent predicates alternatively in files or databases with only a few simple changes to a declaration stating the location and modality used for persistent storage. The paper presents the model, the implementation approach in both the cases of using files and relational databases, a number of optimizations of the process (using information obtained from static global analysis and goal clustering), and performance results from an implementation of these ideas.

This work has been supported in part by the European Union IST program under contract IST-2001-34717 “Amos” and IST-2001-38059 “ASAP” and by MCYT projects TIC 2002-0055 “CUBICO” and HI2000-0043 “ADELA.” M. Hermenegildo is also supported by the Prince of Asturias Chair in Information Science and Technology at UNM. J. Correas is supported by a grant from Madrid Regional Government. The authors would like to thank I. Caballero, J.F. Morales, S. Genaim, and C. Taboch for their collaboration in some implementation aspects and for feedback and discussions on the system, and the anonymous reviewers for their suggestions.

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. Kowalski, R.A.: Logic Programming with Integrity Constraints. In: Proceedings of JELIA, pp. 301–302 (1996)

    Google Scholar 

  2. Carro, M., Hermenegildo, M.: Concurrency in Prolog Using Threads and a Shared Database. In: 1999 International Conference on Logic Programming, pp. 320–334. MIT Press, Cambridge (1999)

    Google Scholar 

  3. Pineda, A., Bueno, F.: The O’Ciao Approach to Object Oriented Logic Programming. In: Colloquium on Implementation of Constraint and LOgic Programming Systems (ICLP associated workshop), Copenhagen (2002)

    Google Scholar 

  4. Lindholm, T.G., O’Keefe, R.A.: Efficient Implementation of a Defensible Semantics for Dynamic Prolog Code. In: Lassez, J.L. (ed.) Logic Programming: Proceedings of the Fourth Int’l. Conference and Symposium, pp. 21–39. MIT Press, Cambridge (1987)

    Google Scholar 

  5. Ullman, J.D.: Database and Knowledge-Base Systems, vol. 1 and 2. Computer Science Press, Maryland (1990)

    Google Scholar 

  6. Hermenegildo, M., Puebla, G., Bueno, F., López-García, P.: Program Development Using Abstract Interpretation (and The Ciao System Preprocessor). In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 127–152. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  7. Hermenegildo, M., Bueno, F., Puebla, G., López-García, P.: Program Analysis, Debugging and Optimization Using the Ciao System Preprocessor. In: 1999 Int’l. Conference on Logic Programming, pp. 52–66. MIT Press, Cambridge (1999)

    Google Scholar 

  8. Caballero, I., Cabeza, D., Genaim, S., Gomez, J., Hermenegildo, M.: persdbṡql: SQL Persistent Database Interface. Technical Report CLIP10/98.0 (1998)

    Google Scholar 

  9. Cabeza, D., Hermenegildo, M., Genaim, S., Taboch, C.: Design of a Generic, Homogeneous Interface to Relational Databases. Technical Report D3.1.M1-A1, CLIP7/98.0 (1998)

    Google Scholar 

  10. Draxler, C.: Accessing Relational and Higher Databases through Database Set Predicates in Logic Programming Languages. PhD thesis, Zurich University, Department of Computer Science (1991)

    Google Scholar 

  11. Ramakrishnan, R., Ullman, J.D.: A survey of research on deductive database systems. Journal of Logic Programming 23, 125–149 (1993)

    Article  MathSciNet  Google Scholar 

  12. Pattengale, N.D.: Transactional semantics. Technical Report CLIP3/04.0, Technical University of Madrid (UPM), Facultad de Informática, 28660 Boadilla del Monte, Madrid, Spain (2004)

    Google Scholar 

  13. Correas, J., Gomez, J.M., Carro, M., Cabeza, D., Hermenegildo, M.: A Generic Persistence Model for (C)LP Systems (and two useful implementations). Technical Report CLIP3/2003.1(2004), Technical University of Madrid, School of Computer Science, UPM (2004), http://clip.dia.fi.upm.es/papers/persdb-tr1.pdf

  14. Bueno, F., Cabeza, D., Carro, M., Hermenegildo, M., López-Garc´ıa, P., Puebla, G.: The Ciao Prolog System. Reference Manual (v1.8). The Ciao System Documentation Series–TR CLIP4/2002.1, School of Computer Science, Technical University of Madrid (UPM) (2002), System and on-line version of the manual available at http://clip.dia.fi.upm.es/Software/Ciao/

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Correas, J., Gómez, J.M., Carro, M., Cabeza, D., Hermenegildo, M. (2004). A Generic Persistence Model for (C)LP Systems (and Two Useful Implementations). In: Jayaraman, B. (eds) Practical Aspects of Declarative Languages. PADL 2004. Lecture Notes in Computer Science, vol 3057. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24836-1_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24836-1_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22253-8

  • Online ISBN: 978-3-540-24836-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics