package lutin

  1. Overview
  2. Docs

Module NeSource

Internal (normal) representation of expressions.

Sourcetype t

Normal expressions type.

Sourcetype subst = (string * Value.num) * t
Sourceval is_a_constant : t -> bool

is_a_constant ne returns true iff ne is a constant.

Sourceval dimension : t -> int

dimension ne returns the number of variables involved in ne

Sourcetype split_res =
  1. | Split of string * Value.num * t
  2. | No_solution
  3. | Dont_know

split ne returns a monome (a,x) of ne (where x is not "", namely a is not the constant of ne) as well as the rest of the expr, namely, ne-a.x.

If it is a monome over integers, we return such a couple iff a divide the rest.

We suppose that the dimension is > 0.

Sourceval split : t -> split_res
Sourceval neg_nexpr : t -> t

neg_nexpr ne returns the opposite of ne, namely, -ne.

Sourceval opposite : t -> t

Various operations over normal expression.

Sourceval add : t -> t -> t
Sourceval diff : t -> t -> t
Sourceval mult : t -> t -> t
Sourceval modulo : t -> t -> t
Sourceval div : t -> t -> t
Sourceval quot : t -> t -> t
OCaml

Innovation. Community. Security.