Ignore:
Timestamp:
Nov 23, 2011, 5:43:24 PM (9 years ago)
Author:
tranquil
Message:

merge of indexed labels branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/languages.mli

    r1488 r1542  
    3030  | AstASM     of ASM.program
    3131
     32
     33(** The type of additional transfromations, with the language they take place
     34    in and the actual transformation *)
     35type transformation = name * (ast -> ast)
     36
    3237(** [language_of_ast ast] returns the programming language of the
    3338    abstract syntax tree [ast]. *)
     
    4146(** {2 Compilation} *)
    4247
    43 (** [compile debug l1 l2] returns the compilation function that
    44     translates the language [l1] to the language [l2]. This may be the
     48(** [compile debug ts l1 l2] returns the compilation function that
     49    translates the language [l1] to the language [l2], employing the
     50    transformations in [ts] along the way . This may be the
    4551    composition of several compilation functions. If [debug] is
    4652    [true], all the intermediate programs are inserted in the
    4753    output. *)
    48 val compile : bool -> name -> name -> (ast -> ast list)
     54val compile : bool -> transformation list -> name -> name -> (ast -> ast list)
    4955
    5056(** [add_runtime ast] adds runtime functions for the operations not supported by
     
    6672val labelize : ast -> ast
    6773
    68 (** [annotate input_ast target_ast] inserts cost annotations into the input AST
    69     from the (final) target AST. It also returns the name of the cost variable,
    70     the name of the cost increment function, and a the name of a fresh
    71     uninitialized global variable for each external function. *)
    72 val annotate : ast -> ast -> (ast * string * string * string StringTools.Map.t)
     74(** [annotate cost_tern input_ast target_ast] inserts cost annotations into the
     75    input AST from the (final) target AST. It also returns the name of the cost
     76    variable and the name of the cost increment function, and a the name of a fresh
     77    uninitialized global variable for each external function. The [cost_tern] flag
     78    rules whether cost increments are given by ternary expressions or branch
     79    statements. *)
     80val annotate : bool -> ast -> ast -> (ast * string * string * string StringTools.Map.t)
    7381
    7482(** [interpret debug ast] runs the program [ast] from the default initial
Note: See TracChangeset for help on using the changeset viewer.