Coalgebraic Logic Programming for Type Inference

  • Power, John (PI)

Project: Research council

Project Details

Description

The main goal of typing is to prevent the occurrence of execution errors during the running of a program. Milner formalised the idea, showing that ``well-typed programs cannot go wrong''. In practice, type structures provide a fundamental technique of reducing programmer errors. At their strongest, they cover most of the properties of interest to the verification community. A major trend in the development of functional languages is improvement in expressiveness of the underlying type system, e.g., in terms of Dependent Types, Type Classes, Generalised Algebraic Types (GADTs), Dependent Type Classes and Canonical Structures. Milner-style decidable type inference does not always suffice for such extensions (e.g. the principal type may no longer exist), and deciding well-typedness sometimes requires computation additional to compile-time type inference. Implementations of new type inference algorithms include a variety of first-order decision procedures, notably Unification and Logic Programming (LP), Constraint LP, LP embedded into interactive tactics (Coq's eauto), and LP supplemented by rewriting. Recently, a strong claim has been made by Gonthier et al that, for richer type systems, LP-style type inference is more efficient and natural than traditional tactic-driven proof development. A second major trend is parallelism: the absence of side-effects makes it easy to evaluate sub-expressions in parallel. Powerful abstraction mechanisms of function composition and higher-order functions play important roles in parallelisation. Three major parallel languages are Eden (explicit parallelism) Parallel ML (implicit parallelism) and Glasgow parallel Haskell (semi-explicit parallelism). Control parallelism in particular distinguishes functional languages. Type inference and parallelism are rarely considered together in the literature. As type inference becomes more sophisticated and takes a bigger role in the overall program development, sequential type inference is bound to become a bottle-neck for language parallelisation. Our new Coalgebraic Logic Programming (CoALP) offers both extra expressiveness (corecursion) and parallelism in one algorithm. We propose to use CoALP in place of LP tools currently used in type inference. With the mentioned major developments in Corecursion, Parallelism, and Typeful (functional) programming it has become vital for these disjoint communities to combine their efforts: enriched type theories rely more and more on the new generation of LP languages; coalgebraic semantics has become influential in language design; and parallel dialects of languages have huge potential in applying common techniques across the FP/LP programming paradigm. This project is unique in bringing together local and international collaborators working in the three communities. The number of supporters the project has speaks better than words about the timeliness of our agenda. The project will impact on two streams of EPSRC's strategic plan: Programming Languages and Compilers; and; Verification and Correctness. The project is novel in aspects of Theory (coalgebraic study of (co)recursive computations arising in automated proof-search); Practice (implementation of the new language CoALP and its embedding in type-inference tools); and Methodology (Mixed corecursion and parallelism).
StatusFinished
Effective start/end date1/09/1331/01/17

Funding

  • Engineering and Physical Sciences Research Council

Fingerprint Explore the research topics touched on by this project. These labels are generated based on the underlying awards/grants. Together they form a unique fingerprint.

  • Research Output

    • 3 Article
    • 1 Conference contribution

    Category theoretic semantics for theorem proving in logic programming: embracing the laxness

    Komendantskaya, E. & Power, J., 4 Jun 2016, Proceedings of Coalgebraic Methods in Computer Science: 13th IFIP WG 1.3 International Workshop, CMCS 2016, Colocated with ETAPS 2016, Eindhoven, The Netherlands, April 2-3, 2016, Revised Selected Papers. Hasuo, I. (ed.). Springer, p. 94-113 20 p. (Lecture Notes in Computer Science).

    Research output: Chapter in Book/Report/Conference proceedingConference contribution

    Open Access
    File
  • 1 Citation (Scopus)
    123 Downloads (Pure)

    Coalgebraic logic programming: from semantics to implementation

    Komendantskaya, E., Power, J. & Schmidt, M., Apr 2016, In : Journal of Logic and Computation. 26, 2, p. 745 - 783 39 p.

    Research output: Contribution to journalArticle

    Open Access
    File
  • 3 Citations (Scopus)
    135 Downloads (Pure)

    A graphical foundation for interleaving in game semantics

    McCusker, G., Power, J. & Wingfield, C., 1 Apr 2015, In : Journal of Pure and Applied Algebra. 219, 4, p. 1131-1174 44 p.

    Research output: Contribution to journalArticle

    Open Access
    File
  • 127 Downloads (Pure)