Module type Sig.Context

A Context represent a set of paths leading to the current state (it corresponds to a path condition in symbolic execution)

Note: we use a module for Context, instead of a type, so that it can be used as a functor argument and replace the Arity.

TODO: Rename Context to AbsState: the context is now a representation of the state at a program point.

type t
val level : t -> int
val copy : t -> t

Create an independent copy of the context.

val assign : t -> t -> unit

assign ctx1 ctx2 makes ctx1 a copy of ctx2.

Types for serialization.

type 'a in_tuple

The type of the tuples of argument to nondet (i.e., arguments of a phi function).

type empty_tuple
val empty_tuple : unit -> empty_tuple in_tuple
type 'a in_acc = bool * 'a in_tuple

An accumulator is a set of arguments to nondet, and an accumulated inclusion check.

type 'a out_tuple

The type of the result of the phi function.

type ('a, 'b) result =
  1. | Result : bool * 'some in_tuple * (t -> 'some out_tuple -> 'a * 'b out_tuple) -> ('a, 'b) result

We use a GADT because 'some is existentially quantified: we don't want the type of in_tuple to appear in serialization function, as, for instance, what we put in in in_tuple can depend on some condition.

The boolean expresses whether the second operand of the serialization was included in the first one.