package codex

  1. Overview
  2. Docs
The Codex library for building static analysers based on abstract interpretation

Install

dune-project
 Dependency

Authors

Maintainers

Sources

1.0-rc4.tar.gz
md5=bc7266a140c6886add673ede90e335d3
sha512=8da42c0ff2c1098c5f9cb2b5b43b306faf7ac93b8f5ae00c176918cee761f249ff45b29309f31a05bbcf6312304f86a0d5a000eb3f1094d3d3c2b9b4c7f5c386

doc/codex.types/Types/TypedC/Pred/index.html

Module TypedC.PredSource

Sourcetype unop =
  1. | Extract of Units.In_bits.t * Units.In_bits.t
    (*

    start index, length

    *)
Sourcetype binop =
  1. | Add
  2. | Sub
  3. | Mul
  4. | Div
  5. | And
  6. | Or
  7. | Mod
  8. | Concat of Units.In_bits.t * Units.In_bits.t
    (*

    Size 1, size 2. First argument is the most significant

    *)
Sourcetype expr =
  1. | Const of Z.t
  2. | Val of value
  3. | Self
  4. | Unop of unop * expr
  5. | Binop of binop * expr * expr
Sourcetype cmpop =
  1. | Equal
  2. | NotEqual
  3. | ULt
  4. | SLt
  5. | ULeq
  6. | SLeq
  7. | UGeq
  8. | SGeq
  9. | UGt
  10. | SGt
Sourcetype mutval = {
  1. id : int;
  2. mutable value : bool;
}
Sourcetype t =
  1. | True
  2. | Cmp of cmpop * expr * expr
  3. | And of t * t
  4. | Mutval of mutval * t

Predicate on a structure field or array element, which is supposed to be true at all times.

Sourceval evaluate_mutval : mutval -> t -> t

given a mutval, evaluate the value of the associated predicate

Sourceval init_mutval : t -> t
Sourceval is_true : t -> bool

check if a predicate can be immediately reduced to true, this is not trivial since mutval exists

Sourceval true_ : t

returns the true predicate

Sourceval equal : t -> t -> bool
Sourceval pp_binop : Format.formatter -> binop -> unit
Sourceval pp_cmpop : Format.formatter -> cmpop -> unit
Sourceval pp : Format.formatter -> t -> unit
Sourceval array_length_to_expr : array_length -> expr
Sourceval conjunction : t -> t -> t

Conjoint two predicate. Ignores true (void) predicates