Skip to main content

On Compiling Linear Logic Programs with Comprehensions, Aggregates and Rule Priorities

  • Conference paper
  • First Online:
Practical Aspects of Declarative Languages (PADL 2015)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 9131))

Included in the following conference series:

Abstract

Linear logic programs are challenging to implement efficiently because facts are asserted and retracted frequently. Implementation is made more difficult with the introduction of useful features such as rule priorities, which are used to specify the order of rule inference, and comprehensions or aggregates, which are mechanisms that make data iteration and gathering more intuitive. In this paper, we describe a compilation scheme for transforming linear logic programs enhanced with those features into efficient C++ code. Our experimental results show that compiled logic programs are less than one order of magnitude slower than hand-written C programs and much faster than interpreted languages such as Python.

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 34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.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. Betz, H., Frühwirth, T.: A linear-logic semantics for constraint handling rules. In: van Beek, P. (ed.) CP 2005. LNCS, vol. 3709, pp. 137–151. Springer, Heidelberg (2005)

    Google Scholar 

  2. Cruz, F., Rocha, R., Goldstein, S., Pfenning, F.: A Linear Logic Programming Language for Concurrent Programming over Graph Structures. Journal of Theory and Practice of Logic Programming, International Conference on Logic Programming, Special Issue pp. 493–507 (July 2014)

    Google Scholar 

  3. Cruz, F., Rocha, R., Goldstein, S.C.: Design and implementation of a multithreaded virtual machine for executing linear logic programs. In: International Symposium on Principles and Practice of Declarative Programming, pp. 43–53. ACM Press, September 2014

    Google Scholar 

  4. De Koninck, L., Stuckey, P.J., Duck, G.J.: Optimizing compilation of chr with rule priorities. In: Garrigue, J., Hermenegildo, M.V. (eds.) FLOPS 2008. LNCS, vol. 4989, pp. 32–47. Springer, Heidelberg (2008)

    Google Scholar 

  5. Frühwirth, T.: Constraint handling rules. In: Podelski, A. (ed.) Constraint Programming: Basics and Trends. LNCS, vol. 910, pp. 90–107. Springer, Heidelberg (1995)

    Google Scholar 

  6. Gonzalez, J., Low, Y., Guestrin, C.: Residual splash for optimally parallelizing belief propagation. In: Artificial Intelligence and Statistics (2009)

    Google Scholar 

  7. Holzbaur, C., de la Banda, M.J.G., Stuckey, P.J., Duck, G.J.: Optimizing compilation of constraint handling rules in HAL. CoRR cs.PL/0408025 (2004)

    Google Scholar 

  8. Low, Y., Gonzalez, J., Kyrola, A., Bickson, D., Guestrin, C., Hellerstein, J.M.: Graphlab: a new framework for parallel machine learning. In: Conference on Uncertainty in Artificial Intelligence (UAI), pp. 340–349 (2010)

    Google Scholar 

  9. Wuille, P., Schrijvers, T., Demoen, B.: CCHR: the fastest CHR implementation, in C. In: Workshop on Constraint Handling Rules, pp. 123–137 (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Flavio Cruz .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Cruz, F., Rocha, R. (2015). On Compiling Linear Logic Programs with Comprehensions, Aggregates and Rule Priorities. In: Pontelli, E., Son, T. (eds) Practical Aspects of Declarative Languages. PADL 2015. Lecture Notes in Computer Science(), vol 9131. Springer, Cham. https://doi.org/10.1007/978-3-319-19686-2_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-19686-2_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-19685-5

  • Online ISBN: 978-3-319-19686-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics