Programming language for literate programming law specification
Go to file
Denis Merigoux 416fb4e3ff Typos
2020-03-25 15:47:27 +01:00
doc Typos 2020-03-25 15:47:27 +01:00
src Removed duplicated field struct 2020-03-16 10:06:41 +01:00
syntax_highlighting Changed language 2020-03-12 16:10:00 +01:00
test Revamped document for lawyers 2020-03-24 18:33:56 +01:00
.gitignore Removed merlin files 2019-09-19 16:37:16 +02:00
.ocamlformat Weaving to LaTeX 2020-03-07 18:20:04 -08:00
dune-project Added missing dependencies 2020-03-09 12:07:36 +01:00
lawspec.opam Added proper syntax highlighting + Utf8 support complete! 2020-03-09 19:14:06 +01:00
LICENSE.txt Code reorg 2019-09-04 10:32:33 +02:00
Makefile Added attempt at internal ast 2020-03-12 18:04:27 +01:00
README.md Instructions 2020-03-08 06:54:35 +01:00

Lawspec

Lawspec is a domain-specific language for deriving faithful-by-construction algorithms from legislative texts.

Installation

The project is distributed as a Dune artifact. Use standard dune commands to build and install the library. In particular, if you want to install the library as an opam package, use the following command at the root of the repository:

opam install ./

You can then can the compiler using the lawspec command.

Usage

Use lawspec --help to get more information about the command line options available.

Test

In the test folder, you will find the allocations_familiales.lsp file which contains the algorithm computing French family benefits. The algorithm consists of annotations to the legislative texts that define the family benetifs, using the literate programming paradigm. The lawspec compiler can extract from the .lsp file a lawyer-readable version of the annotated text. To get that lawyer-readable version (which is a LaTeX-created) PDF, use make test at the root of the repository, and then use make inside ghe test directory to compile the LaTeX file.

License

The library is released under the Apache license (version 2).