Published July 8, 2018 | Version v1

Artifact for Mtac2: Typed Tactics for Backward Reasoning in Coq

  • 1. MPI-SWS
  • 2. FAMAF, UNC and CONICET
  • 3. Delft University of Technology
  • 4. (IRIF, PPS, U. Paris Diderot and pi.r.2, Inria

Description

Coq supports a range of built-in tactics, which are engineered primarily to
support \emph{backward reasoning}.  Starting from a desired goal, the Coq programmer
can use these tactics to manipulate the proof state interactively, applying
axioms or lemmas to break the goal into subgoals until all subgoals have been
solved.  Additionally, it provides support for \emph{tactic programming}
via OCaml and Ltac, so that users can roll their own custom proof automation
routines.

Unfortunately, though, these tactic languages share a significant
weakness.  They do not offer the tactic programmer any static
guarantees about the soundness of their custom tactics, making large
tactic developments difficult to maintain.  To address this
limitation, Ziliani et al.\ previously proposed \textbf{Mtac}, a new
typed approach to custom proof automation in Coq which provides the
static guarantees that OCaml and Ltac are missing.  However, despite
its name, Mtac is really more of a metaprogramming language than it
is a full-blown tactic language: it misses an essential feature of
tactic programming, namely the ability to directly manipulate Coq's
proof state and perform backward reasoning on it.

In this paper, we present \textbf{Mtac2}, a next-generation version
of Mtac that combines its support for typed metaprogramming with
additional support for the programming of backward-reasoning tactics
in the style of Ltac.  In so doing, Mtac2 introduces a novel feature
in tactic programming languages---what we call \emph{typed backward
  reasoning}.  With this feature, Mtac2 is capable of statically
ruling out several classes of errors that would otherwise remain
undetected at tactic definition time.  We demonstrate the utility of
Mtac2's typed tactics by porting several tactics from a large Coq
development, the Iris Proof Mode, from Ltac to Mtac2.

Files

artifact78.zip

Files (1.8 GB)

Name Size
md5:9bca4ab8a1b71b57acb7ddae50d3721b
1.8 GB Download
md5:faaa9840f969a615afac1cf2bba66553
2.0 MB Preview Download
md5:062c788ae3e0653a6283c4e4b2d4ca71
12.5 kB Preview Download

Additional details

Related works

Is supplement to
10.1145/3236773 (DOI)