Ignore:
Timestamp:
Dec 2, 2011, 7:49:19 PM (8 years ago)
Author:
tranquil
Message:

fighting with a bug of the translation from RTL to ERTL

File:
1 edited

Legend:

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

    r1542 r1585  
    55    Misc.ListExt.assoc_diff occs_trace1 occs_trace2
    66  in
    7   let check_trace (_, (_, trace1)) (_, (_, trace2)) =
     7  let check_trace (_, (res1, trace1)) (_, (res2, trace2)) =
     8    IntValue.Int32.eq res1 res2 &&
    89    compare_trace trace1 trace2 = []
    910  in
     
    2829      let diff = compare_trace trace1 trace2 in
    2930      Error.global_error "during trace comparison"
    30         (Printf.sprintf
    31            "The traces of two intermediate programs differ:\n%s"
    32            (print_trace lang1 lang2 diff))
     31        (Printf.sprintf "%s%s"
     32           (if res1 != res2 then
     33               Printf.sprintf
     34                 "The results of two intermediate programs differ:\n
     35                  in %s it was %d, in %s it was %d\n"
     36                 lang1
     37                 (IntValue.Int32.to_int res1)
     38                 lang2
     39                 (IntValue.Int32.to_int res2) else "")
     40           (Printf.sprintf "The traces of the two intermediate programs:\n%s"
     41           (print_trace lang1 lang2 diff)))
Note: See TracChangeset for help on using the changeset viewer.