1
0
Fork 0

fmt files

This commit is contained in:
Mylloon 2024-03-11 14:25:40 +01:00
parent 561aca4e05
commit e942f30703
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
4 changed files with 31 additions and 34 deletions

View file

@ -11,7 +11,6 @@ To realise this project you will implement a type inference
algorithm that works over terms of a programming language
for functional programming.
## Terms = Expressions = Programs
- [Term](./lib/term.mli) This module contains the syntax of
@ -21,7 +20,6 @@ for functional programming.
thanks to the constructors for application (`App`) and
for function definition (`Fun`).
## Aim of the project
The [third lecture]
@ -35,13 +33,14 @@ To realise this project you will have to implement the following modules:
1. [typeSubstitution](./lib/typeSubstituion.ml)
You must implement at least:
- [ ] `type t`, i.e. how to represent syntactic substitutions in memory,
- [ ] `val apply`, which applies a syntactic substitution to a type
- [ ] `val compose`, which computes the substitution obtained composing two given substitutions.
1. [unifcation](./lib/unification.ml)
You must implement at least:
- [ ] `val unify` which given two type `t1` and `t2`,
must compute the substitution `s` such that if
`unify t1 t2 = Some s` then `apply s t1 = apply s t2`.
@ -49,7 +48,6 @@ To realise this project you will have to implement the following modules:
You can of course use the Herbrand / Robinson algorithm
to start designing your implementation.
1. [inference](./lib/inference.ml)
You must implement at least:
- [ ] `val typeof`, which given a term `t` must compute either
@ -58,13 +56,11 @@ To realise this project you will have to implement the following modules:
You may add more definitions to each of these modules, and extend their signatures accordingly.
You may also create new compilation units (i.e. new `.ml` files).
1. You may, and *should*, extend the [testing module](./test/test_projet_pfa_23_24.ml) with additional
1. You may, and _should_, extend the [testing module](./test/test_projet_pfa_23_24.ml) with additional
tests, or replace it with a testing framework of your choice (using e.g. QCheck).
## PART II: Logistics of the project
## Fork
To realise your project and have it evaluated,
@ -79,11 +75,10 @@ Do it asap.
The final implementation must be in your fork by the
__ 30th of April 2024, 23h59 __
** 30th of April 2024, 23h59 **
Any code pushed to your fork after that time will be ignored.
## Requirements
### 1. Install OPAM
@ -93,9 +88,10 @@ is the recommended way to install the OCaml compiler and OCaml
packages.
The following should work for macOS and Linux:
````sh
```sh
bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
````
```
### Recommended: editor integration
@ -106,9 +102,10 @@ Emacs while [Merlin](https://github.com/ocaml/merlin) is an editor
service that provides modern IDE features for OCaml.
To install, run:
````sh
```sh
opam install tuareg merlin user-setup
````
```
#### VSCode: Ocaml LSP
@ -121,9 +118,10 @@ This extension requires
Protocol(LSP) implementation for OCaml
To install, run:
````sh
```sh
opam install ocaml-lsp-server
````
```
## Development environment setup
@ -134,7 +132,6 @@ $ opam switch create . --deps-only --with-doc --with-test
$ eval $(opam env)
```
## Build
To build the project, type:

View file

@ -1,3 +1,4 @@
(library
(name typeInference)
(preprocess (pps ppx_deriving.show ppx_deriving.ord ppx_deriving.eq)))
(preprocess
(pps ppx_deriving.show ppx_deriving.ord ppx_deriving.eq)))

View file

@ -4,4 +4,3 @@
- `Some ty`, if ty is the type of term `t`
*)
val typeof : Term.t -> Type.t option