Skip to content
Snippets Groups Projects
Commit 78f0a799 authored by Emile Guillaume's avatar Emile Guillaume
Browse files

fix kclustering Algo

parent 98a8280a
No related branches found
No related tags found
No related merge requests found
...@@ -18,14 +18,13 @@ node kclustering_oracle( ...@@ -18,14 +18,13 @@ node kclustering_oracle(
round : bool; round : bool;
round_nb : int; round_nb : int;
) )
returns (ok : bool; returns (ok : bool);
var
lustre_cost:int; lustre_cost:int;
lustre_config : state^card; lustre_config : state^card;
lustre_enabled : bool^actions_number^card; lustre_enabled : bool^actions_number^card;
lustre_round:bool; lustre_round:bool;
lustre_round_nb:int); lustre_round_nb:int;
--var
let let
lustre_config, lustre_enabled, lustre_round, lustre_round_nb = lustre_config, lustre_enabled, lustre_round, lustre_round_nb =
topology(active -> pre active, -- ignored at the first step topology(active -> pre active, -- ignored at the first step
...@@ -36,9 +35,9 @@ let ...@@ -36,9 +35,9 @@ let
-- compare the sasa dot interpretation and the salut dot to lustre compilation -- compare the sasa dot interpretation and the salut dot to lustre compilation
and lustre_config = ocaml_config and lustre_config = ocaml_config
-- and lustre_round = round -- and lustre_round = round
-- and lustre_round_nb = round_nb and lustre_round_nb = round_nb
-- compare the lustre and the ocaml version of the processes -- compare the lustre and the ocaml version of the processes
and Lustre::real2int(ocaml_cost) = lustre_cost -- and Lustre::real2int(ocaml_cost) = lustre_cost
-- compare the cost functions -- compare the cost functions
; ;
tel tel
......
...@@ -23,7 +23,7 @@ let ...@@ -23,7 +23,7 @@ let
config, enables, lustre_round, lustre_round_nb = topology(active, init_config); config, enables, lustre_round, lustre_round_nb = topology(active, init_config);
-- assert(config = init_config -> true); -- assert(config = init_config -> true);
legitimate = legitimate<<actions_number,card>>(enables,config);; legitimate = legitimate<<actions_number,card>>(enables,config);
closure = true -> (pre(legitimate) => legitimate); closure = true -> (pre(legitimate) => legitimate);
-- cost = cost(enabled, config); -- cost = cost(enabled, config);
......
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