Coinductive Soundness of Corecursive Type Class Resolution

  title={Coinductive Soundness of Corecursive Type Class Resolution},
  author={Frantisek Farka and E. Komendantskaya and K. Hammond},
Horn clauses and first-order resolution are commonly used to implement type classes in Haskell. Several corecursive extensions to type class resolution have recently been proposed, with the goal of allowing (co)recursive dictionary construction where resolution does not terminate. This paper shows, for the first time, that corecursive type class resolution and its extensions are coinductively sound with respect to the greatest Herbrand models of logic programs and that they are inductively… Expand
Proof-relevant Horn Clauses for Dependent Type Inference and Term Synthesis
It is shown that proof-relevant first-order resolution can play an important role in automating type inference and term synthesis for dependently typed languages. Expand
Coinduction in Uniform: Foundations for Corecursive Proof Search with Horn Clauses
Proof-theoretic, constructive and coal algebraic foundations for proof search in coinductive Horn clause theories are established and soundness of both proof systems is proven relative to a novel coalgebraic description of complete Herbrand models. Expand
Proof-Relevant Resolution for Elaboration of Programming Languages
This work describes a novel, proof-relevant approach to type inference and term synthesis in dependently types languages and shows how it allows for analysis of inductive and coinductive soundness of type class resolution. Expand
Logic programming: laxness and saturation
This work unifies lax semantics and saturated semantics, and further refine lax semantics to give finitary models of logic programs with existential variables, and to develop a precise semantic relationship between variables in logic programming and worlds in local state. Expand
Technical Communications of the 34th International Conference on Logic Programming, ICLP 2018, July 14-17, 2018, Oxford, United Kingdom
This work proposes adding a new construct to Epistemic Specifications called a world view constraint that provides a universal device for expressing global constraints in the various versions of the language. Expand


Proof Relevant Corecursive Resolution
It is shown that in fact cycle detection is a restricted form of coinductive proof, in which the atomic formula forming the cycle plays the role ofCoinductive hypothesis. Expand
Operational semantics of resolution and productivity in Horn clause logic
This paper proposes to take Howard’s System H as a type-theoretic semantic counterpart for Horn clause logic, and proves soundness of these abstract reduction systems relative to System H, and shows completeness of SLD-resolution and structural resolution relative to system H. Expand
Structural Resolution: a Framework for Coinductive Proof Search and Proof Construction in Horn Clause Logic
One algorithm combines the method of loop detection with productive structural resolution, thus guaranteeing productivity of coinductive proofs for infinite rational terms, and the other allows to make lazy sound observations of fragments of infinite irrational productive terms in ITP and TRS. Expand
Type classes in Haskell
A set of type inference rules for resolving overloading introduced by type classes, as used in the functional programming language Haskell, are defined, using second-order lambda calculus to record type information in the transformed program. Expand
On the origins of bisimulation and coinduction
The origins of bisimulation and bisimilarity are examined, in the three fields where they have been independently discovered: Computer Science, Philosophical Logic (precisely, Modal Logic), SetExpand
Productive corecursion in logic programming*
This paper proposes a method that semi-decides productivity of individual derivations for regular formulae and presents an implementation of this algorithm, the first algorithmic counterpart to the notion of productivity of derivations in logic programming. Expand
Co-Logic Programming: Extending Logic Programming with Coinduction
The theory and practice of co-logic programming is presented, a paradigm that combines both inductive and coinductive logic programming that has applications to rational trees, verifying infinitary properties, lazy evaluation, concurrent LP, model checking, bisimilarity proofs, etc. Expand
On the bright side of type classes: instance arguments in Agda
We present instance arguments: an alternative to type classes and related features in the dependently typed, purely functional programming language/proof assistant Agda. They are a new, general typeExpand
How to make ad hoc proof automation less ad hoc
This work proposes a novel approach to proof automation in Coq that allows the user to specify the behavior of custom automated routines in terms of Coq's own type system, and presents a series of design patterns for canonical structure programming that enable one to carefully and predictably coax coq's type inference engine into triggering the execution of user-supplied algorithms during unification. Expand
Proving correctness of imperative programs by linearizing constrained Horn clauses
A method for verifying the correctness of imperative programs which is based on the automated transformation of their specifications, and it is shown that several specifications that could not be proved valid by LA-solving methods, can be provedvalid after linearization. Expand