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.
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
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)
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)
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
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)
Frühwirth, T.: Constraint handling rules. In: Podelski, A. (ed.) Constraint Programming: Basics and Trends. LNCS, vol. 910, pp. 90–107. Springer, Heidelberg (1995)
Gonzalez, J., Low, Y., Guestrin, C.: Residual splash for optimally parallelizing belief propagation. In: Artificial Intelligence and Statistics (2009)
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)
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)
Wuille, P., Schrijvers, T., Demoen, B.: CCHR: the fastest CHR implementation, in C. In: Workshop on Constraint Handling Rules, pp. 123–137 (2007)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)