package lutin

  1. Overview
  2. Docs

Lucky Boolean and numeric expressions.

type ext_func_name = string
type ext_func_type = Type.t list
type ext_lib_name = string
type t =
  1. | Formu of formula
  2. | Numer of num
  3. | Liste of simple_tbl
    (*

    struct and arrays are flattened in such a list

    *)
and formula =
  1. | And of formula * formula
  2. | Or of formula * formula
  3. | Xor of formula * formula
  4. | NXor of formula list
  5. | Nor of formula list
  6. | Diese of formula list
  7. | Impl of formula * formula
  8. | IteB of formula * formula * formula
  9. | Not of formula
  10. | EqB of formula * formula
  11. | True
  12. | False
  13. | Bvar of var
  14. | Eq of num * num
  15. | Sup of num * num
  16. | SupEq of num * num
  17. | Inf of num * num
  18. | InfEq of num * num
and var = t Var.t
and func_call_arg = string * Ezdl.cfunc * ext_func_type * ext_lib_name * t list
and num =
  1. | Sum of num * num
  2. | Diff of num * num
  3. | Prod of num * num
  4. | Quot of num * num
  5. | Mod of num * num
  6. | Div of num * num
  7. | Uminus of num
  8. | Inf_int
  9. | Ival of Num.num
  10. | Fval of float
  11. | Ivar of var
  12. | Fvar of var
  13. | FFC of func_call_arg
  14. | IFC of func_call_arg
  15. | Gcont of num * num * num
  16. | Gstop of num * num * num
  17. | Icont of num * num * num
  18. | Istop of num * num * num
  19. | Ite of formula * num * num
and simple =
  1. | Fo of formula
  2. | Nu of num
and simple_tbl = simple Util.StringMap.t
val ext_func_tbl_to_string : ext_func_tbl -> string
type weight =
  1. | Wint of int
  2. | Wexpr of num
  3. | Infinity

A weight can be an integer, or a integer expression that depends only on inputs and memories.

val weight_to_string : weight -> string
type var_tbl = var Util.StringMap.t
val add_value : string -> simple -> simple_tbl -> simple_tbl
val add_var : string -> var -> var_tbl -> var_tbl
val empty_var_tbl : var Util.StringMap.t
val empty_simple_tbl : simple Util.StringMap.t
val remove_prefix : string -> string -> string -> string

remove from a string everything that is before the first "." or the first "". This is useful to go to var_tbl indexes (which depends on the var name) to simple_tbl indexes (which depend only on the type).

OCaml

Innovation. Community. Security.