Formal-Systems-Laboratory / matching-logic-mm0

Formalisation of Matching Logic in Metamath 0
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Matching Logic in Metamath Zero

This repository represents our efforts to capture the full extent of Applicative Matching Logic in Metamath Zero as well as an axiomatization of the theory of Regular Expressions in Matching Logic.

Moreover, the repository includes a decision procedure that is able to generate machine checkable Metamath Zero proofs for the totality of any regular expression (for now only over a signature composed of two letters: a and b) in Maude thanks to a technique based on Brzozowski derivatives.

Requirements and Installation

All the installation instructions are with respect to a Unix based system. For other operating systems these instructions would have to be adapted.

The minimum requirement to compile and verify the core theory mm0/mm1 files is an installation of the Metamath Zero toolchain (specifically mm0-c and mm0-rs). If the user doesn’t have these tools installed, they can be easily built inside this repository by following the instructions below, provided that the user has the following requirements:

Additionally, in order to run the proof generation procedure, the following need to be installed:

The easiest way to install all the tools and requirements of the project is by running:

./install.sh

If installing on a Mac, run instead ./install.sh macOS

This includes building the Metamath Zero toolchain under this repository, installing required Python modules in a virtual environment via Poetry and selecting an appropriate Maude binary to use.

Running the Test Suite

To make sure that everything works correctly, we encourage users to try running the test suite for this project. Doing this is as simple as running:

./test

Note: Since some tests take a long time to complete we recommend that users first run ./test --skip-slow instead, in order to skip the very slow tests.

If any failure occurs, please report this on the Issues page of this repository.

Project Overview

Here we will provide a brief overview of the main files composing this project.

Files with the extension mm0 are spec files and provide the axiomatization of our theories. They form the trust base of our formalisation. All axioms and definitions reside in these files. Files with the extension mm1, on the other hand, contain proofs of theorems and automations that make use of the axioms and inference rules described in the mm0 files. These need not be trusted. They are compiled down to mmb files which are the binary proof format that the core Metamath Zero checker, mm0-c operates on.

The main decision procedure generating the proofs for regular expressions can be found in regexp-proof-gen.maude.

[^1]: If the user doesn’t have Maude installed on their system, appropriate Maude binaries are provided inside this repository for Linux and macOS distributions (see installation instructions below).

[^2]: Poetry can be installed by running the following command:

      curl -sSL https://install.python-poetry.org | python3 -