let initial_state_contextfree_only_globals =
let module S =
Computation.OptionRef
(Relations_type.Model.Datatype)
(struct
let name = "contextfree_only_globals"
let dependencies =
[ Ast.self; Parameters.LibEntry.self; Parameters.MainFunction.self ]
end)
in
function () ->
let compute () =
let computed_state = ref (Db.Value.globals_state ()) in
Globals.Vars.iter
(fun varinfo _init ->
CurrentLoc.set varinfo.vdecl;
computed_state :=
initialize_var_using_type
varinfo
!computed_state);
Db.Value.update_table Kglobal !computed_state;
!computed_state
in
S.memo compute