Changeset 640 for Deliverables/D2.2/8051/src/cminor
- Timestamp:
- Mar 7, 2011, 11:10:57 AM (10 years ago)
- Location:
- Deliverables/D2.2/8051/src/cminor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D2.2/8051/src/cminor/cminorAnnotator.ml
r619 r640 131 131 132 132 133 (** [instrument prog cost_map] instruments the program [prog]. First a fresh 134 global variable --- the so-called cost variable --- is added to the program. 135 Then, each cost label in the program is replaced by an increment of the cost 136 variable, following the mapping [cost_map]. The function also returns the 137 name of the cost variable and the name of the cost increment function. *) 138 133 139 let instrument p costs_mapping = 134 140 let cost_id = fresh_cost_id "_cost" p in … … 140 146 Cminor.functs = functs ; 141 147 Cminor.main = p.Cminor.main }, 148 "" (* TODO *), 142 149 "" (* TODO *)) 143 150 -
Deliverables/D2.2/8051/src/cminor/cminorAnnotator.mli
r619 r640 5 5 global variable --- the so-called cost variable --- is added to the program. 6 6 Then, each cost label in the program is replaced by an increment of the cost 7 variable, following the mapping [cost_map]. The returned string is the name8 of the cost increment function. *)7 variable, following the mapping [cost_map]. The function also returns the 8 name of the cost variable and the name of the cost increment function. *) 9 9 10 10 val instrument : Cminor.program -> int CostLabel.Map.t -> 11 Cminor.program * string 11 Cminor.program * string * string 12 12 13 13 val cost_labels : Cminor.program -> CostLabel.Set.t
Note: See TracChangeset
for help on using the changeset viewer.