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 (initial_state_only_globals ()) in
      Globals.Vars.iter
        (fun varinfo _init ->
           CurrentLoc.set varinfo.vdecl;
           computed_state :=
             initialize_var_using_type
               varinfo
               !computed_state);
      !computed_state
    in
    S.memo compute