Chapter 13. Reflection

Reflection, the ability to treat language constructs as data, is implemented in Rosetta using abstract syntax structures, template expressions, and interpretation functions. Abstract syntax structures, or simply AST structures, are Rosetta data types that internally represent the abstract syntax of Rosetta expressions. These structures are defined as Rosetta data types and can be manipulated like any other data type. Specifically, constructors, recognizers, and observers are defined for each AST structure to support creating and observing Rosetta specifications. AST structures are in every wadomainy Rosetta data structures and are defined in the standard rosetta.lang.reflect library.

Template expressions define syntactic ...

Get System-Level Design with Rosetta now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.