module Utils: sig
.. end
Utilitary function in order to achieve static interpretation
Utilitary function in order to achieve static interpretation
val minmax : Z.t list -> Z.t * Z.t
Return the minimum and the maximum of a list. Primitive recursive function.
Raises Failure
If the list is empty
Returns The pair made of the minimum and the maximum of the elements of the list
val notBoolExpr : Types.bool_expr -> Types.bool_expr
Apply the not function to a boolean
b
The initial boolean expression
Returns The boolean expression on which we have apply a not
val addLocationsProgram : Types.global_statement list -> Types.program
Adds locations to an unlocated program
program
The unlocated program
Returns The program located
val removeLabelsProgram : Types.loc * (Types.global_statement * Types.loc) list -> Types.program
Remove the labels of the program and replace them by the locations associated
program
The located program
Returns The located program with the labels which have been replaced
val invMin : Z.t -> Z.t -> Z.t
Returns the inverse of the minimum where a et b are already inversed
Returns min(1/(
c
,
d
))
val invMax : Z.t -> Z.t -> Z.t
Returns the inverse of the maximum where a et b are already inversed
Returns max(1/(
c
,
d
))
val removeCVariables : Types.abstrContext -> Types.abstrContext
Remove the C variables from a context. Used when we jump in another function and that we have no clue on the variable stack
Returns The new context
val getLocationNumber : Types.loc -> int
Return the number associated to a location
Returns The number associated
val getRegNameVar : Types.reg32 -> Types.name_var
Return the variable name of a register
Returns Its name