In this paper, we present a new denotational semantics of attribute grammars (AGs) by using Cardelli's record calculus. This new denotational semantics is simple, natural and structure-oriented. AGs have been considered useful in describing interactive programming environments as well as in specifying the semantics of programming languages. Using AGs, interactive programming environments are often described as attributed trees with several AG extensions, e.g., higher-order features, subtree replacement, and remote access. Unfortunately, it was not easy to compare various definitions for these extensions in a formal way. One of the reasons is that previous studies for AG semantics are not structure-oriented, that is, they are based on attribute valuation, not an attributed tree itself. For example, AG semantics based on attribute valuation can not deal directly with program transformation such as a ´ (b + c) Þ a ´ b + a ´ c.
In our new semantics, an attributed tree is represented as a nested record to preserve the structural information of the attributed tree. This enables us to deal directly with attributed trees rather than attribute valuation as AG semantics. We also represent higher-order AGs, recursive AGs and OOAG as record calculus by extending the semantics to show that our semantics can formalize such AG extensions. Both of higher-order AGs and OOAG are computational models to deal with tree transformation depending on attribute values