Module State_import

module State_import: sig .. end
Saving/loading of Value states, possibly among different ASTs. Used by the command-line options defined by Value_parameters.SaveFunctionState and Value_parameters.LoadFunctionState.
Since Aluminium-20160501

val load_and_merge_function_state : Cvalue.Model.t -> Cvalue.Model.t
Loads the saved initial global state, and merges it with the given state (locals plus new globals which were not present in the original AST). The saved state may come from a different project. Note that, to ensure soundness of the merge, some constraints must be respected according to where the merge takes place. The intended use is to replace costly function calls, in which case the state of local variables should not be modified by the function.
val save_globals_state : unit -> unit
Saves the final state of globals variables after the return statement of the function defined via Value_parameters.SaveFunctionState. The result is saved in the file defined by the same option. The function must have been called exactly once during the value analysis, otherwise the saved state is unspecified.