Benedikt Rosenau | 12 Aug 14:03

Bug report

Hallo Manuel,

I attached a short program to this mail. This program leads to
a segmentation fault both in interpreted and compiled mode.
Compiling with debug information and running through a debugger
shows that the problem comes from line 9 and 10 of the source
code. However, a backtrace shows that the program ran into an
endless loop without reason.

Regards,
   Benedikt
(module eliminate-showcase)
(define (replace-expression-with-symbol expr sym l)
  (cond
    ((equal? expr l) sym)
    ((list? l) (map (lambda (e) replace-expression-with-symbol expr sym e) l))
    (else l)))

(define (first-true-sublist l)
  (let loop ((work-list l))
    (if (null? work-list)
      l
      (let ((e (car work-list)))
        (if (list? e) (first-true-sublist e) (loop (cdr work-list)))))))

(define (eliminate l)
  (if (list? l)
    (let ((sym (gensym)) (sub-list (first-true-sublist l)))
(Continue reading)

Benedikt Rosenau | 12 Aug 14:14

Re: Bug report

Re,

Ouch, please ignore my last message. I changed the program with
the different Schemes and I made a mistake in the parentheses.
   Benedikt


Gmane