Skip to main content
×
×
Home

Parallelism, concurrency and distribution in constraint handling rules: A survey

  • THOM FRÜHWIRTH (a1)
Abstract

Constraint Handling Rules (CHR) is both an effective concurrent declarative programming language and a versatile computational logic formalism. In CHR, guarded reactive rules rewrite a multi-set of constraints. Concurrency is inherent, since rules can be applied to the constraints in parallel. In this comprehensive survey, we give an overview of the concurrent, parallel as well as distributed CHR semantics, standard and more exotic, that have been proposed over the years at various levels of refinement. These semantics range from the abstract to the concrete. They are related by formal soundness results. Their correctness is proven as a correspondence between parallel and sequential computations. On the more practical side, we present common concise example CHR programs that have been widely used in experiments and benchmarks. We review parallel and distributed CHR implementations in software as well as hardware. The experimental results obtained show a parallel speed-up for unmodified sequential CHR programs. The software implementations are available online for free download and we give the web links. Due to its high level of abstraction, the CHR formalism can also be used to implement and analyse models for concurrency. To this end, the Software Transaction Model, the Actor Model, Colored Petri Nets and the Join-Calculus have been faithfully encoded in CHR. Finally, we identify and discuss commonalities of the approaches surveyed and indicate what problems are left open for future research.

Copyright
References
Hide All
Abdennadher, S. and Frühwirth, T. 1998. On completion of Constraint Handling Rules. In Proc. International Conference on Principles and Practice of Constraint Programming, Maher, M. J. and Puget, J.-F., Eds. Lecture Notes in Computer Science, vol. 1520. Springer, 25–39.
Abdennadher, S. and Frühwirth, T. 1999. Operational equivalence of CHR programs and constraints. In Proc. International Conference on Principles and Practice of Constraint Programming, Jaffar, J., Ed. Lecture Notes in Computer Science, vol. 1713. Springer, 43–57.
Abdennadher, S. and Frühwirth, T. 2004. Integration and optimization of rule-based constraint solvers. In Proc. International Symposium on Logic-Based Program Synthesis and Transformation, Bruynooghe, M., Ed. Lecture Notes in Computer Science, vol. 3018. Springer, 198–213.
Abdennadher, S., Frühwirth, T. and Meuss, H. 1999. Confluence and semantics of constraint simplification rules. Constraints 4, 2, 133165.
Agha, G. 1986. Actors: A Model of Concurrent Computation in Distributed Systems. MIT Press, Cambridge, MA, USA.
Betz, H. 2007. Relating coloured Petri nets to Constraint Handling Rules. In Proc. 4th Workshop on Constraint Handling Rules, 33–47.
Betz, H. 2014. A Unified Analytical Foundation for Constraint Handling Rules. BoD–Books on Demand.
Betz, H., Raiser, F. and Frühwirth, T. 2010. A complete and terminating execution model for constraint handling rules. Theory and Practice of Logic Programming 10, 597610.
Cervesato, I., Lam, E. S. L. and Elgazar, A. 2016. Choreographic Compilation of Decentralized Comprehension Patterns. Springer International Publishing, Cham, 113129.
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 Proc. International Conference on Logic Programming, Demoen, B. and Lifschitz, V., Eds. Lecture Notes in Computer Science, vol. 3132. Springer, 90–104.
Fournet, C. and Gonthier, G. 2002. The Join Calculus: A Language for Distributed Mobile Programming. Springer Berlin Heidelberg, Berlin, Heidelberg, 268332.
Frühwirth, T. 2005a. Parallelizing union-find in Constraint Handling Rules using confluence. In Proc. International Conference on Logic Programming, Gabbrielli, M. and Gupta, G., Eds. Lecture Notes in Computer Science, vol. 3668. Springer, 113–127.
Frühwirth, T. 2005b. Specialization of concurrent guarded multi-set transformation rules. In Proc. International Symposium on Logic-Based Program Synthesis and Transformation, Etalle, S., Ed. Lecture Notes in Computer Science, vol. 3573. Springer, 133–148.
Frühwirth, T. 2006. Deriving linear-time algorithms from union-find in CHR. In CHR '06, Schrijvers, T. and Frühwirth, T., Ed. Leuven, K.U., Dept. Comp. Sc., Technical report CW 452, 4960.
Frühwirth, T. 2009. Constraint Handling Rules (Monography). Cambridge University Press.
Frühwirth, T. 2015. Constraint handling rules – what else? In Rule Technologies: Foundations, Tools, and Applications. Bassiliades, N., Gottlob, G., Sadri, F., Paschke, A. and Roman, D., Eds. Springer International Publishing, 1334.
Frühwirth, T. 2016. The CHR Web Site. Accessed May 2018 URL: www.constraint-handling-rules.org. Ulm University.
Frühwirth, T. and Holzbaur, C. 2003. Source-to-source transformation for a class of expressive rules. In Proc. Joint Conf. Declarative Programming APPIA-GULP-PRODE, Buccafurri, F., Ed. 386–397.
Frühwirth, T. and Raiser, F., Ed. 2011. Constraint Handling Rules: Compilation, Execution, and Analysis. Books on Demand.
Gabbrielli, M., Meo, M. C., Tacchella, P. and Wiklicky, H. 2013. Unfolding for CHR programs. Theory and Practice of Logic Programming, 15, 3, 148.
Goldberg, A. V. and Tarjan, R. E. 1988. A new approach to the maximum-flow problem. J. ACM 35, 4, 921940.
Guerraoui, R. and Kapalka, M. 2008. On the correctness of transactional memory. In Proc. 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. ACM, New York, NY, USA, 175–184.
Holzbaur, C., García de la Banda, M., Stuckey, P. J. and Duck, G. J. 2005. Optimizing compilation of Constraint Handling Rules in HAL. Theory and Practice of Logic Programming 5, 4–5, 503531.
Jensen, K. 1987. Coloured Petri Nets. Springer, Berlin, Heidelberg, 248299.
Lam, E. S. 2018. Concurrent CHR, chapter 5. In Constraint Handling Rules: Compilation, Execution, and Analysis, Frühwirth, T. and Raiser, F., Eds. Books on Demand, 121155.
Lam, E. S. and Cervesato, I. 2013. Decentralized execution of constraint handling rules for ensembles. In Proc. 15th Symposium on Principles and Practice of Declarative Programming. ACM, 205–216.
Lam, E. S. and Sulzmann, M. 2007. A concurrent constraint handling rules semantics and its implementation with software transactional memory. In Proc. ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming. ACM Press.
Lam, E. S. and Sulzmann, M. 2009. Concurrent goal-based execution of constraint handling rules. Theory and Practice of Logic Programming 11, 841879.
Lam, E. S. L. 2011. Parallel execution of constraint handling rules – Theory, implementation and application. Ph.D. thesis, School of Computing, Department of Computing Science, National University of Singapore.
Lam, E. S. L., Cervesato, I. and Fatima, N. 2015. Comingle: Distributed logic programming for decentralized mobile ensembles. In Coordination Models and Languages - 17th IFIP WG 6.1 International Conference, COORDINATION 2015, 51–66.
Meister, M. 2007. Concurrency of the preflow-push algorithm in constraint handling rules. In Proc. 12th International Workshop on Constraint Solving and Constraint Logic Programming, 160–169.
Meister, M. and Frühwirth, T. 2007. Reconstructing almost-linear tree equation solving algorithms in CHR. In Proc. Annual ERCIM Workshop on Constraint Solving and Constraint Logic Programming, 123.
Raiser, F., Betz, H. and Frühwirth, T. 2009. Equivalence of CHR states revisited. In Proc. Constraint Handling Rules, Raiser, F. and Sneyers, J., Eds. K.U. Leuven, Dept. Comp. Sc., Technical report CW 555, 33–48.
Raiser, F. and Frühwirth, T. 2010. Exhaustive parallel rewriting with multiple removals. In WLP '10, Abdennadher, S., Ed.
Sarna-Starosta, B. 2008. Constraint-Based Analysis of Security Properties. VDM Verlag, Saarbrücken, Germany.
Sarna-Starosta, B. and Ramakrishnan, C. 2007. Compiling constraint handling rules for efficient tabled evaluation. In Proc. 9th International Symposium on Practical Aspects of Declarative Languages, Hanus, M., Ed. Lecture Notes in Computer Science, vol. 4354. Springer, 170–184.
Sarna-Starosta, B., Stirewalt, R. E. K. and Dillon, L. K. 2007. A model-based design-for-verification approach to checking for deadlock in multi-threaded applications. International Journal of Software Engineering and Knowledge Engineering 17, 2, 207230.
Schrijvers, T. and Sulzmann, M. 2008. Transactions in constraint handling rules. In Proc. 24th International Conference on Logic Programming. Lecture Notes in Computer Science, vol. 5366. Springer, 516–530.
Shavit, N. and Touitou, D. 1997. Software transactional memory. Distributed Computing 10, 2, 99116.
Sneyers, J. 2008. Turing-complete subclasses of CHR. In Proc. 24th International Conference on Logic Programming. Lecture Notes in Computer Science, vol. 5366. Springer, 759–763.
Sneyers, J., Schrijvers, T. and Demoen, B. 2009. The computational power and complexity of Constraint Handling Rules. ACM TOPLAS 31, 2, 342.
Sneyers, J., Van Weert, P., Schrijvers, T. and De Koninck, L. 2010. As time goes by: Constraint Handling Rules – A survey of CHR research between 1998 and 2007. TPLP 10, 1, 147.
Sulzmann, M. and Chu, D. H. 2008. A rule-based specification of Software Transactional Memory. In LOPSTR '08, Pre-proceedings, Hanus, M., Ed.
Sulzmann, M. and Lam, E. S. 2007. Compiling constraint handling rules with lazy and concurrent search techniques. In Proc. 4th Workshop on Constraint Handling Rules, 139–149.
Sulzmann, M. and Lam, E. S. 2008. Parallel execution of multi-set constraint rewrite rules. In Proc. 10thInternational Conference on Principles of Practical Declarative Programming, Antoy, S., Ed. ACM Press, 20–31.
Sulzmann, M., Lam, E. S. and Van Weert, P. 2008. Actors with multi-headed message receive patterns. In Proc. 10th International Conference on Coordination Models and Languages, Lea, D. and Zavattaro, G., Eds. Lecture Notes in Computer Science, vol. 5052. Springer, 315–330.
Tarjan, R. E. and Leeuwen, J. V. 1984. Worst-case analysis of set union algorithms. Journal of the ACM 31, 2, 245281.
Triossi, A. 2011. Hardware execution of constraint handling rules. PhD Thesis, Universita Ca Foscari di Venezia.
Triossi, A., Orlando, S., Raffaetà, A. and Frühwirth, T. 2012. Compiling chr to parallel hardware. In Proc. 14th Symposium on Principles and Practice of Declarative Programming. ACM, 173–184.
Van Weert, P. 2010. Efficient lazy evaluation of rule-based programs. IEEE Transactions on Knowledge and Data Engineering 22, 11, 15211534.
Zaki, A., Frühwirth, T. and Geller, I. 2012. Parallel execution of constraint handling rules on a graphical processing unit. In CHR '12, Sneyers, J. and Frühwirth, T., Eds. K.U. Leuven, Dept. Comp. Sc., Technical report CW 624, 82–90.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Theory and Practice of Logic Programming
  • ISSN: 1471-0684
  • EISSN: 1475-3081
  • URL: /core/journals/theory-and-practice-of-logic-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Keywords

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 7 *
Loading metrics...

Abstract views

Total abstract views: 36 *
Loading metrics...

* Views captured on Cambridge Core between 23rd May 2018 - 24th June 2018. This data will be updated every 24 hours.