Discussion:
[Larceny-users] uncatchable syntax violation
Marco Maggi
2009-11-01 15:05:51 UTC
Permalink
Ciao,

the form "(let ())" is a syntax violation, so the
following:

(import (rnrs) (rnrs eval))

(guard (E ((syntax-violation? E)
(display #t))
(else
(write E)))
(eval '(let ())
(environment '(rnrs))))

prints #t with Ikarus, Mosh and Ypsilon; with Larceny it
aborts the process with:

Syntax violation: let

Invalid form

Form: (let ())

Trace:

(let ())

#t

is this correct?
--
Marco Maggi
William D Clinger
2009-11-05 15:55:49 UTC
Permalink
Post by Marco Maggi
is this correct?
I'm not sure whether the R6RS allows Larceny's behavior.
In any case, I regard Larceny's behavior as undesirable,
and have logged it as a defect to be fixed:
https://trac.ccs.neu.edu/trac/larceny/ticket/658

Thank you for reporting this.

Will
Felix Klock
2009-11-05 16:10:53 UTC
Permalink
Post by William D Clinger
Post by Marco Maggi
is this correct?
I'm not sure whether the R6RS allows Larceny's behavior.
In any case, I regard Larceny's behavior as undesirable,
https://trac.ccs.neu.edu/trac/larceny/ticket/658
Thank you for reporting this.
Just a note: Larceny is spitting out a lot of extra text to the
console about the syntax violation, (which I do regard as undesirable
and probably a bug), but saying that Larceny "aborts the process" is
misleading (at least to someone like me, who interprets it to mean
that the operating system process terminates prematurely).

Consider the following:

(import (rnrs) (rnrs eval))

(guard (E ((syntax-violation? E) (display #t) (newline))
(else (write E)))
(eval '(let ())
(environment '(rnrs))))

(display "Process was not aborted")
(newline)

When I run this program, I get the following output:

Syntax violation: let

Invalid form

Form: (let ())

Trace:

(let ())

#t
Process was not aborted


So, on my system (Larceny 0.97), the computation is proceeding to run
the other expressions after the guard.

Marco: is this consistent with your experience? Or are you actually
seeing the operating system process terminate before the end of the
program has been reached?

-Felix
Marco Maggi
2009-11-05 19:30:17 UTC
Permalink
Marco: is this consistent with your experience? Or are
you actually seeing the operating system process terminate
before the end of the program has been reached?
I get the same thing you get. I "thought" the process was
terminated; I was tricked by the error message.
--
Marco Maggi
Loading...