Ignore:
Timestamp:
Apr 4, 2011, 5:18:15 PM (10 years ago)
Author:
ayache
Message:

New memory model and bug fixes in 8051 branch. Added primitive operations in interpreters from Clight to LIN.

File:
1 edited

Legend:

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

    r640 r740  
    234234    [Pretty.print_program p ; ASMPrinter.print_program p]
    235235
    236 let save exact_output filename ast =
     236let save exact_output filename suffix ast =
    237237  let ext_chopped_filename =
    238     if exact_output then filename
     238    if exact_output then filename 
    239239    else
    240240      try Filename.chop_extension filename
    241241      with Invalid_argument ("Filename.chop_extension") -> filename in
     242  let ext_chopped_filename = ext_chopped_filename ^ suffix in
    242243  let ext_filenames =
    243244    List.map (fun ext -> ext_chopped_filename ^ "." ^ ext)
     
    261262  close_out cout
    262263
    263 let interpret print_result = function
     264let interpret debug = function
    264265  | AstClight p ->
    265     ClightInterpret.interpret print_result p
     266    ClightInterpret.interpret debug p
    266267  | AstCminor p ->
    267     CminorInterpret.interpret print_result
     268    CminorInterpret.interpret debug
    268269  | AstRTLabs p ->
    269     RTLabsInterpret.interpret print_result p
     270    RTLabsInterpret.interpret debug p
    270271  | AstRTL p ->
    271     RTLInterpret.interpret print_result p
     272    RTLInterpret.interpret debug p
    272273  | AstERTL p ->
    273     ERTLInterpret.interpret print_result p
     274    ERTLInterpret.interpret debug p
    274275  | AstLTL p ->
    275     LTLInterpret.interpret print_result p
     276    LTLInterpret.interpret debug p
    276277  | AstLIN p ->
    277     LINInterpret.interpret print_result p
     278    LINInterpret.interpret debug p
    278279  | AstASM p ->
    279     ASMInterpret.interpret print_result p
     280    ASMInterpret.interpret debug p
Note: See TracChangeset for help on using the changeset viewer.