# Coinductive Soundness of Corecursive Type Class Resolution

@inproceedings{Farka2016CoinductiveSO, title={Coinductive Soundness of Corecursive Type Class Resolution}, author={Frantisek Farka and E. Komendantskaya and K. Hammond}, booktitle={LOPSTR}, year={2016} }

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

#### Topics from this paper

#### 5 Citations

Proof-relevant Horn Clauses for Dependent Type Inference and Term Synthesis

- Computer Science, Mathematics
- Theory and Practice of Logic Programming
- 2018

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

- Computer Science
- ESOP
- 2019

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

- Computer Science
- ICLP
- 2018

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

- Mathematics, Computer Science
- J. Log. Algebraic Methods Program.
- 2018

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

- Computer Science
- ICLP
- 2018

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

#### References

SHOWING 1-10 OF 21 REFERENCES

Proof Relevant Corecursive Resolution

- Computer Science, Mathematics
- FLOPS
- 2016

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

- Computer Science, Mathematics
- Formal Aspects of Computing
- 2016

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

- Mathematics, Computer Science
- ArXiv
- 2015

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

- Computer Science
- TOPL
- 1996

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

- Computer Science
- TOPL
- 2009

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), Set… Expand

Productive corecursion in logic programming*

- Computer Science, Mathematics
- Theory and Practice of Logic Programming
- 2017

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

- Mathematics, Computer Science
- ICALP
- 2007

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

- Computer Science
- ICFP '11
- 2011

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 type… Expand

How to make ad hoc proof automation less ad hoc

- Computer Science
- ICFP '11
- 2011

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

- Computer Science
- Theory and Practice of Logic Programming
- 2015

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