Common — library colibrilib.bdd — module Var
269
module Var

Stay abstract

270
use int.Int
271
use mach.int.Int63
272
use Key
273
use CVar
274
275
use set.Set

The keys that get a variable during the run: a prophecy. The variables are in bijection with these keys only (Key.t has more elements than int63); key_of_var is injective.

280
constant
keys
: Set.set Key.t
281
282
function
key_of_var
(x:CVar.t) : Key.t
283
function
var_of_key
(k:Key.t) : CVar.t
284
285
axiom
bij1
: forall k. Set.mem k keys -> key_of_var (var_of_key k) = k
286
axiom
bij2
: forall x. var_of_key (key_of_var x) = x

The indexes of the windows of fewer than 4 bits get a variable in every run: the table of the constants ibdd.IBDD.cst256 allocates them when the module is initialized

291
axiom
small_indexes
: forall i:int63. 0 <= i < 3 -> Set.mem (Index i) keys

The variable of k (allocated on the first call): partial, since it can only be called for the keys of the prophecy (fewer than 2^62 calls in a run)

296
val partial
of_key
(k:Key.t) : CVar.t
297
ensures { Set.mem k keys /\ result = var_of_key k }

The key of an allocated variable

300
val
to_key
(x:CVar.t) : Key.t
301
requires { Set.mem (key_of_var x) keys }
302
ensures { result = key_of_var x }
303
Valid (13ms) (colibri2)
304
let partial
index
(i:int63) : CVar.t = of_key (Index i) Valid (13ms) (colibri2)
305
let partial
var
(n:Node.t) (i:int63) (a:bool) : CVar.t = of_key (Var n i a)
306
307
end