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

Simplified usage

parent c5c3be2d
......@@ -15,11 +15,12 @@ tests: $(OSRC) tests.ml
./tests
circuits: $(OSRC) circuits.ml
mkdir -p graphics
$(OCAMLCC) -g -o circuits $(OSRC) circuits.ml
./circuits
clean:
rm *.cmi
rm *.cmo
rm *.pdf
rm *.dot
rm graphics/*.pdf
rm graphics/*.dot
......@@ -24,13 +24,22 @@ To compile and run the 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
......
......@@ -158,9 +158,10 @@ let convert_label = function
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
*)
let dag = mapids (fun x -> x + !counter) dag in
......@@ -278,7 +279,7 @@ let fc = ref 0;;
*)
let report txt ptg =
incr fc;
let base = Printf.sprintf "test%03d" !fc in
let base = Printf.sprintf "graphics/test%03d" !fc in
(*print_string (txt ^ ": " ^ base ^ "\n");*)
(*ptg |> string_of_ptg |> print_string ;*)
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