Dépôt du be Ocaml 4IR
| .github/workflows | ||
| .vscode | ||
| circulation_input_graphs | ||
| graphs | ||
| src | ||
| .gitignore | ||
| .merlin | ||
| _tags | ||
| Makefile | ||
| README.md | ||
BE OCAML 4IR
Group
- SIMARD Yohan
- VERGNET Arnaud
Description
Ocaml project on Ford-Fulkerson. This project contains some simple configuration files to facilitate editing Ocaml in VSCode.
This project can compile 2 executables:
ftest.native, the base FF algorithm implementationcirculationtest.native, a circulation-demand problem solved by the use of the FF algorithm. The problem can be found on Wikipedia.
Use in VSCode
To use in VSCode, you should install the OCaml extension in VSCode. Other extensions might work as well but make sure there is only one installed.
Then open VSCode in the root directory of this repository.
Features :
- full compilation as VSCode build task (Ctrl+Shift+b)
- highlights of compilation errors as you type
- code completion
- automatic indentation on file save
Build and Run
A makefile provides some useful commands:
make buildto compile the base ff algorithm. This creates an ftest.native executablemake testto run theftestprogram without arguments (executes tests) and generate svg files for each tests. This uses thegraph1in thegraphsfolder and outputs in thetestfolder.make demoto run theftestprogram with some arguments and generate the final svg file. This uses graphs in thegraphsfolder and outputs in therunfolder.make build_circulationto compile the circulation-demand problem resolution. This creates a circulationtest.native executablemake demo_circulationto run thecirculationtestprogram with some arguments and generate the final svg file. This uses graphs in thecirculation_input_graphsfolder and outputs in therunfolder.make formatto indent the entire projectmake cleanto remove build artifacts
In case of trouble with the VSCode extension (e.g. the project does not build, there are strange mistakes), a common workaround is to (1) close vscode, (2) make clean, (3) make build and (4) reopen vscode.