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

Implement translation attributes #768

Closed krame505 closed 11 months ago

krame505 commented 1 year ago

Changes

This adds support for translation attributes. This involved some significant changes in the flow analysis and runtime.

This branch includes changes from #763 and #767, and should be reviewed after those are merged.

There is unfortunately a small but meaningful (~10%) performance regression with this change, even in specifications that don't use translation attributes. I think this is due to the overhead of creating and passing around some extra arrays for inherited attributes supplied to translation attributes, not sure how this can be realistically avoided.

Documentation

Translation attributes are discussed in our submitted SLE paper. Not sure if we should push on adding docs for translation attributes now, as this will need to be updated with the changes in #751. We may want to consider a more comprehensive restructuring of our documentation on decorated vs. undecorated trees in the future.