Skip to content
Snippets Groups Projects
Commit 3068712a authored by Thorsten Wißmann's avatar Thorsten Wißmann :guitar:
Browse files

Add coalgcompare subroutine genCL

parent 7993e0bf
No related branches found
No related tags found
No related merge requests found
......@@ -42,3 +42,4 @@ let cl_set_agents arr = ignore (
agents := TArray.uniq !agents)
let intlist_of_string str = List.map int_of_string (Str.split (Str.regexp "[ \t,]+") str)
......@@ -18,3 +18,5 @@ end
val cl_get_agents : unit -> int array
val cl_set_agents : int array -> unit
val intlist_of_string : string -> int list
......@@ -231,9 +231,20 @@ let doGenCL aglist sizelist : unit =
List.iter (fun sz -> printformula (genF sz)) sizelist
let _ =
let argidx = ref (1) in
let fail str = raise (CoAlgFormula.CoAlgException (str)) in
let getarg () =
if !argidx >= Array.length Sys.argv then fail "Missing argument" else ();
let str = Sys.argv.(!argidx) in
argidx := 1 + !argidx;
str
in
if Array.length Sys.argv < 2 then printUsage ()
else match Sys.argv.(1) with
| "K" -> printRawData (doTestK ())
| "genCL" -> let p1 = getarg () in
let p2 = getarg () in
doGenCL (intlist_of_string p1) (intlist_of_string p2)
| _ -> raise (CoAlgFormula.CoAlgException ("Unknown Logic name »" ^ (Sys.argv.(1)) ^ "«"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment