Tabled Typeclass Resolution

01/13/2020
by   Daniel Selsam, et al.
0

Typeclasses provide an elegant and effective way of managing ad-hoc polymorphism in both programming languages and interactive proof assistants. However, the increasingly sophisticated uses of typeclasses within proof assistants has exposed two critical problems with existing typeclass resolution procedures: the diamond problem, which causes exponential running times in both theory and practice, and the cycle problem, which causes loops in the presence of cycles and so thwarts many desired uses of typeclasses. We present a new typeclass resolution procedure, called tabled typeclass resolution, that solves these problems. We have implemented our procedure for the upcoming version (v4) of the Lean Theorem Prover, and we confirm empirically that our implementation is exponentially faster than existing systems in the presence of diamonds. Our procedure is sufficiently lightweight that it could easily be implemented in other systems. We hope our new procedure facilitates even more sophisticated uses of typeclasses in both software development and interactive theorem proving.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/28/2020

Beyond Notations: Hygienic Macro Expansion for Theorem Proving Languages

In interactive theorem provers (ITPs), extensible syntax is not only cru...
research
06/19/2013

Structure Based Extended Resolution for Constraint Programming

Nogood learning is a powerful approach to reducing search in Constraint ...
research
04/17/2019

Towards Evolutionary Theorem Proving for Isabelle/HOL

Mechanized theorem proving is becoming the basis of reliable systems pro...
research
05/23/2011

Integrating Testing and Interactive Theorem Proving

Using an interactive theorem prover to reason about programs involves a ...
research
06/14/2011

Generating Schemata of Resolution Proofs

Two distinct algorithms are presented to extract (schemata of) resolutio...
research
08/22/2021

Custom-Tailored Clone Detection for IEC 61131-3 Programming Languages

Automated production systems (aPS) are highly customized systems that co...

Please sign up or login with your details

Forgot password? Click here to reset