Flattening ASTs and other compiler data structures (2023)
21–30 of 52 posts
Re: Flattening ASTs and other compiler data structures (2023)
#22Rediscovering techniques that were somewhat well-known in the 70s and 80s. See also: https://en.wikipedia.org/wiki/Binary_heap
Re: Flattening ASTs and other compiler data structures (2023)
#23This is a fantastic idea. AST works well in an array based allocation block since it has no need for freeing individual nodes. It’s an add-only allocation.
Re: Flattening ASTs and other compiler data structures (2023)
#24Re: Flattening ASTs and other compiler data structures (2023)
#25Re: Flattening ASTs and other compiler data structures (2023)
#26Rediscovering techniques that were somewhat well-known in the 70s and 80s. See also: https://en.wikipedia.org/wiki/Binary_heap
Re: Flattening ASTs and other compiler data structures (2023)
#27Later the theory behind such structures was revealed as "Nested set model" [1]. The article seems to not mention the internal representation, but I think that the implementation should use something like my solution, so fixed number of references per node
Re: Flattening ASTs and other compiler data structures (2023)
#28Earlier quoted context omitted.
Makes me wonder if people in APL/J/K community have not been influenced or influencing this kind of technique. IIRC Aaron Hsu does tree processing through arrays (but i'm not skilled enough to analyze his code)
Do you have a link to such an example of Aaron's code? Thank you in advance!
Iverson's 1962 book also mentions tree representations, see pp45-62: https://archive.org/details/aprogramminglanguage1962/page/n6...
Re: Flattening ASTs and other compiler data structures (2023)
#29Earlier quoted context omitted.
Makes me wonder if people in APL/J/K community have not been influenced or influencing this kind of technique. IIRC Aaron Hsu does tree processing through arrays (but i'm not skilled enough to analyze his code)
Do you have a link to such an example of Aaron's code? Thank you in advance!