General Information

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

Tutorials

 o Quick Reference Card
 o Guide For new Eli Users
 o Release Notes of Eli
 o Tutorial on Name Analysis
 o Tutorial on Type Analysis

Reference Manuals

 o User Interface
 o Eli products and parameters
 o LIDO Reference Manual

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

 Questions, Comments, ....
Open Postscript File

Type analysis tasks

In programming languages types are used to classify entities the program operates on. A type describes a set of values and the operations that can be applied to them. Program constructs that denote entities are said to have a type which restricts the set of values the construct may yield when it is evaluated. Program constructs that denote operations may restrict the types of the operands they are applied to. The meaning of an operation may be determined by the types of the operands. Type analysis determines the type of program constructs and of defined objects, it distinguishes overloaded operators using type information, and checks consistency with language rules on types. The result of the type analysis task is a precondition for the transformation of data objects and operations into a target language.

In languages other than programming languages we often find similar concepts that need to solve a type analysis task for implementing that language.

The section (See Basic Type Analysis) describes a module that provides a set of computational roles for language construct that define and use typed objects, that denote types, define and use names for them. The section (See Properties of Types) gives examples how to use the BasicType module for languages having user defined types (e.g. array types). The section (See Operator Identification) describes a module that supports specification and use of overloaded operators. This module fits to the BasicType module, but it does not require to use it. The module (See Deferred Property Association) provides computations that relate keys to each other which have the same properties associated. It is used if different identifiers shall conceptually refer to one object. The BasicType is based on the Defer module.

The modules of this library are based on the following implementation strategy: Types are represented by DefTableKeys. Hence, properties can be associated to a type to further characterize the type, as described in (See Properties of Types). NoKey is used to represent the unknown type. The specified language may allow to define type identifiers. Their keys are related to the keys representing their types. The property TypeOf associates the type of an object to its key.

Attributes named Type are associated to symbols describing the type of a program construct.

A complete executable specification of our running example for the type analysis task can be obtained by calling Eli and requesting

   $elipkg/Type/Examples > .

This request creates a subdirectory Examples in your current working directory containing the example specification Type.fw, test input files, and an Odinfile for automatic regression testing.