package lutin

  1. Overview
  2. Docs

Module ExpSource

Lucky Boolean and numeric expressions.

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

    struct and arrays are flattened in such a list

    *)
Sourceand 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
Sourceand var = t Var.t
Sourceand func_call_arg = string * Ezdl.cfunc * ext_func_type * ext_lib_name * t list
Sourceand 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
Sourceand simple =
  1. | Fo of formula
  2. | Nu of num
Sourceval ext_func_tbl_to_string : ext_func_tbl -> string
Sourcetype 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.

Sourceval weight_to_string : weight -> string
Sourceval add_value : string -> simple -> simple_tbl -> simple_tbl
Sourceval add_var : string -> var -> var_tbl -> var_tbl
Sourceval empty_var_tbl : var Util.StringMap.t
Sourceval empty_simple_tbl : simple Util.StringMap.t
Sourceval 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.