source: Deliverables/D2.2/8051-indexed-labels-branch/src/common/costExpr.mli @ 1444

Last change on this file since 1444 was 1444, checked in by tranquil, 9 years ago
  • expression simplification finished
File size: 700 bytes
Line 
1open CostLabel
2
3type cond =
4    | Ceq of int         (** index is equal to *)
5    | Cgeq of int        (** index is greater or equal to *)
6    | Cmod of int*int    (** index modulo equal to *)
7    | Cgeqmod of int*int*int (** index greater than and modulo equal to *)
8   
9type cost_expr =
10    | Exact of int
11    | Ternary of index * cond * cost_expr * cost_expr
12
13(** [expr_cost_mapping_of_cost_mapping] turns a cost mapping on indexed
14    labels into a mapping from cost atoms to cost expressions *)
15val cost_expr_mapping_of_cost_mapping : int Map.t -> cost_expr Atom.Map.t
16
17(** Simplify the cost expression, removing useless conditions in it *) 
18val remove_useless_branches : cost_expr -> cost_expr
Note: See TracBrowser for help on using the repository browser.