Abstraction of integers for Sigali

Correction of abstraction for Sigali: integer equations comprising no
integer variables should not be abstracted
This commit is contained in:
Gwenaël Delaval 2013-08-04 22:38:03 +02:00
parent 17435fd012
commit f3d34f57d1

View file

@ -291,7 +291,7 @@ let translate_eq f
ident_list) in ident_list) in
acc_states,acc_init, acc_states,acc_init,
acc_inputs,acc_eqs acc_inputs,acc_eqs
| Minils.Evarpat(n), _ when actual_ty e.Minils.e_ty = Tbool -> | Minils.Evarpat(n), _ ->
begin try begin try
(* assert : no fby, no node application in e *) (* assert : no fby, no node application in e *)
let e' = translate prefix e in let e' = translate prefix e in
@ -308,17 +308,12 @@ let translate_eq f
with Untranslatable -> with Untranslatable ->
untranslatable_warn e; untranslatable_warn e;
current_inputs := IdentSet.add n !current_inputs; current_inputs := IdentSet.add n !current_inputs;
acc_states,acc_init, let acc_inputs =
(acc_inputs @ [(n,(prefixed (name n)))]), match actual_ty e.Minils.e_ty with
acc_eqs | Tbool -> acc_inputs @ [(n,(prefixed (name n)))]
end | _ -> acc_inputs
| Minils.Evarpat(n), _ -> in
begin acc_states,acc_init,acc_inputs,acc_eqs
untranslatable_warn e;
(* Mark n as input: unusable as local variable *)
Format.printf "Adding non-bool variable %s in current_inputs@\n" (name n);
current_inputs := IdentSet.add n !current_inputs;
acc_states,acc_init,acc_inputs,acc_eqs
end end
| _ -> assert false | _ -> assert false