We extend the rule-based, multiset rewriting language CHR with multiset comprehension patterns. Multiset comprehension provides the programmer with the ability to write multiset rewriting rules that can match a variable number of entities in the state. This enables implementing algorithms that coordinate large amounts of data or require aggregate operations in a declarative way, and results in code that is more concise and readable than with pure CHR. We call this extension CHRcp. In this paper, we formalize the operational semantics of CHRcp and define a low-level optimizing compilation scheme based on join ordering for the efficient execution of programs. We provide preliminary empirical results that demonstrate the scalability and effectiveness of this approach.
CITATION STYLE
Lam, E. S. L., & Cervesato, I. (2014). Optimized compilation of multiset rewriting with comprehensions. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 8858, pp. 19–38). Springer Verlag. https://doi.org/10.1007/978-3-319-12736-1_2
Mendeley helps you to discover research relevant for your work.