Project

General

Profile

Revision 903317e7 src/backends/Ada/ada_backend_common.ml

View differences:

src/backends/Ada/ada_backend_common.ml
230 230

  
231 231
(* Prototype pretty print functions *)
232 232

  
233
(** Print the name of the init procedure **)
234
let pp_init_procedure_name fmt = fprintf fmt "init"
233
(** Print the reset of the init procedure **)
234
let pp_reset_procedure_name fmt = fprintf fmt "reset"
235 235

  
236 236
(** Print the step of the init procedure **)
237 237
let pp_step_procedure_name fmt = fprintf fmt "step"
238 238

  
239
(** Print the reset of the init procedure **)
240
let pp_reset_procedure_name fmt = fprintf fmt "reset"
239
(** Print the name of the init procedure **)
240
let pp_init_procedure_name fmt = fprintf fmt "init"
241 241

  
242 242
(** Print the clear of the init procedure **)
243 243
let pp_clear_procedure_name fmt = fprintf fmt "clear"
......
246 246
   @param fmt the formater to print on
247 247
   @param name the name of the procedure
248 248
**)
249
let pp_simple_prototype fmt pp_name =
249
let pp_simple_prototype pp_name fmt =
250 250
  fprintf fmt "procedure %t" pp_name
251 251

  
252 252
(** Print the prototype of a machine procedure. The first parameter is always
......
267 267
    (Utils.pp_final_char_if_non_empty ";@," output)
268 268
    (Utils.fprintf_list ~sep:";@ " (pp_machine_var_decl Out)) output
269 269

  
270
(** Print the prototype of the init procedure of a machine.
270
(** Print the prototype of the step procedure of a machine.
271 271
   @param m the machine
272 272
   @param fmt the formater to print on
273 273
   @param pp_name name function printer
274 274
**)
275
let pp_init_prototype m fmt pp_name =
276
  pp_base_prototype Out m.mstatic [] fmt pp_name
275
let pp_step_prototype m fmt =
276
  pp_base_prototype InOut m.mstep.step_inputs m.mstep.step_outputs fmt pp_step_procedure_name
277 277

  
278
(** Print the prototype of the step procedure of a machine.
278
(** Print the prototype of the reset procedure of a machine.
279 279
   @param m the machine
280 280
   @param fmt the formater to print on
281 281
   @param pp_name name function printer
282 282
**)
283
let pp_step_prototype m fmt pp_name =
284
  pp_base_prototype InOut m.mstep.step_inputs m.mstep.step_outputs fmt pp_name
283
let pp_reset_prototype m fmt =
284
  pp_base_prototype InOut m.mstatic [] fmt pp_reset_procedure_name
285 285

  
286
(** Print the prototype of the reset procedure of a machine.
286
(** Print the prototype of the init procedure of a machine.
287 287
   @param m the machine
288 288
   @param fmt the formater to print on
289 289
   @param pp_name name function printer
290 290
**)
291
let pp_reset_prototype m fmt pp_name =
292
  pp_base_prototype InOut m.mstatic [] fmt pp_name
291
let pp_init_prototype m fmt =
292
  pp_base_prototype Out m.mstatic [] fmt pp_init_procedure_name
293 293

  
294 294
(** Print the prototype of the clear procedure of a machine.
295 295
   @param m the machine
296 296
   @param fmt the formater to print on
297 297
   @param pp_name name function printer
298 298
**)
299
let pp_clear_prototype m fmt pp_name =
300
  pp_base_prototype InOut m.mstatic [] fmt pp_name
299
let pp_clear_prototype m fmt =
300
  pp_base_prototype InOut m.mstatic [] fmt pp_clear_procedure_name
301 301

  
302 302

  
303 303
(* Procedure pretty print functions *)
......
312 312
   @param instrs instructions list
313 313
**)
314 314
let pp_procedure_definition pp_name pp_prototype pp_local pp_instr fmt (locals, instrs) =
315
  fprintf fmt "@[<v>%a is%t@[<v>%a%t@]@,begin@,  @[<v>%a%t@]@,end %t@]"
316
    pp_prototype pp_name
315
  fprintf fmt "@[<v>%t is%t@[<v>%a%t@]@,begin@,  @[<v>%a%t@]@,end %t@]"
316
    pp_prototype
317 317
    (Utils.pp_final_char_if_non_empty "@,  " locals)
318 318
    (Utils.fprintf_list ~sep:";@," pp_local) locals
319 319
    (Utils.pp_final_char_if_non_empty ";" locals)

Also available in: Unified diff