ComputerAidedLL / click-and-collect

A web interactive tool for building proofs in the sequent calculus of Linear Logic, with its backend written in OCaml
GNU Lesser General Public License v2.1
17 stars 2 forks source link

C1ick ⅋ c⊗LLec⊥

The repository contains frontend and backend code for an online interactive sequent prover for linear logic.

Technical information and roadmap

Some information is available in the wiki.

Install

Build using opam

Now you can visit http://localhost:3000 and play with click-and-collect.

Make proof sharing work

To compress/uncompress json we use LZMA algorithm. The code calls unix commands lzma and unlzma. Install them by installing liblzma-dev package:

sudo apt-get install liblzma-dev

Make LaTeX export work

If you don't have LaTeX environment installed on your machine (or your server), you can proceed as following to make LaTeX export work.

Deploy on server

Same as local dev, except that we need to proxy port 3000 by nginx (or Apache).

Use

URL parmaters

Example: A minimal interactive A*A^,A|A^ sequent -> http://localhost:3000/?s=A*A%5E%2CA%7CA%5E+&proofTransformation=0&cutMode=0&autoReverse=0&n=0&exportButtons=0&checkProvability=0

Contribute

Modify Coq nanoyalla package

Whenever a file in nanoyalla/ directory package is modified, nanoyalla version should be incremented that way:

  1. Increment version in nanoyalla/README.md.
  2. Increment version in export_as_coq.ml, in header printed in generated files.
  3. Zip nanoyalla/ directory: rm -f static/download/nanoyalla.zip && zip -r static/download/nanoyalla.zip nanoyalla/

Modify parser

Do not modify ll_parser.mli or ll_parser.ml neither ll_lexer.mll, but just ll_parser.mly and ll_lexer.mll and then run

ocamllex ll_lexer.mll && ocamlyacc ll_parser.mly

Test

Test API

There are some API tests in test/api_test.ml, which uses test data in api_test_data.json. It calls API and checks its response.

First time:

opam install alcotest

First time and whenever you change test script (no need if you change only the json file):

ocamlfind ocamlc -thread -linkpkg -package alcotest -package lwt -package cohttp -package cohttp-lwt-unix -package threads -package yojson -package str -o test/api_test test/api_test.ml

To execute tests (you need to have make test.byte running):

test/api_test

Test Coq

To check that Coq files returned by API actually compile, we have some examples of proof as json object in test/proof_test_data. Some additional Coq files can be checked to compile in test/coq_test_data.

To execute tests (you need to have make test.byte running):

test/coq_test.sh

Test LaTeX

To check that LaTeX files returned by API actually compile, we have some examples of proof as json object in test/proof_test_data.

To execute tests (you need to have make test.byte running):

test/latex_test.sh

Tribute

This tool design was mainly inspired by Logitext (GitHub).