melt-umn / silver

An attribute grammar-based programming language for composable language extensions
http://melt.cs.umn.edu/silver/
GNU Lesser General Public License v3.0
57 stars 7 forks source link

Add support for decoration site projections #753

Closed krame505 closed 1 year ago

krame505 commented 1 year ago

Changes

This adds support for decoration-site flow projections.

The major additions required for this are:

The actual projection machinery in the flow inference driver was already there for pattern var flow projections, and could be reused pretty much unchanged.

See https://github.com/melt-umn/silver/compare/feature/dec-site-projections...feature/use-dec-site-projections for some changes using this feature in the Silver compiler; this will be submitted in a subsequent pull request.

Documentation

This feature isn't documented yet. I'm unsure how to proceed here, as an explanation of this is tied up in a larger discussion of unique references (which may be subject to change with #751) and approaches to forwarding. This will be laid out in my thesis proposal/a potential SLE paper, but I'm not sure if I should write something up for the website before merging this.

Comments have been added in the implementation as needed.