TY - JOUR
T1 - Constraint Lingo
T2 - Towards high-level constraint programming
AU - Finkel, Raphael
AU - Marek, Victor W.
AU - Truszczyński, Miroslaw
PY - 2004/12
Y1 - 2004/12
N2 - Logic programming requires that the programmer convert a problem into a set of constraints based on predicates. Choosing the predicates and introducing appropriate constraints can be intricate and error prone. If the problem domain is structured enough, we can let the programmer express the problem in terms of more abstract, higher-level constraints. A compiler can then convert the higher-level program into a logic-programming formalism. The compiler writer can experiment with alternative low-level representations of the higher-level constraints in order to achieve a high-quality translation. The programmer can then take advantage of both a reduction in complexity and an improvement in runtime speed for all problems within the domain. We apply this analysis to the domain of tabular constraint-satisfaction problems. Examples of such problems include logic puzzles solvable on a hatch grid and combinatorial problems such as graph coloring and independent sets. The proper abstractions for these problems are rows, columns, entries, and their interactions. We present a higher-level language, Constraint Lingo, dedicated to problems in this domain. We also describe how we translate programs from Constraint Lingo into lower-level logic formalisms such as the logic of propositional schemata. These translations require that we choose among competing lower-level representations in order to produce efficient results. The overall effectiveness of our approach depends on the appropriateness of Constraint Lingo, our ability to translate Constraint Lingo programs into high-quality representations in logic formalisms, and the efficiency with which logic engines can compute answer sets. We comment on our computational experience with these tools in solving both graph problems and logic puzzles.
AB - Logic programming requires that the programmer convert a problem into a set of constraints based on predicates. Choosing the predicates and introducing appropriate constraints can be intricate and error prone. If the problem domain is structured enough, we can let the programmer express the problem in terms of more abstract, higher-level constraints. A compiler can then convert the higher-level program into a logic-programming formalism. The compiler writer can experiment with alternative low-level representations of the higher-level constraints in order to achieve a high-quality translation. The programmer can then take advantage of both a reduction in complexity and an improvement in runtime speed for all problems within the domain. We apply this analysis to the domain of tabular constraint-satisfaction problems. Examples of such problems include logic puzzles solvable on a hatch grid and combinatorial problems such as graph coloring and independent sets. The proper abstractions for these problems are rows, columns, entries, and their interactions. We present a higher-level language, Constraint Lingo, dedicated to problems in this domain. We also describe how we translate programs from Constraint Lingo into lower-level logic formalisms such as the logic of propositional schemata. These translations require that we choose among competing lower-level representations in order to produce efficient results. The overall effectiveness of our approach depends on the appropriateness of Constraint Lingo, our ability to translate Constraint Lingo programs into high-quality representations in logic formalisms, and the efficiency with which logic engines can compute answer sets. We comment on our computational experience with these tools in solving both graph problems and logic puzzles.
KW - Constraint satisfaction
KW - Logic programming
KW - Logic puzzles
KW - Tabular constraint satisfaction
UR - http://www.scopus.com/inward/record.url?scp=10444280031&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=10444280031&partnerID=8YFLogxK
U2 - 10.1002/spe.623
DO - 10.1002/spe.623
M3 - Article
AN - SCOPUS:10444280031
SN - 0038-0644
VL - 34
SP - 1481
EP - 1504
JO - Software - Practice and Experience
JF - Software - Practice and Experience
IS - 15
ER -