CoLF Logic Programming as Infinitary Proof Exploration
Chen, Pfenning
Logical Frameworks such as Automath [de Bruijn, 1968] or LF [Harper et al., 1993] were originally conceived as metalanguages for the specification of foundationally uncommitted deductive systems, yielding generic proof checkers. Their high level of abstraction was soon exploited to also express algorithms over deductive systems such as theorem provers, type-checkers, evaluators, compilers, proof transformers, etc. in the paradigm of computation-as-proof-construction. This has been realized in languages such as $λ$-Prolog [Miller et al., 1991] or Elf [Pfenning, 1991] based on backward chaining, and LolliMon [Lopez et al., 2005] or Celf [Schack-Nielsen and Schuermann, 2008], which integrated forward chaining. None of these early frameworks supported the direct expression of infinitary objects or proofs, which are available in the recently developed CoLF$^Ï$ [Chen, 2023]. In this work-in-progress report, we sketch an approach to computation-as-proof-construction over the first-order fragment of CoLF$^Ï$ (called CoLF$^Ï_1$ ) that already includes infinitary objects and proofs. A key idea is the interpretation of logic variables as communication channels and computation as concurrent message-passing. This is realized in a concrete compiler from CoLF$^Ï_1$ to Sax, a proof-theoretically inspired parallel programming language based on the proof-reduction in the semi-axiomatic sequent calculus [DeYoung et al., 2020].
academic
CoLF Logic Programming as Infinitary Proof Exploration
This paper explores the implementation of "computation as proof construction" on the first-order fragment of CoLF^ω (denoted CoLF^ω_1), which already incorporates infinite objects and proofs. The core idea interprets logical variables as communication channels and computation as concurrent message passing. This concept is realized through a concrete compiler implementation that compiles CoLF^ω_1 to Sax—a proof-theoretically inspired parallel programming language based on proof reduction in semi-axiomatic sequent calculus.
Limitations of Traditional Logical Frameworks: Early logical frameworks such as Automath and LF, while successfully implementing the "computation as proof construction" paradigm, do not directly support the expression of infinite objects or proofs.
Issues with Existing Implementations: Backtracking-based proof search faces multiple difficulties in infinite settings:
Termination problems when inputs are infinite
Interaction problems between infinite objects and backtracking (may never explicitly fail)
Unification algorithms guarantee termination only on rational (cyclic) terms, but many application objects or proofs are non-rational
Supporting Infinite Computation: A dynamic semantics is needed that can incrementally compute outputs from inputs, similar to transducers between streams.
Avoiding Backtracking: Static uniqueness checking ensures that each unique input has at most one proof, eliminating the need for backtracking.
Parallelization: Exploiting communication between shared variables to implement and-parallelism across multiple premises.
Proposed CoLF^ω_1 Logic Programming Language: Supports proofs with infinite term representations, backtracking-free proof construction, and parallel premise evaluation using shared logical variables for communication.
Innovative Computational Model: Interprets logical variables as communication channels and computation as concurrent message passing.
Compiler Implementation: A concrete compiler from CoLF^ω_1 to Sax.
Rich Example Systems: Implementations of complex relationships including stream processing, Fibonacci sequences, and integration operations.
Static uniqueness checking ensures that at each program point there is at most one possible action, eliminating the need for backtracking in traditional logic programming.
mult_s : mult A B C -> add B C D -> mult (s A) B D.
In the above multiplication definition, the two premises mult A B C and add B C D can be evaluated in parallel, communicating through shared variable C.
omega : conat = s omega.
main : stream = repeat omega.
Result:
(cons (s (s (s (s ...))))
(cons (s (s (s ...)))
(cons (s (s ...))
(cons (s ...)
(cons ...)))))
The paper cites important literature from logical frameworks, proof theory, and parallel computation, including:
de Bruijn's Automath system
Harper et al.'s LF framework
Miller et al.'s λ-Prolog
DeYoung et al.'s semi-axiomatic sequent calculus
Overall Assessment: This is an innovative theoretical computer science paper that introduces infinite object support to logical frameworks for the first time and proposes a novel concurrent computational model. While as a progress report it has room for improvement in theoretical depth, its core ideas and preliminary implementation open new research directions in this field.