Commit 7c6417b8 authored by Aliaume Lopez's avatar Aliaume Lopez

Simplified usage

parent c5c3be2d
...@@ -15,11 +15,12 @@ tests: $(OSRC) tests.ml ...@@ -15,11 +15,12 @@ tests: $(OSRC) tests.ml
./tests ./tests
circuits: $(OSRC) circuits.ml circuits: $(OSRC) circuits.ml
mkdir -p graphics
$(OCAMLCC) -g -o circuits $(OSRC) circuits.ml $(OCAMLCC) -g -o circuits $(OSRC) circuits.ml
./circuits ./circuits
clean: clean:
rm *.cmi rm *.cmi
rm *.cmo rm *.cmo
rm *.pdf rm graphics/*.pdf
rm *.dot rm graphics/*.dot
...@@ -24,13 +24,22 @@ To compile and run the circuits ...@@ -24,13 +24,22 @@ To compile and run the circuits
make circuits make circuits
``` ```
Once it is built, you will be able to use it with the following
console command :
To update your version of the repository ```
./circuits
```
Note that the default circuit is obtained by reading `lines.txt`,
but any alternative text file can be used by supplying the filename
as an argument :
``` ```
git pull origin master ./circuits filename
``` ```
The graphics are generated in a separate directory called `graphics`.
## Syntax overview ## Syntax overview
......
...@@ -158,9 +158,10 @@ let convert_label = function ...@@ -158,9 +158,10 @@ let convert_label = function
let ptg_of_dag dag = let ptg_of_dag dag =
(*Dags.debug_dag dag;*) (* Dags.debug_dag dag; *)
(* FIRST OF ALL TRANSLATE ALL THE NAMES SO THAT (*
* FIRST OF ALL TRANSLATE ALL THE NAMES SO THAT
* THEY DO NOT CONFLICT WITH OTHER PTG NAMES * THEY DO NOT CONFLICT WITH OTHER PTG NAMES
*) *)
let dag = mapids (fun x -> x + !counter) dag in let dag = mapids (fun x -> x + !counter) dag in
...@@ -278,7 +279,7 @@ let fc = ref 0;; ...@@ -278,7 +279,7 @@ let fc = ref 0;;
*) *)
let report txt ptg = let report txt ptg =
incr fc; incr fc;
let base = Printf.sprintf "test%03d" !fc in let base = Printf.sprintf "graphics/test%03d" !fc in
(*print_string (txt ^ ": " ^ base ^ "\n");*) (*print_string (txt ^ ": " ^ base ^ "\n");*)
(*ptg |> string_of_ptg |> print_string ;*) (*ptg |> string_of_ptg |> print_string ;*)
ptg_to_file (base ^ ".dot") ptg; ptg_to_file (base ^ ".dot") ptg;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment