Join Ordering for Constraint Handling Rules
نویسندگان
چکیده
Join ordering is the problem of finding cost optimal execution plans for matching multi-headed rules. In the context of Constraint Handling Rules, this topic has received limited attention so far, even though it is of great importance for efficient CHR execution. We present a formal cost model for joins and investigate the possibility of join optimization at runtime. We propose some heuristic approximations of the parameters of this cost model, for both the static and dynamic case. We discuss an O(n log n) optimization algorithm for the special case of acyclic join graphs. However, in general, join order optimization is an NP-complete problem. Finally, we identify some classes of cyclic join graphs that can be reduced to acyclic ones.
منابع مشابه
Join Ordering for Constraint Handling Rules: Putting Theory into Practice
Join ordering is the NP-complete problem of finding the optimal order in which the different conjuncts of multi-headed rules are joined. Join orders are the single most important determinants for the runtime complexity of CHR programs. Nevertheless, all current systems use ad-hoc join ordering heuristics, often using greedy, very error-prone algorithms. As a first step, Leslie De Koninck and Jo...
متن کاملEfficient Compilation of Guarded Join-Patterns via Parallel Implementation of Constraint Handling Rules
Parallelism is going mainstream and the demand for programs that scales well with parallelism will become ever more stronger. Hence to develope parallel programs of increasing complexity, comprehensive and efficient high level concurrency abstractions would soon become a necessity in existing mainstream programming languages. Our approach extends from a promising high-level concurrency abstract...
متن کاملJoin Evaluation Schemata for Constraint Handling Rules (chr)
CHR is a committed-choice language consisting of guarded rules that rewrite constraints into simpler ones until they are solved. CHR can de-ne both simpliication of and propagation over user-deened constraints. Simpliication replaces constraints by simpler constraints while preserving logical equivalence. Propagation adds new constraints which are logically redundant but may cause further simpl...
متن کاملParallelism, Concurreny and Distribution in Constraint Handling Rules: A Survey (Draft)
Constraint Handling Rules (CHR) is both an effective concurrent declarative programming language and a versatile computational logic formalism. CHR has its roots in constraint logic programming and concurrent constraint programming, but also integrates ideas from multiset transformation and rewriting systems. CHR programs consist of guarded reactive rules that transform multisets of constraints...
متن کاملOptimized Compilation of Multiset Rewriting with Comprehensions
We extend the rule-based, multiset rewriting language CHR with multiset comprehension patterns. Multiset compre-hension provides the programmer with the ability to write multiset rewriting rules that can match a variable number ofentities in the state. This enables implementing algorithms that coordinate large amounts of data or require aggregateoperations in a declarative way, and ...
متن کامل