diff --git a/README.md b/README.md index bf285c6560d9a90c06877349e3191f6835aa3cb5..33f6fec1141025bb921d6ed65b3ed4a57f7cd6ec 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ This repository contains the code for the mini-projects of the 2022 session of t ### Development environment With nix installed, simply type nix develop. This provides an environment -with all the necessary tools and libraries, including dune, merlin and dolmen. +with all the necessary tools and libraries, including dune, merlin, dolmen and minisat. -### Build +### Building -Please use dune package management (dune build, etc). +P Building is done through opam. Please follow the per-project building instructions. diff --git a/flake.nix b/flake.nix index 3af4631aaf140cde74aff7dc40c7a62ddcf4979c..2850f38fbde4f550890186fabe7df9e3dabc3b18 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,8 @@ dune_2 ocaml-lsp dolmen - merlin + merlin + pkgs.minisat ]; }; }); diff --git a/project1/README.md b/project1/README.md new file mode 100644 index 0000000000000000000000000000000000000000..eea6fa50db529bbe094ddf0a0fb1fa29442fccf2 --- /dev/null +++ b/project1/README.md @@ -0,0 +1,12 @@ +# Mini project 1 + +This project includes XOR-SAT, Horn-SAT, a random formula generator and benchmark tests. + +### Usage + +Building or executing project1 should be done through dune. Expected command line arguments are `project1 [--mode {xor|horn}] <files> ...` + +To test a specific file: `dune exec -- project1 --mode xor file.cnf` + +TODO running tests with dune test + diff --git a/project1/bin/main.ml b/project1/bin/main.ml index 0b84f3be6dd4c8f0fbb1b2146b57e43440d3fc12..095601807ee5c395055316f2632173d36325fc95 100644 --- a/project1/bin/main.ml +++ b/project1/bin/main.ml @@ -8,7 +8,7 @@ let process = ref Xor.process module M = Dimacs.Make(Std.Loc)(Std.Term)(Std.Statement) (* Command line parsing configuration *) -let usage_msg = "project1 [--mode] ... [files]" +let usage_msg = "project1 [--mode {xor|horn}] <files> ..." let input_files = ref [] let set_mode = fun s -> if String.equal s "horn" then process := Horn.process let anon_fun filename =