2024-12-12 16:37:36 +01:00
|
|
|
open Analysis
|
|
|
|
|
|
2024-11-21 18:30:19 +01:00
|
|
|
module SimpleStatements : sig
|
|
|
|
|
type t =
|
|
|
|
|
| SimpleSkip
|
|
|
|
|
| SimpleAssignment of Types.variable * simpleArithmetic
|
|
|
|
|
| SimpleGuard of simpleBoolean
|
|
|
|
|
and simpleBoolean =
|
|
|
|
|
| SimpleBoolean of bool
|
|
|
|
|
| SimpleBAnd of simpleBoolean * simpleBoolean
|
|
|
|
|
| SimpleBOr of simpleBoolean * simpleBoolean
|
|
|
|
|
| SimpleBNot of simpleBoolean
|
|
|
|
|
| SimpleBCmp of simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimpleBCmpLess of simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimpleBCmpLessEq of simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimpleBCmpGreater of simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimpleBCmpGreaterEq of simpleArithmetic * simpleArithmetic
|
|
|
|
|
and simpleArithmetic =
|
|
|
|
|
| SimpleVariable of Types.variable
|
|
|
|
|
| SimpleInteger of int
|
|
|
|
|
| SimplePlus of simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimpleMinus of simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimpleTimes of simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimpleDivision of simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimpleModulo of simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimplePower of simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimplePowerMod of simpleArithmetic * simpleArithmetic * simpleArithmetic
|
|
|
|
|
| SimpleRand of simpleArithmetic
|
|
|
|
|
|
|
|
|
|
val pp : out_channel -> t -> unit
|
|
|
|
|
val pplist : out_channel -> t list -> unit
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
module SSCfg : Cfg.C with type elt = SimpleStatements.t
|
|
|
|
|
|
|
|
|
|
val convert : Types.p_exp -> SSCfg.t
|
2024-12-03 17:18:42 +01:00
|
|
|
val convert_io : int -> Types.p_exp -> SSCfg.t
|