Commit 1d0d5bfc authored by Benoit Barbot's avatar Benoit Barbot
Browse files

fix web app

parent 6b5d255d
Pipeline #1678 passed with stages
in 49 seconds
......@@ -117,6 +117,7 @@ let _ = run @@ fun () ->
worker##postMessage(Worker_sync.Task {Worker_sync.ta = !file_content;
rational_impl = !rational_impl;
frequency = !frequency;
expected_duration = !expected_duration;
verbose = !verbose;
npoly = !npoly;
print_rg = !print_rg;
......
......@@ -13,20 +13,24 @@ let computation outfile task =
let module R = (val if task.rational_impl then (module Fl.Num :Fl.FSIG) else (module Fl.Float:Fl.FSIG)) in
let module P = Polynome.Make (R) (struct let var_string= rg.ZoneGraph.var_string end) in
let module Weight = (
val if task.frequency =0.0 then (module P:Semantic.WeightStructure)
val if task.frequency = None && task.expected_duration = None then (module P:Semantic.WeightStructure)
else (module ExpPoly.Make(P)(struct
let smp = if P.F.is_exact then None else Some task.frequency
let smp = if P.F.is_exact then None else task.frequency
let tvar = P.var_of_int 0
let svar= P.var_of_int (P.nb_var-1)
end))) in
let module FunIt = Semantic.Make (Bound) (Weight) in
let module M = MainLoop.Make(FunIt) in
let module M = MainLoop.Make (FunIt) (struct let smp = task.frequency end) in
let rgpoly =
if task.npoly > 0 then (
if task.verbose>0 then (
Format.printf "Computing Distribution -> %i: [" task.npoly; flush stdout;
Format.printf "Computing Distribution[%s; %s] -> %i: ["
(if Weight.F.is_exact then "exact rational" else "floating point")
Weight.desc
task.npoly;
flush stdout;
Format.print_flush ()
);
let _,rgp = FunIt.iterate_functionnal ~update:(fun () ->
......
......@@ -2,7 +2,8 @@
type task = {
ta : string;
rational_impl : bool;
frequency : float;
frequency : float option;
expected_duration : float option;
verbose : int;
npoly : int;
print_rg : bool;
......
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