Skip to content
/ CADL Public

My bachelor thesis: a compiler from Datalog rules to OCaml type checker (standard or incremental)

License

Notifications You must be signed in to change notification settings

halykoss/CADL

Repository files navigation

CADL

My bachelor thesis: a compiler from Datalog rules to OCaml type checker (standard or incremental)

Table of contents

General info

The aim of CADL is to simplify the writing of a type checker (standard or incremental). You can input Datalog rules and CADL will output an OCaml type checker.

Requirements

CADL needs:

  • OCaml : 4.08.1
  • Dune : 2.7.1
  • OUnit2 : 2.2.3

Setup

To run this project you need to install:

apt install ocaml-nox # If you don't want X11 support.
apt install ocaml
add-apt-repository ppa:avsm/ppa
apt update
apt install opam
$ opam install dune
$ opam install ounit2
$ make

To clean the project tree:

$ make clean

How to use it?

You can generate a standard type checker with:

$ ./cadl <input-file>

examples for <input-file> are samples/input.pl and samples/spi.pl.

The compiled code will be located in 'generated.ml' file, inside 'generated/' module.

You can run your tests with:

$ ./cadl <input-file> -t <path-to-test-file-ml>

If you want to generate a module for Incremental Type Checking of MinCaml, you need to run:

$ ./cadl <input-file> -i

examples of working CADL generated module are Pierce and Spi calculus.

License

GNU GENERAL PUBLIC LICENSE © Federico Pennino

About

My bachelor thesis: a compiler from Datalog rules to OCaml type checker (standard or incremental)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published