[e-lang] deSubgraphKit bug: unscope can specify temps (please confirm)

Mark Miller erights at gmail.com
Sun May 31 15:22:13 EDT 2009


On Sun, May 31, 2009 at 7:58 AM, Kevin Reid <kpreid at mac.com> wrote:
> If the provided unscope contains an integer, it is interpreted as
> specifying a temp in the graph being serialized. This seems like a
> POLA violation to me, as well as an undesirable type-unsafety.
>
> ? def deSubgraphKit := <elib:serial.deSubgraphKit>
> # value: <deSubgraphKit>
>
> ? deSubgraphKit \
>  >  .makeRecognizer(null, ["a" => 0, __makeList => "__makeList"]) \
>  >  .recognize([["foo", "foo"], "a"],
>  >             deSubgraphKit.makeBuilder([=> __makeList]))
> # value: [["foo", "foo"], <***CYCLE***>]
>
> Note that in the general case, the unscope can designate objects it
> does not itself have access to.
>
> If it is agreed that this is a bug,

Yes, this is a bug.

> I will revise generate(obj) in
> deSubgraphKit to throw if the unscope value is not a string.

Thanks!


-- 
Text by me above is hereby placed in the public domain

    Cheers,
    --MarkM


More information about the e-lang mailing list