[Paper Review] Essence' Description
This paper presents Essence', a constraint modelling language designed for specifying NP-hard decision problems, particularly constraint satisfaction problems (CSPs) like Sudoku. It enables users to declaratively define variables and constraints without procedural logic, with Savile Row as its primary solver. The key contribution is a formal, strongly-typed, finite-domain language that supports complex constraints, matrix indexing, and robust handling of partial functions through semantic normalization and default-value substitution.
A description of the Essence' language as used by the tool Savile Row.
Motivation & Objective
- To define a formal, declarative language for specifying NP-hard decision problems, particularly constraint satisfaction problems (CSPs).
- To support the modeling of complex combinatorial problems such as Sudoku using a high-level, human-readable syntax.
- To provide a strongly-typed, finite-domain language that ensures type safety and enables automated verification of models.
- To handle partial functions (e.g., division, matrix indexing) in a way that preserves logical correctness and enables model simplification.
- To separate problem models from specific instances via parameterized models and external parameter files.
Proposed method
- Define a constraint satisfaction problem (CSP) as a tuple ⟨X, D, C⟩, where X is a set of decision variables, D is a set of finite domains, and C is a conjunction of constraints.
- Use the 'find' statement to declare decision variables, such as matrices indexed over integer ranges with specified domains.
- Express constraints using quantifiers (e.g., forAll) and relational operators (e.g., !=, <=) over variables and their domains.
- Handle partial functions (e.g., division, matrix indexing) by introducing a boolean guard (e.g., Y!=0 for X/Y) and replacing undefined cases with default values (e.g., 0).
- Apply two-step normalization: first, insert domain checks as logical preconditions; second, replace partial functions with total functions that return defaults for invalid inputs.
- Use operator precedence rules (e.g., ** is right-associative, unary minus has higher precedence than **) to ensure unambiguous expression evaluation.
Experimental results
Research questions
- RQ1How can a constraint modelling language be designed to declaratively specify NP-hard decision problems without procedural logic?
- RQ2What mechanisms are needed to ensure type safety and domain correctness in a high-level constraint language?
- RQ3How can partial functions (e.g., division by zero, out-of-bound matrix access) be handled consistently and semantically in constraint models?
- RQ4What transformation pipeline enables simplification and optimization of constraint models while preserving logical equivalence?
- RQ5How can a single model be reused for multiple problem instances through parameterization?
Key findings
- Essence' supports the specification of CSPs using declarative constructs such as 'find' for decision variables and 'forAll' for quantified constraints.
- The language is strongly typed and finite-domain, ensuring that all expressions and variables are checked for type correctness at compile time.
- Partial functions like division and matrix indexing are handled by introducing a boolean guard (e.g., Y!=0) and replacing undefined cases with default values (e.g., 0), enabling model simplification.
- After normalization, syntactically identical expressions (e.g., x/y = x/y) can be safely simplified to 'true' because undefined cases are eliminated.
- The language supports complex data structures such as matrices with indexed domains, enabling natural modeling of grid-based problems like Sudoku.
- The separation of model and instance via parameter files allows a single Essence' model to solve multiple problem instances by changing only the parameter values.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.