Eli   Documents

General Information

 o Eli: Translator Construction Made Easy
 o Global Index
 o Frequently Asked Questions
 o Typical Eli Usage Errors

Tutorials

 o Quick Reference Card
 o Guide For new Eli Users
 o Release Notes of Eli
 o Tutorial on Name Analysis
 o Tutorial on Scope Graphs
 o Tutorial on Type Analysis
 o Typical Eli Usage Errors

Reference Manuals

 o User Interface
 o Eli products and parameters
 o LIDO Reference Manual
 o Typical Eli Usage Errors

Libraries

 o Eli library routines
 o Specification Module Library

Translation Tasks

 o Lexical analysis specification
 o Syntactic Analysis Manual
 o Computation in Trees

Tools

 o LIGA Control Language
 o Debugging Information for LIDO
 o Graphical ORder TOol

 o FunnelWeb User's Manual

 o Pattern-based Text Generator
 o Property Definition Language
 o Operator Identification Language
 o Tree Grammar Specification Language
 o Command Line Processing
 o COLA Options Reference Manual

 o Generating Unparsing Code

 o Monitoring a Processor's Execution

Administration

 o System Administration Guide

Mail Home

Association of properties to definitions

Previous Chapter Next Chapter Table of Contents


Deferred Property Association

This module implements the technique of deferred property association: Many languages have constructs that define an identifier to denote the same object as another, different identifier does. Properties accessed or set via the one key should yield the same results or effects as if the other key was used. Typical examples for such constructs are type definitions or constant definitions.

The module is instantiated by

   $/Type/Defer.gnrc +referto=KEY :inst
The referto parameter modifies the names of Key attributes, and hence, has to be the same as the referto parameter used for the module instance that supplied those attributes.

The roles of this module relate keys to each other which represent the same object. That relation has to be acyclic. The properties are associated to the keys at the ends of those relation chains. A function is provided that walks down the chain when accessing a property from any of the related keys.

This technique also decouples the computations which establish the equivalence between keys from those which associate properties to keys. It avoids cyclic dependencies between computations in cases where properties of entities may be defined recursively, e.g. recursively defined types.

The property Defer implements the relation between keys described here. It should not be set otherwise than by using the SetDeferId role of this module.

Setting a property to a key that may be an end of a Defer chain should occur in the context of the SetDeferProp role.

If properties are accessed for a key k that may be on a Defer chain, the result of the call TransDefer (k) has to be used instead of the the key k itself, e.g. GetKind (TransDefer (k), NoKind).

This module uses the PropLib module (See Some Useful PDL Specifications of Association of properties to definitions,) to obtain the TransDefer function.

The module provides the following computational roles:

SetDeferId is a role for a defining occurrence of an identifier. It establishes the Defer relation from SetDeferId.|KEY|Key to point to SetDeferId.DeferredKey. A lower or upper computation for THIS.DeferredKey has to be provided. An attempt to complete a Defer cycle is not executed.

ChkSetDeferId is a role that may be inherited by any identifier occurrence. It checks whether an attempt was made to complete a Defer cycle involving this key. The role should be inherited together with SetDeferId, if Defer cycles are not otherwise excluded.

SetDeferProp is a role that characterizes a context where properties may be set to a key at the end of a Defer chain. Computations that associate the properties have to establish the postcondition represented by the VOID attribute SYNT.GotDeferProp. The role provides a default computation for SYNT.GotDeferProp that states the empty postcondition.

RootDefer is inherited by the grammar root by default.


Previous Chapter Next Chapter Table of Contents