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

Many benchmark bugfixes and optimizations

parent 6ff93163
No related branches found
No related tags found
No related merge requests found
......@@ -156,12 +156,20 @@ let rec exportFormula_buffer sb f =
prio 4 f1
| ALLOWS (s, f1) ->
Buffer.add_string sb "<{";
Buffer.add_string sb (Str.concat " " (L.map string_of_int s));
Buffer.add_string sb (
match s with
| [] -> " "
| _ ->(Str.concat " " (L.map string_of_int s))
);
Buffer.add_string sb "}>";
prio 4 f1
| ENFORCES (s, f1) ->
Buffer.add_string sb "[{";
Buffer.add_string sb (Str.concat " " (L.map string_of_int s));
Buffer.add_string sb (
match s with
| [] -> " "
| _ ->(Str.concat " " (L.map string_of_int s))
);
Buffer.add_string sb "}]";
prio 4 f1
| MIN (n, s, f1) ->
......
......@@ -26,7 +26,7 @@ type testresults =
list))
let debugMsg str =
print_endline (":: " ^ str)
prerr_endline (":: " ^ str)
(* generates the int range from i to j (including) *)
let (--) i j =
......@@ -161,9 +161,9 @@ let doTestK () : testresults =
lPPP A list of pairs (p->p->p, n), e.g. (.+., 1).
*)
let timeout = 300 in (* 5 minutes *)
let lF = List.map (fun p -> (C.AP (string_of_int p), 1)) (0--10) in
let lF = List.map (fun p -> (C.AP ("p"^(string_of_int p)), 1)) (0--3) in
let lFF = [(C.const_not,1)] in
let lFFF = [(C.const_and,1); (C.const_or, 1)] in
let lFFF = [(C.const_and,1)] in (* Warning: This forbids disjunctions! *)
let lPFF = [(C.const_ex,1); (C.const_ax, 1)] in
(* role names *)
let lP : (string *int) list = List.map (fun p -> (string_of_int p, 1)) (0--10) in
......@@ -215,9 +215,9 @@ let doGenCL aglist sizelist : unit =
lFP A list of pairs (f->p, n), e.g. (?., 1).
lPPP A list of pairs (p->p->p, n), e.g. (.+., 1).
*)
let lF = List.map (fun p -> (C.AP (string_of_int p), 1)) (0--10) in
let lF = List.map (fun p -> (C.AP ("p"^(string_of_int p)), 1)) (1--3) in
let lFF = [(C.const_not,1)] in
let lFFF = [(C.const_and,1); (C.const_or, 1)] in
let lFFF = [(C.const_and,1)] in (* Warning: This forbids disjunctions! *)
let lPFF = [(C.const_enforces,1); (C.const_allows, 1)] in
(* role names *)
let lP = List.map (fun p -> (p, 1)) (TList.powerset aglist) in
......@@ -234,7 +234,7 @@ let _ =
let argidx = ref (1) in
let fail str = (prerr_endline str ; printUsage ()) in
let getarg () =
if !argidx >= Array.length Sys.argv then (fail "Error: Missing argument") else ();
if !argidx >= Array.length Sys.argv then (fail "Error: Missing argument ") else ();
let str = Sys.argv.(!argidx) in
argidx := 1 + !argidx;
str
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment