Hostname: page-component-cd9895bd7-gbm5v Total loading time: 0 Render date: 2024-12-19T01:44:59.907Z Has data issue: false hasContentIssue false

Logical Algorithms meets CHR: A meta-complexity result for Constraint Handling Rules with rule priorities

Published online by Cambridge University Press:  10 February 2009

LESLIE DE KONINCK*
Affiliation:
Department of Computer Science, K.U.Leuven, Belgium (e-mail: [email protected])

Abstract

This paper investigates the relationship between the Logical Algorithms (LA) language of Ganzinger and McAllester and Constraint Handling Rules (CHR). We present a translation schema from LA to CHRrp: CHR with rule priorities, and show that the meta-complexity theorem for LA can be applied to a subset of CHRrp via inverse translation. Inspired by the high-level implementation proposal for Logical Algorithm by Ganzinger and McAllester and based on a new scheduling algorithm, we propose an alternative implementation for CHRrp that gives strong complexity guarantees and results in a new and accurate meta-complexity theorem for CHRrp. It is furthermore shown that the translation from Logical Algorithms to CHRrp combined with the new CHRrp implementation satisfies the required complexity for the Logical Algorithms meta-complexity result to hold.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2009

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Betz, H. 2007. Relating coloured Petri nets to Constraint Handling Rules. In 4th Workshop on Constraint Handling Rules, Djelloul, K., Duck, G. J. and Sulzmann, M., Eds. U. Porto, 3347.Google Scholar
Christiansen, H. 2005. CHR grammars. Theory and Practice of Logic Programming 5 (4–5), 467501.Google Scholar
Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J. and Quesada, J. F. 1999. The Maude system. In 10th International Conference on Rewriting Techniques and Applications, Narendran, P. and Rusinowitch, M., Eds. Lecture Notes in Computer Science, vol. 1631. Springer, Heidelberg, Germany, 240243.CrossRefGoogle Scholar
De Koninck, L. 2007. Mergeable schedules for lazy matching. In Technical Report CW 505, Department of Computer Science, K.U.Leuven.Google Scholar
De Koninck, L., Schrijvers, T. and Demoen, B. 2007a. The correspondence between the Logical Algorithms language and CHR. In 23rd International Conference on Logic Programming, Dahl, V. and Niemelä, I., Eds. Lecture Notes in Computer Science, vol. 4670. Springer, Heidelberg, Germany, 209223.Google Scholar
De Koninck, L., Schrijvers, T. and Demoen, B. 2007b. User-definable rule priorities for CHR. In 9th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, Leuschel, M. and Podelski, A., Eds. ACM Press, New York, NY, 2536.Google Scholar
De Koninck, L., Stuckey, P. J. and Duck, G. J. 2008. Optimizing compilation of CHR with rule priorities. In 9th International Symposium on Functional and Logic Programming. Logic Programming, Garrigue, J. and Hermenegildo, M., Eds. Lecture Notes in Computer Science, vol. 4989. Springer, Heidelberg, 3247.Google Scholar
Duck, G. J., Stuckey, P. J. and Brand, S. 2006. ACD term rewriting. In 22nd International Conference on Logic Programming, Etalle, S. and Truszczynski, M., Eds. Lecture Notes in Computer Science, vol. 4079. Springer, Heidelberg, Germany, 117131.CrossRefGoogle Scholar
Duck, G. J., Stuckey, P. J., García de la Banda, M. and Holzbaur, C. 2004. The refined operational semantics of Constraint Handling Rules. In 20th International Conference on Logic Programming, Demoen, B. and Lifschitz, V., Eds. Lecture Notes in Computer Science, vol. 3132. Springer, Heidelberg, Germany, 90104.CrossRefGoogle Scholar
Duck, G. J., Stuckey, P. J. and Sulzmann, M. 2007. Observable confluence for Constraint Handling Rules. In 23rd International Conference on Logic Programming, Dahl, V. and Niemelä, I., Eds. Lecture Notes in Computer Science, vol. 4670. Springer, Heidelberg, Germany, 224239.CrossRefGoogle Scholar
Forgy, C. L. 1982. Rete: A fast algorithm for the many pattern/many object pattern match problem. Artificial Intelligence 19 (1), 1737.Google Scholar
Fredman, M. L. and Tarjan, R. E. 1987. Fibonacci heaps and their uses in improved network optimization algorithms. Journal of the ACM 34 (3), 596615.Google Scholar
Friedman-Hill, E. 2007. JESS 7.0p2: The rule engine for the Java platform. http://herzberg.ca.sandia.gov/jess.Google Scholar
Frühwirth, T. 1998. Theory and practice of Constraint Handling Rules. Journal of Logic Programming 37 (1–3), 95138.Google Scholar
Frühwirth, T. 2000a. Proving termination of constraint solver programs. In New Trends in Constraints, Joint ERCIM/Compulog Net Workshop, Paphos, Cyprus, October 1999, Selected papers, Apt, K. R., Kakas, A. C., Monfroy, E. and Rossi, F., Eds. Lecture Notes in Computer Science, vol. 1865. Springer, Heidelberg, Germany, 298317.Google Scholar
Frühwirth, T. 2000b. Proving termination of constraint solver programs. In Joint ERCIM/Compulog Net Workshop on New Trends in Contraints, Apt, K. R., Kakas, A. C., Monfroy, E. and Rossi, F., Eds. Lecture Notes in Computer Science, vol. 1865. Springer, Heidelberg, Germany, 298317.Google Scholar
Frühwirth, T. 2002a. As time goes by: Automatic complexity analysis of simplification rules. In 8th International Conference on Principles of Knowledge Representation and Reasoning, Fensel, D., Giunchiglia, F., McGuinness, D. L., and Williams, M.-A., Eds. Morgan Kaufmann, San Francisco, CA, 547557.Google Scholar
Frühwirth, T. 2002b. As time goes by II: More automatic complexity analysis of concurrent rule programs. In Quantitative Aspects of Programming Languages, Selected Papers. Electronic Notes in Theoretical Computer Science, vol. 59. Elsevier, Amsterdam.Google Scholar
Ganzinger, H. and McAllester, D. A. 2001. A new meta-complexity theorem for bottom-up logic programs. In 1st International Joint Conference on Automated Reasoning, Goré, R., Leitsch, A., and Nipkow, T., Eds. Lecture Notes in Computer Science, vol. 2083. Springer, Heidelberg, Germany, 514528.Google Scholar
Ganzinger, H. and McAllester, D. A. 2002. Logical algorithms. In 18th International Conference on Logic Programming, Stuckey, P. J., Ed. Lecture Notes in Computer Science, vol. 2401. Springer, Heidelberg, Germany, 209223.Google Scholar
Holzbaur, C. and Frühwirth, T. 1998. Constraint Handling Rules reference manual, release 2.2. In Technical Report TR-98-01, Österreichisches Forschungsinstitut für Artificial Intelligence, Wien.Google Scholar
McAllester, D. A. 1999. On the complexity analysis of static analyses. In 6th International Symposium on Static Analysis, Cortesi, A. and Filé, G., Eds. Lecture Notes in Computer Science, vol. 1694. Springer, Heidelberg, Germany, 312329.Google Scholar
Miranker, D. P., Brant, D. A., Lofaso, B. and Gadbois, D. 1990. On the performance of lazy matching in production systems. In 8th National Conference on Artificial Intelligence. AAAI Press/The MIT Press, Cambridge, MA, USA, 685692.Google Scholar
Pilozzi, P. and De Schreye, D. 2008. Termination analysis of CHR revisited. In 24th International Conference on Logic Programming, García de la Banda, M. and Pontelli, E., Eds. Lecture Notes in Computer Science, vol. 5366. Springer, Heidelberg, Germany, 501515.Google Scholar
Pilozzi, P., Schrijvers, T., and De Schreye, D. 2007. Proving termination of CHR in Prolog: A transformational approach. In 9th International Workshop on Termination, Hofbauer, D. and Serebrenik, A., Eds. Paris, France, 3033.Google Scholar
Proctor, M., Neale, M., Frandsen, M., Griffith, S. Jr, Tirelli, E., Meyer, F. and Verlaenen, K. 2007. Drools Documentation, Version 4.0.3. http://www.jboss.com/products/rules.Google Scholar
Schrijvers, T. 2005. Analyses, optimizations and extensions of Constraint Handling Rules. Ph.D. thesis, K.U.Leuven, Leuven, Belgium.Google Scholar
Schrijvers, T. and Demoen, B. 2004. The K.U.Leuven CHR system: Implementation and application. In First Workshop on Constraint Handling Rules: Selected Contributions, Frühwirth, T. and Meister, M., Eds. Ulmer Informatik-Berichte, vol. 2004-01. Universität Ulm, 15.Google Scholar
Schrijvers, T. and Frühwirth, T. 2006. Optimal union-find in Constraint Handling Rules. Theory and Practice of Logic Programming 6, 12.CrossRefGoogle Scholar
Sneyers, J. 2008. Optimizing compilation and computational complexity of Constraint Handling Rules. Ph.D. thesis, K.U.Leuven, Leuven, Belgium.Google Scholar
Sneyers, J., Schrijvers, T. and Demoen, B. 2005. The computational power and complexity of Constraint Handling Rules. In 2nd Workshop on Constraint Handling Rules, Schrijvers, T. and Frühwirth, T., Eds. Reports CW, vol. 421. Department of Computer Science, K.U.Leuven, Belgium, 317.Google Scholar
Sneyers, J., Schrijvers, T. and Demoen, B. 2006a. Dijkstra's algorithm with Fibonacci heaps: An executable description in CHR. In 20th Workshop on Logic Programming, Fink, M., Tompits, H., and Woltran, S., Eds. INFSYS Research Report, vol. 1843-06-02. TU Wien, 182191.Google Scholar
Sneyers, J., Schrijvers, T. and Demoen, B. 2006b. Memory reuse for CHR. In 22nd International Conference on Logic Programming, Etalle, S. and Truszczynski, M., Eds. Lecture Notes in Computer Science, vol. 4079. Springer, Heidelberg, Germany, 7286.Google Scholar
Sneyers, J., Schrijvers, T. and Demoen, B. 2008. The computational power and complexity of Constraint Handling Rules. http://www.cs.kuleuven.be/~jon/ – Submitted to ACM TOPLAS.Google Scholar
Tacchella, P., Meo, M. C. and Gabbrielli, M. 2007. Unfolding in CHR. In 9th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, Leuschel, M. and Podelski, A., Eds. ACM Press, 179186.Google Scholar
Van Weert, P., Sneyers, J., Schrijvers, T. and Demoen, B. 2006. Extending CHR with negation as absence. In 3rd Workshop on Constraint Handling Rules, Schrijvers, T. and Frühwirth, T., Eds. Reports CW, vol. 452. Department of Computer Science, K.U.Leuven, Belgium, 125140.Google Scholar
Voets, D., Pilozzi, P. and De Schreye, D. 2007. A new approach to termination analysis of Constraint Handling Rules. In 4th Workshop on Constraint Handling Rules, Djelloul, K., Duck, G. J., and Sulzmann, M., Eds. U. Porto, 7789.Google Scholar