 Timestamp:
 Oct 11, 2011, 5:42:20 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Deliverables/D2.2/8051indexedlabelsbranch/src/common/costLabel.mli
r1319 r1357 21 21 type indexing = sexpr list 22 22 23 type const_indexing = int array23 type const_indexing 24 24 25 (** [enter_loop n indexing] is used to update indexing when one is entering a 26 loop indexed by [n]. 27 The function recycles the same constant indexing *) 28 val enter_loop : index option > const_indexing > unit 25 val const_ind_iter : (int > unit) > const_indexing > unit 29 26 30 (** [continue_loop n indexing] is used to update indexing when one is continuing a 31 loop indexed by [n]. *) 32 val continue_loop : index option > const_indexing > unit 27 (** Top of the stack. 28 @raise [Invalid_argument "nonempty indexing stack"] if argument is empty *) 29 val curr_const_ind : const_indexing list > const_indexing 30 31 (** [enter_loop inds n] is used to update the indexing stack [ind] when one 32 is entering a loop indexed by [n]. Raises [Invalid_argument 33 "nonempty indexing stack"] if [inds] is empty. *) 34 val enter_loop : const_indexing list > index > unit 35 36 (** [enter_loop_opt inds (Some n)] behaves like [enter_loop inds n], and does 37 nothing in case of [None]. 38 @see enter_loop *) 39 val enter_loop_opt : const_indexing list > index option > unit 40 41 (** [continue_loop inds n] is used to update the indexing stack [inds] when 42 one is continuing a loop indexed by [n]. 43 @raise [Invalid_argument "nonempty indexing stack"] if [inds] is empty. 44 @raise [Invalid_argument "uninitialized loop index"] if the head of 45 [inds] has no value for [index]. *) 46 val continue_loop : const_indexing list > index > unit 47 48 (** [continue_loop_opt inds (Some n)] behaves like [continue_loop inds n], and 49 does nothing in case of [None]. 50 @see continue_loop *) 51 val continue_loop_opt : const_indexing list > index option > unit 52 53 (** [new_const_ind inds] pushes a new empty constant indexing on top of the 54 stack [inds]. *) 55 val new_const_ind : const_indexing list > const_indexing list 56 57 (** [forget_const_ind inds] pops and discards the top constant indexing from the 58 stack [inds]. Raises [Invalid_argument "nonempty indexing stack"] if 59 [inds] is empty. *) 60 val forget_const_ind : const_indexing list > const_indexing list 61 62 63 33 64 34 65 (** [empty_indexing] generates an empty indexing *) … … 45 76 } 46 77 47 val apply_const_indexing : const_indexing > t > t 48 78 (** [apply_const_indexing ind lbl] returns [lbl] where its indexing has been 79 evaluated in the constant indexing [ind]. 80 @raise Invalid_argument "constant indexing not enough to be applied" if 81 [ind] does not contain enough mappings to evaluate [lbl]'s indexing. *) 82 val ev_indexing : const_indexing > t > t 49 83 50 84 (** [string_of_cost_label pref t] converts an indexed label to a
Note: See TracChangeset
for help on using the changeset viewer.