568 research outputs found
Type Inference for Guarded Recursive Data Types
We consider type inference for guarded recursive data types (GRDTs) -- a
recent generalization of algebraic data types. We reduce type inference for
GRDTs to unification under a mixed prefix. Thus, we obtain efficient type
inference. Inference is incomplete because the set of type constraints allowed
to appear in the type system is only a subset of those type constraints
generated by type inference. Hence, inference only succeeds if the program is
sufficiently type annotated. We present refined procedures to infer types
incrementally and to assist the user in identifying which pieces of type
information are missing. Additionally, we introduce procedures to test if a
type is not principal and to find a principal type if one exists
Incremental Satisfiability and Implication for UTVPI Constraints
Unit two-variable-per-inequality (UTVPI) constraints form one of the largest
class of integer constraints which are polynomial time solvable (unless P=NP).
There is considerable interest in their use for constraint solving, abstract
interpretation, spatial databases, and theorem proving. In this paper we
develop a new incremental algorithm for UTVPI constraint satisfaction and
implication checking that requires O(m + n log n + p) time and O(n+m+p) space
to incrementally check satisfiability of m UTVPI constraints on n variables and
check implication of p UTVPI constraints.Comment: 14 pages, 1 figur
The Chameleon Type Debugger (Tool Demonstration)
In this tool demonstration, we give an overview of the Chameleon type
debugger. The type debugger's primary use is to identify locations within a
source program which are involved in a type error. By further examining these
(potentially) problematic program locations, users gain a better understanding
of their program and are able to work towards the actual mistake which was the
cause of the type error. The debugger is interactive, allowing the user to
provide additional information to narrow down the search space. One of the
novel aspects of the debugger is the ability to explain erroneous-looking
types. In the event that an unexpected type is inferred, the debugger can
highlight program locations which contributed to that result. Furthermore, due
to the flexible constraint-based foundation that the debugger is built upon, it
can naturally handle advanced type system features such as Haskell's type
classes and functional dependencies.Comment: In M. Ronsse, K. De Bosschere (eds), proceedings of the Fifth
International Workshop on Automated Debugging (AADEBUG 2003), September 2003,
Ghent. cs.SE/030902
Unsatisfiable Cores and Lower Bounding for Constraint Programming
Constraint Programming (CP) solvers typically tackle optimization problems by
repeatedly finding solutions to a problem while placing tighter and tighter
bounds on the solution cost. This approach is somewhat naive, especially for
soft-constraint optimization problems in which the soft constraints are mostly
satisfied. Unsatisfiable-core approaches to solving soft constraint problems in
SAT (e.g. MAXSAT) force all soft constraints to be hard initially. When solving
fails they return an unsatisfiable core, as a set of soft constraints that
cannot hold simultaneously. These are reverted to soft and solving continues.
Since lazy clause generation solvers can also return unsatisfiable cores we can
adapt this approach to constraint programming. We adapt the original MAXSAT
unsatisfiable core solving approach to be usable for constraint programming and
define a number of extensions. Experimental results show that our methods are
beneficial on a broad class of CP-optimization benchmarks involving soft
constraints, cardinality or preferences
RAIRE: Risk-Limiting Audits for IRV Elections
Risk-limiting post election audits guarantee a high probability of correcting
incorrect election results, independent of why the result was incorrect.
Ballot-polling audits select ballots at random and interpret those ballots as
evidence for and against the reported result, continuing this process until
either they support the recorded result, or they fall back to a full manual
recount. For elections with digitised scanning and counting of ballots, a
comparison audit compares randomly selected digital ballots with their paper
versions. Discrepancies are referred to as errors, and are used to build
evidence against or in support of the recorded result. Risk-limiting audits for
first-past-the-post elections are well understood, and used in some US
elections. We define a number of approaches to ballot-polling and comparison
risk-limiting audits for Instant Runoff Voting (IRV) elections. We show that
for almost all real elections we found, we can perform a risk-limiting audit by
looking at only a small fraction of the total ballots (assuming no errors were
made in the tallying and distribution of votes)
Type Classes and Constraint Handling Rules
Type classes are an elegant extension to traditional, Hindley-Milner based
typing systems. They are used in modern, typed languages such as Haskell to
support controlled overloading of symbols. Haskell 98 supports only
single-parameter and constructor type classes. Other extensions such as
multi-parameter type classes are highly desired but are still not officially
supported by Haskell. Subtle issues arise with extensions, which may lead to a
loss of feasible type inference or ambiguous programs. A proper logical basis
for type class systems seems to be missing. Such a basis would allow extensions
to be characterised and studied rigorously. We propose to employ Constraint
Handling Rules as a tool to study and develop type class systems in a uniform
way.Comment: 14 pages, Workshop on Rule-Based Constraint Reasoning and Programming
(http://www.informatik.uni-muenchen.de/~fruehwir/cl2000r.html
Towards Computing Victory Margins in STV Elections
The Single Transferable Vote (STV) is a system of preferential voting
employed in multi-seat elections. Each vote cast by a voter is a (potentially
partial) ranking over a set of candidates. No techniques currently exist for
computing the margin of victory (MOV) in STV elections. The MOV is the smallest
number of vote manipulations (changes, additions, and deletions) required to
bring about a change in the set of elected candidates. Knowledge of the MOV of
an election gives greater insight into both how much time and money should be
spent on the auditing of the election, and whether uncovered mistakes (such as
ballot box losses) throw the election result into doubt---requiring a costly
repeat election---or can be safely ignored. In this paper, we present
algorithms for computing lower and upper bounds on the MOV in STV elections. In
small instances, these algorithms are able to compute exact margins.Comment: 24 pages, 4 figures, 9 table
Unsatisfiable Cores for Constraint Programming
Constraint Programming (CP) solvers typically tackle optimization problems by
repeatedly finding solutions to a problem while placing tighter and tighter
bounds on the solution cost. This approach is somewhat naive, especially for
soft-constraint optimization problems in which the soft constraints are mostly
satisfied. Unsatisfiable-core approaches to solving soft constraint problems in
Boolean Satisfiability (e.g. MAXSAT) force all soft constraints to hold
initially. When solving fails they return an unsatisfiable core, as a set of
soft constraints that cannot hold simultaneously. Using this information the
problem is relaxed to allow certain soft constraint(s) to be violated and
solving continues. Since Lazy Clause Generation (LCG) solvers can also return
unsatisfiable cores we can adapt the MAXSAT unsatisfiable core approach to CP.
We implement the original MAXSAT unsatisfiable core solving algorithms WPM1,
MSU3 in a state-of-the-art LCG solver and show that there exist problems which
benefit from this hybrid approach.Comment: Submitted to CP201
Logic Programming with Satisfiability
This paper presents a Prolog interface to the MiniSat satisfiability solver.
Logic program- ming with satisfiability combines the strengths of the two
paradigms: logic programming for encoding search problems into satisfiability
on the one hand and efficient SAT solving on the other. This synergy between
these two exposes a programming paradigm which we propose here as a logic
programming pearl. To illustrate logic programming with SAT solving we give an
example Prolog program which solves instances of Partial MAXSAT.Comment: 8 pages, 3 figures, 1 tabl
A Complete Refinement Procedure for Regular Separability of Context-Free Languages
Often, when analyzing the behaviour of systems modelled as context-free
languages, we wish to know if two languages overlap. To this end, we present an
effective semi-decision procedure for regular separability of context-free
languages, based on counter-example guided abstraction refinement. We propose
two refinement methods, one inexpensive but incomplete, and the other complete
but more expensive. We provide an experimental evaluation of this procedure,
and demonstrate its practicality on a range of verification and
language-theoretic instances
- …