From af76b11278204c25428c4f95ef51d4aa8f2a1e0e Mon Sep 17 00:00:00 2001 From: filip <“filip.rabiega@gmail.com”> Date: Tue, 22 Apr 2025 17:38:11 +0200 Subject: set up dream --- README.md | 11 ++++++++++- bin/dune | 2 +- bin/main.ml | 24 +++--------------------- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index dbc30f6..c1f72f0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Chadprover +# PowerProver ## Overview @@ -17,6 +17,15 @@ Experimentation with automated proofs. ### Dune Setup - `dune init proj power_prover` to create project directory (we rename the base dir as *PowerProver*) +- `dune build` to build the project +- `dune test` to run tests +- `dune exec power_prover` to execute the program + +### Dream Setup + +- `opam install dream` +- add *dream* to libraries in */bin/dune*: `(libraries power_prover dream)` +- add *dream* to package dependencies in */dune-project*: ` (depends ocaml dune dream)` ## Resources diff --git a/bin/dune b/bin/dune index 5e8e55c..e7f82e3 100644 --- a/bin/dune +++ b/bin/dune @@ -1,4 +1,4 @@ (executable (public_name power_prover) (name main) - (libraries power_prover)) + (libraries power_prover dream)) diff --git a/bin/main.ml b/bin/main.ml index eed1a7a..19dd333 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -1,22 +1,4 @@ -open Power_prover.Datatypes - -let show_example p i = - print_endline ("Proposition p: " ^ (string_of_prop p)); - print_endline ("p in NNF: " ^ (string_of_prop (to_nnf p))); - print_endline ("Interpretation i: " ^ (string_of_interpr i)); - print_endline ("p under i: " ^ (string_of_prop (interpret p i)) ^ "\n");; - -let p1 = Not(Not(Not(And(Lit "a", Lit "b"))));; -let p2 = Iff(Not(Implies(Or(Lit "a", Lit "b"), And(Lit "b", Lit "c"))), True);; -let i1 = [("a", false); ("b", true); ("c", false)];; -let i2 = [("a", false); ("b", false)];; -let i3 = [("c", true)];; - let () = - show_example p1 i1; - show_example p1 i2; - show_example p1 i3; - - show_example p2 i1; - show_example p2 i2; - show_example p2 i3;; + Dream.run (fun _ -> + Dream.html "Sup yall!" + ) -- cgit v1.2.3