|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fmrisc.Syntax.Construct
public final class Construct
Construct abstract syntax trees.
Constructor Summary | |
---|---|
Construct()
|
Method Summary | |
---|---|
static AndFormula |
andFormula(Expression base1,
Expression base2)
construct conjunction with components base1 and base2 |
static ApplicationExpression |
applicationExpression(Expression base1,
Expression[] base2)
construct application of base1 to base2 |
static ArrayTerm |
arrayTerm(TypedIdentifier[] variables,
Expression base)
construct array term of variables and base term |
static ArrayType |
arrayType(Type index,
Type base)
construct array type with denoted index type and base type. |
static AtomicType |
atomicType(java.lang.String name)
construct atomic type with denoted name. |
static AxiomDeclaration |
axiomDeclaration(FormulaDeclIdentifier name,
Expression formula)
construct axiom declaration with denoted name and formula |
static DividesTerm |
dividesTerm(Expression base1,
Expression base2)
construct quotient with components base1 and base2 |
static EqualsFormula |
equalsFormula(Expression base1,
Expression base2)
construct equality with components base1 and base2 |
static EquivalentFormula |
equivalentFormula(Expression base1,
Expression base2)
construct equivalence with components base1 and base2 |
static ExistsFormula |
existsFormula(TypedIdentifier[] variables,
Expression base)
construct existentially quantifed formula of variables and base formula |
static ForallFormula |
forallFormula(TypedIdentifier[] variables,
Expression base)
construct universally quantifed formula of variables and base formula |
static FormulaDeclaration |
formulaDeclaration(FormulaDeclIdentifier name,
Expression formula)
construct formula declaration with denoted name and formula. |
static FormulaDeclIdentifier |
formulaDeclIdentifier(java.lang.String name)
construct formula declaration identifier with denoted name. |
static FunctionType |
functionType(Type[] domain,
Type range)
construct function type from types domain and range. |
static GreaterEqualFormula |
greaterEqualFormula(Expression base1,
Expression base2)
construct greater-than-or-equal formula with components base1 and base2 |
static GreaterFormula |
greaterFormula(Expression base1,
Expression base2)
construct greater-than formula with components base1 and base2 |
static IfThenElseExpression |
ifThenElseExpression(Expression condition,
Expression thenbranch,
Expression elsebranch)
construct if-then-else expressions from condition, thenbranch, elsebranch. |
static ImpliesFormula |
impliesFormula(Expression base1,
Expression base2)
construct implication with components base1 and base2 |
static LambdaTerm |
lambdaTerm(TypedIdentifier[] variables,
Expression base)
construct lambda term of variables and base term |
static LessEqualFormula |
lessEqualFormula(Expression base1,
Expression base2)
construct less-than-or-equal formula with components base1 and base2 |
static LessFormula |
lessFormula(Expression base1,
Expression base2)
construct less-than formula with components base1 and base2 |
static LetExpression |
letExpression(ValueDeclaration[] declarations,
Expression base)
construct let expressions of declarations and base expressions |
static LetType |
letType(TypeDeclaration[] declarations,
Type base)
construct let type of declarations and base type |
static Logical |
logical(boolean value)
construct logical constant with denoted value. |
static MinusTerm |
minusTerm(Expression base1,
Expression base2)
construct difference with components base1 and base2 |
static NegationTerm |
negationTerm(Expression base)
construct negation (minus term) of base term |
static NotEqualsFormula |
notEqualsFormula(Expression base1,
Expression base2)
construct inequality with components base1 and base2 |
static NotEquivalentFormula |
notEquivalentFormula(Expression base1,
Expression base2)
construct exclusive disjunction with components base1 and base2 |
static NotFormula |
notFormula(Expression base)
construct negation (not formula) of base formula |
static Number |
number(java.lang.String value)
construct number with denoted value. |
static OrFormula |
orFormula(Expression base1,
Expression base2)
construct disjunction with components base1 and base2 |
static PlusTerm |
plusTerm(Expression base1,
Expression base2)
construct binary sum with components base1 and base2 |
static PowerTerm |
powerTerm(Expression base1,
Expression base2)
construct power term with components base1 and base2 |
static RecordTerm |
recordTerm(ValuedIdentifier[] base)
construct record term of base terms |
static RecordType |
recordType(TypedIdentifier[] base)
construct record type with denoted base types. |
static Reference |
reference(java.lang.String name)
construct referenc with denoted name. |
static Reference |
reference(Symbol symbol)
Construct referenc from symbol. |
static Reference |
reference(TypeDeclIdentifier ident)
construct reference from type declaration identifier. |
static Reference |
reference(ValueDeclIdentifier ident)
construct reference from value declaration identifier. |
static SelectionTerm |
selectionTerm(Expression base1,
Selector base2)
construct component selection from base1 and base2 |
static SelectorIdentifier |
selectorIdentifier(Reference base)
make selector from identifier base |
static SelectorIndex |
selectorIndex(Expression base)
make selector from index expression base |
static SelectorNumber |
selectorNumber(Number base)
make selector from number base |
static SubrangeType |
subrangeType(Expression from,
Expression to)
construct subrangetype with denoted bounds. |
static SubType |
subType(Expression predicate)
construct subtype with denoted predicate. |
static TimesTerm |
timesTerm(Expression base1,
Expression base2)
construct binary product with components base1 and base2 |
static TupleTerm |
tupleTerm(Expression[] base)
construct tuple term of base terms |
static TupleType |
tupleType(Type[] base)
construct tuple type with denoted base types. |
static TypeDeclaration |
typeDeclaration(TypeDeclIdentifier name,
Type type)
construct type declaration with denoted name and type. |
static TypeDeclIdentifier |
typeDeclIdentifier(java.lang.String name)
construct type declaration identifier with denoted name. |
static TypedIdentifier |
typedIdentifier(ValueDeclIdentifier identifier,
Type type)
construct typed identifier from identifier and type. |
static UpdateTerm |
updateTerm(Expression base1,
Selector[] base2,
Expression value)
construct component update by index selection from base, base2, and base3 |
static ValueDeclaration |
valueDeclaration(ValueDeclIdentifier name,
Type type,
Expression value)
construct value declaration with denoted name, type and value. |
static ValueDeclIdentifier |
valueDeclIdentifier(java.lang.String name)
construct value declaration identifier with denoted name. |
static ValuedIdentifier |
valuedIdentifier(Reference identifier,
Expression value)
construct identifier with value from identifier and value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Construct()
Method Detail |
---|
public static Reference reference(java.lang.String name)
name
- the name of the reference
public static Reference reference(Symbol symbol)
symbol
- the symbol
public static Reference reference(ValueDeclIdentifier ident)
ident
- the name of the reference
public static Reference reference(TypeDeclIdentifier ident)
ident
- the name of the reference
public static ValueDeclIdentifier valueDeclIdentifier(java.lang.String name)
name
- the name of the identifier
public static TypeDeclIdentifier typeDeclIdentifier(java.lang.String name)
name
- the name of the identifier
public static FormulaDeclIdentifier formulaDeclIdentifier(java.lang.String name)
name
- the name of the identifier
public static TypedIdentifier typedIdentifier(ValueDeclIdentifier identifier, Type type)
identifier
- the identifiertype
- its type
public static ValuedIdentifier valuedIdentifier(Reference identifier, Expression value)
identifier
- the identifiervalue
- its value
public static Number number(java.lang.String value)
value
- the digit representation of the number
public static Logical logical(boolean value)
value
- the value of the constant
public static TypeDeclaration typeDeclaration(TypeDeclIdentifier name, Type type)
name
- the declared nametype
- the type associated to the name
public static FormulaDeclaration formulaDeclaration(FormulaDeclIdentifier name, Expression formula)
name
- the declared nameformula
- the formula associated to the name
public static AxiomDeclaration axiomDeclaration(FormulaDeclIdentifier name, Expression formula)
name
- the declared nameformula
- the formula associated to the name
public static ValueDeclaration valueDeclaration(ValueDeclIdentifier name, Type type, Expression value)
name
- the declared nametype
- the type associated to the namevalue
- the value associated to the name (may be null)
public static FunctionType functionType(Type[] domain, Type range)
domain
- the domain of the typerange
- the range of the type
public static AtomicType atomicType(java.lang.String name)
name
- the name of the type
public static TupleType tupleType(Type[] base)
base
- the base types
public static RecordType recordType(TypedIdentifier[] base)
base
- the base types (field:type pairs)
public static ArrayType arrayType(Type index, Type base)
index
- the index type of the arraybase
- the base type of the array
public static SubType subType(Expression predicate)
predicate
- the predicate defining the subtype
public static SubrangeType subrangeType(Expression from, Expression to)
from
- the lower boundto
- the upper bound
public static LetExpression letExpression(ValueDeclaration[] declarations, Expression base)
declarations
- the local bindings in the expressionsbase
- the base expressions
public static LetType letType(TypeDeclaration[] declarations, Type base)
declarations
- the local bindings in the typebase
- the base type
public static IfThenElseExpression ifThenElseExpression(Expression condition, Expression thenbranch, Expression elsebranch)
condition
- the formula deciding which branch is selectedthenbranch
- the branch selected if the formula yields true
public static NotFormula notFormula(Expression base)
base
- the base formula
public static NegationTerm negationTerm(Expression base)
base
- the base term
public static TupleTerm tupleTerm(Expression[] base)
base
- the array of base terms, base.length > 1
public static RecordTerm recordTerm(ValuedIdentifier[] base)
base
- the array of base terms, base.length > 1
public static LambdaTerm lambdaTerm(TypedIdentifier[] variables, Expression base)
variables
- the quantified variablesbase
- the base term
public static ArrayTerm arrayTerm(TypedIdentifier[] variables, Expression base)
variables
- the quantified variablesbase
- the base term
public static ForallFormula forallFormula(TypedIdentifier[] variables, Expression base)
variables
- the quantified variablesbase
- the base formula
public static ExistsFormula existsFormula(TypedIdentifier[] variables, Expression base)
variables
- the quantified variablesbase
- the base formula
public static AndFormula andFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static OrFormula orFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static EquivalentFormula equivalentFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static NotEquivalentFormula notEquivalentFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static ImpliesFormula impliesFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static EqualsFormula equalsFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static NotEqualsFormula notEqualsFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static PlusTerm plusTerm(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static MinusTerm minusTerm(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static TimesTerm timesTerm(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static DividesTerm dividesTerm(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static PowerTerm powerTerm(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static LessFormula lessFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static LessEqualFormula lessEqualFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static GreaterFormula greaterFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static GreaterEqualFormula greaterEqualFormula(Expression base1, Expression base2)
base1
- the first componentbase2
- the second component
public static SelectorIndex selectorIndex(Expression base)
base
- the selector base
public static SelectorNumber selectorNumber(Number base)
base
- the selector base
public static SelectorIdentifier selectorIdentifier(Reference base)
base
- the selector base
public static SelectionTerm selectionTerm(Expression base1, Selector base2)
base1
- the compound objectbase2
- the selector
public static UpdateTerm updateTerm(Expression base1, Selector[] base2, Expression value)
base1
- the compound objectbase2
- the sequence of selectorsvalue
- the update value
public static ApplicationExpression applicationExpression(Expression base1, Expression[] base2)
base1
- the function/predicatebase2
- the sequence of arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |