67,323 research outputs found
Solving Functional Constraints by Variable Substitution
Functional constraints and bi-functional constraints are an important
constraint class in Constraint Programming (CP) systems, in particular for
Constraint Logic Programming (CLP) systems. CP systems with finite domain
constraints usually employ CSP-based solvers which use local consistency, for
example, arc consistency. We introduce a new approach which is based instead on
variable substitution. We obtain efficient algorithms for reducing systems
involving functional and bi-functional constraints together with other
non-functional constraints. It also solves globally any CSP where there exists
a variable such that any other variable is reachable from it through a sequence
of functional constraints. Our experiments on random problems show that
variable elimination can significantly improve the efficiency of solving
problems with functional constraints
Refinement Type Inference via Horn Constraint Optimization
We propose a novel method for inferring refinement types of higher-order
functional programs. The main advantage of the proposed method is that it can
infer maximally preferred (i.e., Pareto optimal) refinement types with respect
to a user-specified preference order. The flexible optimization of refinement
types enabled by the proposed method paves the way for interesting
applications, such as inferring most-general characterization of inputs for
which a given program satisfies (or violates) a given safety (or termination)
property. Our method reduces such a type optimization problem to a Horn
constraint optimization problem by using a new refinement type system that can
flexibly reason about non-determinism in programs. Our method then solves the
constraint optimization problem by repeatedly improving a current solution
until convergence via template-based invariant generation. We have implemented
a prototype inference system based on our method, and obtained promising
results in preliminary experiments.Comment: 19 page
Liquid Intersection Types
We present a new type system combining refinement types and the
expressiveness of intersection type discipline. The use of such features makes
it possible to derive more precise types than in the original refinement
system. We have been able to prove several interesting properties for our
system (including subject reduction) and developed an inference algorithm,
which we proved to be sound.Comment: In Proceedings ITRS 2014, arXiv:1503.0437
Constraint Handling Rules with Binders, Patterns and Generic Quantification
Constraint Handling Rules provide descriptions for constraint solvers.
However, they fall short when those constraints specify some binding structure,
like higher-rank types in a constraint-based type inference algorithm. In this
paper, the term syntax of constraints is replaced by -tree syntax, in
which binding is explicit; and a new generic quantifier is introduced,
which is used to create new fresh constants.Comment: Paper presented at the 33nd International Conference on Logic
Programming (ICLP 2017), Melbourne, Australia, August 28 to September 1, 2017
16 pages, LaTeX, no PDF figure
- …