Skip to content
Snippets Groups Projects
Commit 24a93acc authored by Erwan Jahier's avatar Erwan Jahier
Browse files

The clock dep loop checker (1cffc6b4) was detecting spurious loops.

parent 1e82ed48
No related branches found
No related tags found
No related merge requests found
OASISFormat: 0.4
Name: lustre-v6
Version: 1.674
Version: 1.675
Synopsis: The Lustre V6 Verimag compiler
Description: This package contains:
(1) lus2lic: the (current) name of the compiler (and interpreter via -exec).
......
(* Time-stamp: <modified the 22/12/2016 (at 15:41) by jahier> *)
(* Time-stamp: <modified the 02/01/2017 (at 11:45) by Erwan Jahier> *)
open Lxm
......@@ -364,17 +364,18 @@ let dep_star lxm vl vars =
let tbl = Hashtbl.create (List.length vl) in
List.iter (fun v -> Hashtbl.add tbl v Todo) vl ;
let rec find_deps v =
Lv6Verbose.exe ~flag:dbg (fun () -> Printf.printf " check clock dep : %s\n" v);
if not (Hashtbl.mem tbl v) then Hashtbl.add tbl v Todo;
match Hashtbl.find tbl v with
| Done cl -> cl
| Todo -> (
Hashtbl.replace tbl v (Doing);
match find_direct_dep lxm v vars with
| None -> Hashtbl.add tbl v (Done []);[]
| None -> Hashtbl.replace tbl v (Done []);[]
| Some v2 ->
let v2_deps = find_deps v2 in
let v_deps = v2::v2_deps in
Hashtbl.add tbl v (Done v_deps);
Hashtbl.replace tbl v (Done v_deps);
v_deps
)
| Doing ->
......@@ -393,7 +394,8 @@ let dep_star lxm vl vars =
)
vl;
let tbl2 = Hashtbl.create(List.length vl) in
Hashtbl.iter (fun v dep -> match dep with Done cl -> Hashtbl.add tbl2 v cl | _ -> ()) tbl;
Hashtbl.iter (fun v dep ->
match dep with Done cl -> Hashtbl.replace tbl2 v cl | _ -> ()) tbl;
tbl2
module TopoSortVars =
......
(** Automatically generated from Makefile *)
let tool = "lus2lic"
let branch = "master"
let commit = "674"
let sha_1 = "1cffc6b49d46a14e9edfd05a678b56e00466682e"
let commit = "675"
let sha_1 = "1e82ed48c773e465c63dca9f4b005273dee5c1b0"
let str = (branch ^ "." ^ commit ^ " (" ^ sha_1 ^ ")")
let maintainer = "jahier@imag.fr"
==> lus2lic0.sum <==
Test Run By jahier on Wed Nov 30 17:10:51
Test Run By jahier on Mon Jan 2 11:38:03
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic0 tests ===
......@@ -64,7 +64,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte
XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
==> lus2lic1.sum <==
Test Run By jahier on Wed Nov 30 17:10:52
Test Run By jahier on Mon Jan 2 11:38:04
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic1 tests ===
......@@ -399,7 +399,7 @@ PASS: sh multipar.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {}
==> lus2lic2.sum <==
Test Run By jahier on Wed Nov 30 17:11:11
Test Run By jahier on Mon Jan 2 11:38:23
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic2 tests ===
......@@ -745,7 +745,7 @@ PASS: sh zzz2.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus {}
==> lus2lic3.sum <==
Test Run By jahier on Wed Nov 30 17:11:50
Test Run By jahier on Mon Jan 2 11:39:03
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic3 tests ===
......@@ -1251,7 +1251,7 @@ PASS: ./myec2c {-o multipar.c multipar.ec}
PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
==> lus2lic4.sum <==
Test Run By jahier on Wed Nov 30 17:12:01
Test Run By jahier on Mon Jan 2 11:39:14
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic4 tests ===
......@@ -1777,12 +1777,12 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
# Total number of failures: 24
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 19 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 39 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 40 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 11 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 31 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 32 seconds
* Ref time:
0.06user 0.03system 1:40.95elapsed 0%CPU (0avgtext+0avgdata 5680maxresident)k
0inputs+0outputs (0major+6145minor)pagefaults 0swaps
0.03user 0.06system 1:42.20elapsed 0%CPU (0avgtext+0avgdata 5576maxresident)k
64inputs+0outputs (0major+6132minor)pagefaults 0swaps
* Quick time (-j 4):
0.04user 0.04system 0:46.53elapsed 0%CPU (0avgtext+0avgdata 5648maxresident)k
32inputs+0outputs (0major+6162minor)pagefaults 0swaps
0.06user 0.02system 0:50.29elapsed 0%CPU (0avgtext+0avgdata 5728maxresident)k
128inputs+0outputs (0major+6163minor)pagefaults 0swaps
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