46 research outputs found
Logical Algorithms meets CHR: A meta-complexity result for Constraint Handling Rules with rule priorities
This paper investigates the relationship between the Logical Algorithms
language (LA) of Ganzinger and McAllester and Constraint Handling Rules (CHR).
We present a translation schema from LA to CHR-rp: CHR with rule priorities,
and show that the meta-complexity theorem for LA can be applied to a subset of
CHR-rp 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 CHR-rp that
gives strong complexity guarantees and results in a new and accurate
meta-complexity theorem for CHR-rp. It is furthermore shown that the
translation from Logical Algorithms to CHR-rp combined with the new CHR-rp
implementation, satisfies the required complexity for the Logical Algorithms
meta-complexity result to hold.Comment: To appear in Theory and Practice of Logic Programming (TPLP
Constraints in Non-Boolean Contexts
In high-level constraint modelling languages, constraints can occur in non-Boolean contexts: implicitly, in the form of partial functions, or more explicitly, in the form of constraints on local variables in non-Boolean expressions. Specifications using these facilities are often more succinct. However, these specifications are typically executed on solvers that only support questions of the form of existentially quantified conjunctions of constraints.
We show how we can translate expressions with constraints appearing in non-Boolean contexts into conjunctions of ordinary constraints. The translation is clearly structured into constrained type elimination, local variable lifting and partial function elimination. We explain our approach in the context of the modelling language Zinc. An implementation of it is an integral part of our Zinc compiler
Mergeable schedules for lazy matching
This paper presents a new data structure, based on circular linked lists and the union-find algorithm, for the purpose of incremental, lazy pattern matching for rule based languages, with storage of partial matches. Our approach consists of incrementally generating a schedule of matches. It extends previous work in that it allows merging of such schedules without increasing the overall complexity. Schedule merges are needed in the context of non-ground data. Therefore, our mergeable schedules can be used to implement matching for the Constraint Handling Rules (CHR) language. Our technique forms an alternative to the matching algorithm that is most commonly used by current CHR implementations and which does not keep track of partial matches, but does keep a history of rule firings.nrpages: 51status: publishe
Execution Control for Constraint Handling Rules (Uitvoeringscontrole voor Constraint Handling Rules)
Constraint Programming (CP) is een hoog-niveau declaratief programmeerparadigma waarbij problemen gemodelleerd worden door middel van constraints (beperkingen) op de probleemvariabelen waaraan alle oplossingen moeten voldoen. Vele problemen van hoge praktische relevantie kunnen eenvoudig beschreven worden via constraints. Zo zijn er toepassingen te vinden in onder andere productieplanning en het opstellen van dienstroosters voor personeel. Een constraint programming systeem omvat een constraint solver. Deze heeft als taak waarderingen voor de probleemvariabelen te vinden die aan alle constraints voldoen.Constraint Programming systemen worden traditioneel opgedeeld op basis van het domein van de variabelen en het type van de ondersteunde constraints. Vele praktische problemen zijn echter moeilijk te modelleren in termen van de standaard constraintdomeinen. Daarom zijn er langs de ene kant systemen ontwikkeld voor meer gespecialiseerde domeinen. Langs de andere kant zijn er faciliteiten ontwikkeld die het eenvoudiger maken om gespecialiseerde constraint solvers te implementeren. Voorbeelden daarvan zijn geattribueerde variabelen en Constraint Handling Rules.Constraint Handling Rules (CHR) is een regelgebaseerde taal, ontworpen voor de implementatie van gespecialiseerde constraint solvers. CHR is een zeer flexibele taal voor de specificatie van de logica van een constraint solver. Flexibele uitvoeringscontrole ontbreekt echter bijna volledig. Uitvoeringscontrole is van fundamenteel belang voor de efficiëntie van CP systemen. Tot dusver is hier echter binnen de context van CHR nauwelijks aandacht aan besteed. In dit proefschrift presenteren we een oplossing voor het probleem van uitvoeringscontrole in CHR. In het bijzonder breiden we CHR uit met hoog-niveau faciliteiten om de specificatie van uitvoeringsstrategieëen te ondersteunen.Meer specifiek breiden we CHR uit met gebruikersgedefinieerde regelprioriteiten, tot CHR-rp. CHR regels komen overeen met constraint propagatoren, en regelprioriteiten maken dus de specificatie van propagatiestrategieën mogelijk. Een geoptimaliseerde implementatie van CHR-rp wordt voorgesteld en empirisch geëvalueerd. Vervolgens breiden we CHR uit met faciliteiten voor de controle van de zoekstrategie. Onze aanpak combineert CHR-or (CHR met disjunctie) en CHR-rp tot een nieuwe taal, CHR-or-brp genaamd, waarin de propagatiestrategie bepaald is d.m.v. regelprioriteiten, en de zoekstrategie d.m.v. vertakkingsprioriteiten. We stellen een raamwerk voor de analyse van de tijdscomplexiteit van CHR-rp programma's voor, door het Logical Algorithms raamwerk (LA) van Ganzinger en McAllester te combineren met CHR-rp. We presenteren vertalingsschema's van en naar LA en stellen een alternatieve implementatie voor CHR-rp voor, die sterke complexiteitsgaranties biedt. Tenslotte onderzoeken we het join order optimalisatieprobleem, hetgeen een belangrijk deel is van geoptimaliseerde CHR compilatie. We presenteren een kostenmodel voor het matchen met meerhoofdige regels, evenals benaderingen voor zijn parameters en methodes om een optimale join order te vinden. Een uitbreiding van het kostenmodel voor CHR-rp wordt gegeven.status: publishe
Improvements on the applicability of nonlinear constraint solvers
Nonlinear constraints over the real numbers appear in many application domains, like chemistry, economics or computer graphics. Their use in Constraint Logic Programming environments have thusfar been quite limited, because of a combination of performance issues and commercial considerations. This research aims at improving the practical applicability of nonlinear constraints in a CLP environment. We focus in particular on interval-based constraint solving techniques. This paper presents our research goals, our current results and ideas for future work.status: publishe
Features — Control structures Flexible Search Strategies in Prolog CHR
We extend the refined operational semantics of the Constraint Handling Rules language to support the implementation of different search strategies. Such search strategies are necessary to build efficient Constraint Logic Programming systems. This semantics is then further refined so that it is more suitable as a basis for a trailing based implementation. We propose a source to source transformation to implement breadth first search in CHR with Prolog as a host language. Breadth first is chosen because it exhibits the main difficulties in the implementation of search strategies, while being easy to understand. We evaluate our implementation on some benchmarks and give directions for future work