Env.RunTimeSourceInternal representation for subprograms.
module C : RunTimeConfScopes for interpretation: make local storage identifiers unique accross function calls, if needed.
type global = {static : StaticEnv.global;References the static environment.
*)storage : v Storage.t;Binds global variables to their names.
*)stack_size : Z.t ASTUtils.IMap.t;Current number of recursive calls open for each subprogram.
*)}The global part of an environment.
The local part of an environment.
Builds a static environment, with an empty local part.
empty_scoped scope is an empty local environment in the scope scope.
global_from_static static_env is an empty global environment with the static environment static_env.
Fetches an identifier from the environment.
mem x env is true iff x is bound in env.
declare_local x v env is env where x is now bound to v. This binding will be discarded by the call to pop_scope corresponding to the last call to push_scope before this declaration.
assign_local x v env is env where x is now bound to v. It is assumed to be already bound in env.
declare_global x v env is env where x is now bound to v. It is supposed that x is not bound in env.
assign_global x v env is env where x is now bound to v. It is assumed to be already bound in env.
remove_local x env is env where x is not bound.
assign x v env assigns x to v in env, and returns if x was declared as a local or global identifier.
Push a new unrolling counter on the stack. The associated loop will be unrolled C.unroll times.
Push a new unrolling counter on the stack. The associated loop will be unrolled C.unroll - 1 times.
tick_decr env is (stop, env') where
stop is true and the last counter is discarded.stop is false and the counter is decremented of 1.Push a new scope on the declaration stack. Variables declared here will be stored until the corresponding pop_scope.
pop_scope old new restores the variable bindings of old, with the updated values of new.
get_stack_size name env returns the stack_size for name.
incr_stack_size name env increases the stack size for name.
decr_stack_size name env decreases the stack size for name.