Changes between Version 6 and Version 7 of ExplicitCallStack/StackTraceExperience


Ignore:
Timestamp:
Feb 2, 2007 4:46:04 PM (9 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExplicitCallStack/StackTraceExperience

    v6 v7  
    88  * Andy Gill's HpcT tracer
    99  * The ghci debugger extended with a simple stack passing transformation. We will try both a full transformation and some kind of partial transformation (where only part of the code is transformed).
     10
     11== Test cases ==
    1012
    1113The test suite is a selection of programs from the nofig-buggy suite provided by the group at Technical University of Valencia. It is a modified version of the usual nofib benchmark suite. The suite can be obtained like so:
     
    1921  * anna: Julien's strictness analyzer. It has been modified to divide by zero.
    2022  * whatever
     23
     24=== Anna ===
     25
     26We test the program on the `big.cor` input file, which causes a divide by zero error.
     27
     28This is a rather simple bug:
     29{{{
     30utRandomInts s1 s2
     31   = let seed1_ok = 1 <= s1 && s1 <= 2147483562
     32         seed2_ok = 1 <= s2 && s2 <= 2147483398
     33
     34         rands :: Int -> Int -> [Int]
     35         rands s1 s2
     36            = let k    = s1 `div` 53668
     37                  s1'  = 40014 * (s1 - k * 53668) - k * 12211
     38                  s1'' = if s1' < 0 then s1' + 2147483563 else s1'
     39                -- BUG: The following line contains a bug
     40                  k'   = s2 `div` (s1' - s1')
     41                -- CORRECT -- k'   = s2 `div` 52774
     42}}}
     43The actual bug is in k', and it is local to that definition (it does not depen on values which flow into k').
     44
     45Nonetheless, utRandomInts seems to be called in a deep context.
    2146
    2247== Test results ==
     
    4772Commands to see stack trace:
    4873{{{
     74   ./Main < big.cor
    4975   hat-stack Main | less
    5076}}}