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

Kevin Reid kpreid at mac.com
Sun May 31 10:58:22 EDT 2009


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, I will revise generate(obj) in  
deSubgraphKit to throw if the unscope value is not a string.

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list