From c2ab607195b1b5f024486f6a6d95e8098dfb0ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81dric=20Pasteur?= Date: Mon, 17 Oct 2011 11:47:00 +0200 Subject: [PATCH] Fix for causality when using linear types --- compiler/heptagon/analysis/causal.ml | 2 +- compiler/heptagon/analysis/causality.ml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/heptagon/analysis/causal.ml b/compiler/heptagon/analysis/causal.ml index 37df74c..f53b395 100644 --- a/compiler/heptagon/analysis/causal.ml +++ b/compiler/heptagon/analysis/causal.ml @@ -231,7 +231,7 @@ let build ac = | Aand _ | Atuple _ -> make_graph ac | _ -> [], [] in - let g = make ac in + let g = node_for_ac ac in List.iter (add_dependence g) l; (* let top_l, bot_l = List.split (List.map make_graph_tuple l) in let top_l = List.flatten top_l in diff --git a/compiler/heptagon/analysis/causality.ml b/compiler/heptagon/analysis/causality.ml index f5e3961..b06c90c 100644 --- a/compiler/heptagon/analysis/causality.ml +++ b/compiler/heptagon/analysis/causality.ml @@ -28,10 +28,12 @@ let cand c1 c2 = let rec candlist l = match l with | [] -> Cempty + | [c] -> c | c1 :: l -> cand c1 (candlist l) -let ctuplelist l = - Ctuple l +let ctuplelist l = match l with + | [c] -> c + | _ -> Ctuple l let cor c1 c2 = match c1, c2 with