package binsec

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Make.ValueSource

type t = value

A symbolic value.

type id

The unique identifier for variable naming (SSA form).

Creation

val constant : Binsec_kernel.Bitvector.t -> t

constant v creates a value that evaluates to the Binsec_kernel.Bitvector v.

val zero : t
val var : id -> string -> int -> t

var i n s creates a (first-order) constant value of s bits, named n and uniquely identified by i.

val unary : State.unary State.operator -> t -> t

unary o v returns the application of the unary operator o applied to the value v.

val binary : State.binary State.operator -> t -> t -> t

binary o v1 v2 returns the application of the binary operator o applied to the values v1 and v2.

val ite : t -> t -> t -> t

ite cond if_term else_term returns the value that evaluates to if_term if cond is true, or else_term otherwise.

Inspection

val is_symbolic : t -> bool

is_symbolic v returns true if the v does not syntactically evaluate to constant Binsec_kernel.Bitvector.t.

val is_zero : t -> State.trilean

is_zero v returns True if v equals zero, False if v equals one and Unknown otherwise.

val sizeof : t -> int

sizeof v returns the size in bits of the value v.