|
Orbital library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Expression
An interface for representations of expressions.
This interface is implemented by objects representing syntactic expressions like those created by
ExpressionBuilder.createAtomic(Symbol),
ExpressionBuilder.compose(Expression,Expression[]),
or ExpressionSyntax.createExpression(String).
Objects representing compound expressions implement Expression.Composite,
which can be used for decomposition and analysis of compound expressions.
Given a signature Σ we define a general term algebra and thus the (abstract) syntax of the
expressions. However, the abstract syntax notation does not say anything about the particular syntax.
| T(Σ) := | Union.τ T(Σ)τ | |
The terms (or expressions) of type τ are |
||
| T(Σ)τ := | ||
| Στ |
atomic symbols
|
|
| union {υ(t) ¦ υ in T(Σ)σ->τ and t in T(Σ)=<σ} |
composites (ascriptors)
|
|
| be minimal, i.e. min fix | ||
| The corresponding abstract syntax is | ||
| T(Σ)τ -> | ||
| Στ |
atomic symbols
|
|
| | T(Σ)σ->τ (T(Σ)=<σ) |
composites (ascriptors)
|
|
| The terms of subtypes of τ are | ||
| T(Σ)=<τ := | Unionρ=<τ T(Σ)ρ | |
currying
or product construction.
Also note that υ is not restricted to functions and predicates,
but is a meta-variable that may stand for any syntactic compositor.
With the above decomposition, terms are a graded magma with the magma Τ of types as graduation. Also Σ subset of T(Σ) operates (left and right) on T(Σ) by an action with which the graduation is compatible. However the compositions involved are partial and may result in errorneous type bottom or undefined terms.
For a set X with Σ section X subset of Σ0, T(Σ union X) is also a Σ-algebra of terms over Σ generated by X.
ExpressionBuilder,
ExpressionBuilder.createAtomic(Symbol),
ExpressionBuilder.compose(Expression,Expression[]),
ExpressionSyntax.createExpression(String)| Nested Class Summary | |
|---|---|
static interface |
Expression.Composite
The base interface for all composite expressions that are composed of other expressions. |
| Method Summary | |
|---|---|
Signature |
getSignature()
Get the subsignature appearing in this expression. |
| Methods inherited from interface orbital.logic.sign.type.Typed |
|---|
getType |
| Method Detail |
|---|
Signature getSignature()
|
Orbital library 1.2.0: 23 Apr 2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||