Hostname: page-component-cd9895bd7-gbm5v Total loading time: 0 Render date: 2024-12-23T12:06:36.924Z Has data issue: false hasContentIssue false

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

Published online by Cambridge University Press:  23 May 2018

THOM FRÜHWIRTH*
Affiliation:
Institute of Software Engineering and Programming Languages, Ulm University 89069 Ulm, Germany (e-mail: [email protected])
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

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.

Type
Survey Article
Copyright
Copyright © Cambridge University Press 2018 

References

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.Google Scholar
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.Google Scholar
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.Google Scholar
Abdennadher, S., Frühwirth, T. and Meuss, H. 1999. Confluence and semantics of constraint simplification rules. Constraints 4, 2, 133165.Google Scholar
Agha, G. 1986. Actors: A Model of Concurrent Computation in Distributed Systems. MIT Press, Cambridge, MA, USA.Google Scholar
Betz, H. 2007. Relating coloured Petri nets to Constraint Handling Rules. In Proc. 4th Workshop on Constraint Handling Rules, 33–47.Google Scholar
Betz, H. 2014. A Unified Analytical Foundation for Constraint Handling Rules. BoD–Books on Demand.Google Scholar
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.Google Scholar
Cervesato, I., Lam, E. S. L. and Elgazar, A. 2016. Choreographic Compilation of Decentralized Comprehension Patterns. Springer International Publishing, Cham, 113129.Google 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 Proc. International Conference on Logic Programming, Demoen, B. and Lifschitz, V., Eds. Lecture Notes in Computer Science, vol. 3132. Springer, 90–104.Google Scholar
Fournet, C. and Gonthier, G. 2002. The Join Calculus: A Language for Distributed Mobile Programming. Springer Berlin Heidelberg, Berlin, Heidelberg, 268332.Google Scholar
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.Google Scholar
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.Google Scholar
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.Google Scholar
Frühwirth, T. 2009. Constraint Handling Rules (Monography). Cambridge University Press.Google Scholar
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.Google Scholar
Frühwirth, T. 2016. The CHR Web Site. Accessed May 2018 URL: www.constraint-handling-rules.org. Ulm University.Google Scholar
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.Google Scholar
Frühwirth, T. and Raiser, F., Ed. 2011. Constraint Handling Rules: Compilation, Execution, and Analysis. Books on Demand.Google Scholar
Gabbrielli, M., Meo, M. C., Tacchella, P. and Wiklicky, H. 2013. Unfolding for CHR programs. Theory and Practice of Logic Programming, 15, 3, 148.Google Scholar
Goldberg, A. V. and Tarjan, R. E. 1988. A new approach to the maximum-flow problem. J. ACM 35, 4, 921940.Google Scholar
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.Google Scholar
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.Google Scholar
Jensen, K. 1987. Coloured Petri Nets. Springer, Berlin, Heidelberg, 248299.Google Scholar
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.Google Scholar
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.Google Scholar
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.Google Scholar
Lam, E. S. and Sulzmann, M. 2009. Concurrent goal-based execution of constraint handling rules. Theory and Practice of Logic Programming 11, 841879.Google Scholar
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.Google Scholar
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.Google Scholar
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.Google Scholar
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.Google Scholar
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.Google Scholar
Raiser, F. and Frühwirth, T. 2010. Exhaustive parallel rewriting with multiple removals. In WLP '10, Abdennadher, S., Ed.Google Scholar
Sarna-Starosta, B. 2008. Constraint-Based Analysis of Security Properties. VDM Verlag, Saarbrücken, Germany.Google Scholar
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.Google Scholar
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.Google Scholar
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.Google Scholar
Shavit, N. and Touitou, D. 1997. Software transactional memory. Distributed Computing 10, 2, 99116.Google Scholar
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.Google Scholar
Sneyers, J., Schrijvers, T. and Demoen, B. 2009. The computational power and complexity of Constraint Handling Rules. ACM TOPLAS 31, 2, 342.Google Scholar
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.Google Scholar
Sulzmann, M. and Chu, D. H. 2008. A rule-based specification of Software Transactional Memory. In LOPSTR '08, Pre-proceedings, Hanus, M., Ed.Google Scholar
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.Google Scholar
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.Google Scholar
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.Google Scholar
Tarjan, R. E. and Leeuwen, J. V. 1984. Worst-case analysis of set union algorithms. Journal of the ACM 31, 2, 245281.Google Scholar
Triossi, A. 2011. Hardware execution of constraint handling rules. PhD Thesis, Universita Ca Foscari di Venezia.Google Scholar
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.Google Scholar
Van Weert, P. 2010. Efficient lazy evaluation of rule-based programs. IEEE Transactions on Knowledge and Data Engineering 22, 11, 15211534.Google Scholar
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.Google Scholar