Coccinelle release-1.0.0-rc11
[bpt/coccinelle.git] / cocci.ml
index 94f4707..f469888 100644 (file)
--- a/cocci.ml
+++ b/cocci.ml
@@ -1,5 +1,7 @@
 (*
- * Copyright 2010, INRIA, University of Copenhagen
+ * Copyright 2012, INRIA
+ * Julia Lawall, Gilles Muller
+ * Copyright 2010-2011, INRIA, University of Copenhagen
  * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix
  * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
  * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
@@ -150,8 +152,8 @@ let ctls_of_ast2 ast (ua,fua,fuas) pos =
        (Asttomember.asttomember ast ua))
     ast (List.combine ua (List.combine fua (List.combine fuas pos)))
 
-let ctls_of_ast ast ua =
-  Common.profile_code "asttoctl2" (fun () -> ctls_of_ast2 ast ua)
+let ctls_of_ast ast ua pl =
+  Common.profile_code "asttoctl2" (fun () -> ctls_of_ast2 ast ua pl)
 
 (*****************************************************************************)
 (* Some  debugging functions *)
@@ -1657,7 +1659,8 @@ and process_a_ctl_a_env_a_toplevel2 r e c f =
       (***************************************)
             let model_ctl =
               CCI.model_for_ctl r.dropped_isos (Common.some c.flow) e
-            in CCI.mysat model_ctl ctl (r.rule_info.used_after, e))
+            in CCI.mysat model_ctl ctl
+              (r.rule_info.rulename, r.rule_info.used_after, e))
        in
        if not returned_any_states
        then None
@@ -1724,6 +1727,7 @@ let rec bigloop2 rs (ccs: file_info list) =
              (Ast_cocci.ScriptRule (nm,l,deps,mv,script_vars,code)));
        end;
 
+      (*pr2 (List.hd(cmd_to_list "free -m | grep Mem"));*)
        if !Flag.show_misc then print_endline "RESULT =";
 
         let (_, newes) =
@@ -1835,8 +1839,8 @@ let pre_engine2 (coccifile, isofile) =
   (* useful opti when use -dir *)
   let (metavars,astcocci,
        free_var_lists,negated_pos_lists,used_after_lists,
-       positions_lists,(toks,_,_)) =
-      sp_of_file coccifile isofile in
+       positions_lists,(toks,_,_)) = sp_of_file coccifile isofile in
+
   let ctls = ctls_of_ast astcocci used_after_lists positions_lists in
 
   g_contain_typedmetavar := sp_contain_typed_metavar astcocci;