[racket] getting some weird toplevel values from zo-parse

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Tue May 24 14:08:53 EDT 2011

When I use zo-parse on some Typed Racket code, I'm seeing toplevel
references that try to index out-of-bounds of the enclosing prefix,
which doesn't seem right.  The AST I've been inspecting is a little
gnarly, so I'll upload it here:

    http://hashcollision.org/tmp/investigating.txt

I'm zo-parsing a file in my project and saving the results to that
file.  From inspection, there are toplevel entries in there, such as:

          (#s((def-values form 0 zo 0)
           (#s((toplevel expr 0 form 0 zo 0) 0 83 #t #f))
           #s((lam expr 0 form 0 zo 0)
              core
              ()
              8
              ...)))

and

        #s((def-values form 0 zo 0)
           (#s((toplevel expr 0 form 0 zo 0) 0 82 #t #f))
           #s((lam expr 0 form 0 zo 0)
              follow-dependencies
              ()
              5
              (val val val val val)
              ...)))


which appear to index into offset 83 and 82 of the prefix.  However,
the prefix is only supposed to have space for 7 num-lifts, plus 68
toplevels, plus 1 more bucket to hold syntax.  If I understand things
properly, the prefix is supposed to have 76 buckets in total, which
makes the above toplevel indices out of bounds.  What am I
misunderstanding about the structure of the prefix?


Posted on the users mailing list.