Changes between Version 6 and Version 7 of ExplicitCallStack/StackTraceExperience
- Timestamp:
- 02/02/07 08:46:04 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ExplicitCallStack/StackTraceExperience
v6 v7 8 8 * Andy Gill's HpcT tracer 9 9 * 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 == 10 12 11 13 The 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: … … 19 21 * anna: Julien's strictness analyzer. It has been modified to divide by zero. 20 22 * whatever 23 24 === Anna === 25 26 We test the program on the `big.cor` input file, which causes a divide by zero error. 27 28 This is a rather simple bug: 29 {{{ 30 utRandomInts 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 }}} 43 The actual bug is in k', and it is local to that definition (it does not depen on values which flow into k'). 44 45 Nonetheless, utRandomInts seems to be called in a deep context. 21 46 22 47 == Test results == … … 47 72 Commands to see stack trace: 48 73 {{{ 74 ./Main < big.cor 49 75 hat-stack Main | less 50 76 }}}
