Package: AstFactory

AstFactory

nameinstructionbranchcomplexitylinemethod
AstFactory()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
defaultName(ILexLocation)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getAUnresolvedType(ILexNameToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
getDefaultAccessSpecifier()
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getTypeList(APatternListTypePair)
M: 0 C: 22
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
initClassDefinition(SClassDefinition, ILexNameToken, List, List)
M: 0 C: 96
100%
M: 1 C: 3
75%
M: 1 C: 2
67%
M: 0 C: 23
100%
M: 0 C: 1
100%
initDefinition(PDefinition, Pass, ILexLocation, ILexNameToken, NameScope)
M: 0 C: 20
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
initExpression(PExp, ILexLocation)
M: 0 C: 9
100%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 4
100%
M: 0 C: 1
100%
initExpression(PExp, PExp)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
initExpressionBinary(SBinaryExp, PExp, LexToken, PExp)
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
initExpressionUnary(SUnaryExp, ILexLocation, PExp)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
initInvariantType(SInvariantType)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
initPattern(PPattern, ILexLocation)
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
initStateDesignator(PStateDesignator, ILexLocation)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
initStatement(PStm, ILexLocation)
M: 0 C: 9
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
initType(PType, ILexLocation)
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
initUnionType(AUnionType)
M: 0 C: 41
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 11
100%
M: 0 C: 1
100%
newAAbsoluteUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAAccessSpecifierAccessSpecifier(PAccess, boolean, boolean)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
newAAccessSpecifierAccessSpecifier(PAccess, boolean, boolean, boolean)
M: 0 C: 31
100%
M: 0 C: 4
100%
M: 0 C: 3
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAAllExport(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAAllImport(ILexNameToken)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAAlwaysStm(ILexLocation, PStm, PStm)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAAndBooleanBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAAnnotatedStm(ILexLocation, PAnnotation, PStm)
M: 15 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
newAAnnotatedUnaryExp(ILexLocation, PAnnotation, PExp)
M: 13 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
newAAnnotationAnnotation(ILexIdentifierToken, List)
M: 12 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
newAApplyExp(PExp)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAApplyExp(PExp, List)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAApplyExpressionTraceCoreDefinition(PStm, String)
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newAApplyObjectDesignator(PObjectDesignator, List)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAAssignmentDefinition(ILexNameToken, PType, PExp)
M: 0 C: 23
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAAssignmentStm(ILexLocation, PStateDesignator, PExp)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAAtomicStm(ILexLocation, List)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newABlockSimpleBlockStm(ILexLocation, List)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newABooleanBasicType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newABooleanConstExp(LexBooleanToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newABooleanPattern(LexBooleanToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newABracketType(ILexLocation, PType)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newABracketedExpressionTraceCoreDefinition(ILexLocation, List)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newACallObjectStm(PObjectDesignator, ILexIdentifierToken, List)
M: 0 C: 26
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 8
100%
M: 0 C: 1
100%
newACallObjectStm(PObjectDesignator, ILexNameToken, List)
M: 0 C: 27
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 8
100%
M: 0 C: 1
100%
newACallStm(ILexNameToken, List)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newACardinalityUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newACaseAlternative(PExp, PPattern, PExp)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newACaseAlternativeStm(PPattern, PStm)
M: 0 C: 20
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newACasesExp(ILexLocation, PExp, List, PExp)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newACasesStm(ILexLocation, PExp, List, PStm)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newACharBasicType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newACharLiteralExp(LexCharacterToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newACharacterPattern(LexCharacterToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAClassClassDefinition()
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
newAClassClassDefinition(ILexNameToken, List, List)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAClassInvariantDefinition(ILexNameToken, PExp)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAClassInvariantStm(ILexNameToken, List)
M: 0 C: 20
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAClassType(ILexLocation, SClassDefinition)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newACompBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAConcatenationPattern(PPattern, ILexLocation, PPattern)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAConcurrentExpressionTraceCoreDefinition(ILexLocation, List)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newACyclesStm(ILexLocation, PExp, PStm)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newADefExp(ILexLocation, List, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newADefPatternBind(ILexLocation, Object)
M: 15 C: 31
67%
M: 1 C: 3
75%
M: 1 C: 2
67%
M: 2 C: 9
82%
M: 0 C: 1
100%
newADistConcatUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newADistIntersectUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newADistMergeUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newADistUnionUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newADivNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newADivideNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newADomainResByBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newADomainResToBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newADurationStm(ILexLocation, PExp, PStm)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAElementsUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAElseIfExp(ILexLocation, PExp, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAElseIfStm(ILexLocation, PExp, PStm)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAEqRelation(PPattern, PPattern, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAEqualsBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAEqualsDefinition(ILexLocation)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAEqualsDefinition(ILexLocation, ATypeBind, PExp)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAEqualsDefinition(ILexLocation, PBind, PExp)
M: 4 C: 22
85%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 7
88%
M: 0 C: 1
100%
newAEqualsDefinition(ILexLocation, PPattern, PExp)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAEquivalentBooleanBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAErrorCase(LexIdentifierToken, PExp, PExp)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newAErrorStm(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAExists1Exp(ILexLocation, PBind, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAExistsExp(ILexLocation, List, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAExitStm(ILexLocation)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAExitStm(ILexLocation, PExp)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAExplicitFunctionDefinition(ILexNameToken, NameScope, List, AFunctionType, List, PExp, PExp, PExp, boolean, PExp)
M: 0 C: 83
100%
M: 0 C: 6
100%
M: 0 C: 4
100%
M: 0 C: 19
100%
M: 0 C: 1
100%
newAExplicitOperationDefinition(ILexNameToken, AOperationType, List, PExp, PExp, PStm)
M: 0 C: 32
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 9
100%
M: 0 C: 1
100%
newAExpressionPattern(PExp)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAExternalClause(ILexToken, List, PType)
M: 0 C: 24
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAExternalDefinition(PDefinition, ILexToken)
M: 0 C: 34
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAFieldExp(PExp, ILexIdentifierToken)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAFieldExp(PExp, ILexNameToken)
M: 0 C: 32
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAFieldField(ILexNameToken, String, PType, boolean)
M: 0 C: 22
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAFieldNumberExp(PExp, LexIntegerToken)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAFieldObjectDesignator(PObjectDesignator, ILexIdentifierToken)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAFieldObjectDesignator(PObjectDesignator, ILexNameToken)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAFieldStateDesignator(PStateDesignator, ILexIdentifierToken)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAFloorUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAForAllExp(ILexLocation, List, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAForAllStm(ILexLocation, PPattern, PExp, PStm)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAForIndexStm(ILexLocation, ILexNameToken, PExp, PExp, PExp, PStm)
M: 0 C: 24
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 8
100%
M: 0 C: 1
100%
newAForPatternBindStm(ILexLocation, ADefPatternBind, boolean, PExp, PStm)
M: 0 C: 22
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAFromModuleImports(ILexIdentifierToken, List)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newAFuncInstatiationExp(PExp, List)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAFunctionExport(ILexLocation, List, PType, List)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAFunctionType(ILexLocation, boolean, List, PType)
M: 0 C: 22
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAFunctionValueImport(ILexNameToken, PType, LexNameList, ILexNameToken)
M: 0 C: 22
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAGreaterEqualNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAGreaterNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAHeadUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAHistoryExp(ILexLocation, LexToken, LexNameList)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAIdentifierObjectDesignator(ILexNameToken)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAIdentifierPattern(ILexNameToken)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAIdentifierStateDesignator(ILexNameToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAIfExp(ILexLocation, PExp, PExp, List, PExp)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAIfStm(ILexLocation, PExp, PStm, List, PStm)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAIgnorePattern(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAImplicitFunctionDefinition(ILexNameToken, NameScope, List, List, APatternTypePair, PExp, PExp, PExp, PExp)
M: 0 C: 98
100%
M: 1 C: 5
83%
M: 1 C: 3
75%
M: 0 C: 23
100%
M: 0 C: 1
100%
newAImplicitOperationDefinition(ILexNameToken, List, APatternTypePair, PStm, ASpecificationStm)
M: 0 C: 80
100%
M: 0 C: 4
100%
M: 0 C: 3
100%
M: 0 C: 18
100%
M: 0 C: 1
100%
newAImpliesBooleanBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAImportedDefinition(ILexLocation, PDefinition)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAInMapMapType(ILexLocation, PType, PType)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAInSetBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAIndicesUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAInheritedDefinition(ILexNameToken, PDefinition)
M: 0 C: 37
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 8
100%
M: 0 C: 1
100%
newAInstanceVariableDefinition(ILexNameToken, PType, PExp)
M: 0 C: 39
100%
M: 1 C: 3
75%
M: 1 C: 2
67%
M: 0 C: 9
100%
M: 0 C: 1
100%
newAIntLiteralExp(LexIntegerToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAIntNumericBasicType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAIntegerPattern(LexIntegerToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAIotaExp(ILexLocation, PBind, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAIsExp(ILexLocation, ILexNameToken, PExp)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAIsExp(ILexLocation, PType, PExp)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAIsOfBaseClassExp(ILexLocation, ILexNameToken, PExp)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAIsOfClassExp(ILexLocation, ILexNameToken, PExp)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newALambdaExp(ILexLocation, List, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newALenUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newALessEqualNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newALessNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newALetBeStBindingTraceDefinition(ILexLocation, PMultipleBind, PExp, PTraceDefinition)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newALetBeStExp(ILexLocation, PMultipleBind, PExp, PExp)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newALetBeStStm(ILexLocation, PMultipleBind, PExp, PStm)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newALetDefBindingTraceDefinition(ILexLocation, List, PTraceDefinition)
M: 0 C: 7
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newALetDefExp(ILexLocation, List, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newALetStm(ILexLocation, List, PStm, boolean)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newALocalDefinition(ILexLocation, ILexNameToken, NameScope, PType)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAMapCompMapExp(ILexLocation, AMapletExp, List, PExp)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAMapDomainUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAMapEnumMapExp(ILexLocation)
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAMapEnumMapExp(ILexLocation, List)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAMapInverseUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAMapMapType(ILexLocation)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAMapMapType(ILexLocation, PType, PType)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAMapPattern(ILexLocation, List)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAMapRangeUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAMapSeqStateDesignator(PStateDesignator, PExp)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAMapUnionBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAMapUnionPattern(PPattern, ILexLocation, PPattern)
M: 15 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
newAMapletExp(PExp, LexToken, PExp)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAMapletPatternMaplet(PPattern, PPattern)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAMkBasicExp(SBasicType, PExp)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAMkTypeExp(ILexNameToken, List)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAModNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAModuleExports(List)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newAModuleImports(ILexIdentifierToken, List)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newAModuleModules()
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newAModuleModules(File, List)
M: 0 C: 90
100%
M: 1 C: 7
88%
M: 1 C: 4
80%
M: 0 C: 22
100%
M: 0 C: 1
100%
newAModuleModules(LexIdentifierToken, AModuleImports, AModuleExports, List)
M: 0 C: 59
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 15
100%
M: 0 C: 1
100%
newAMuExp(ILexLocation, PExp, List)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAMultiBindListDefinition(ILexLocation, List)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAMutexSyncDefinition(ILexLocation, LexNameList)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newANamePatternPair(ILexNameToken, PPattern)
M: 16 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
newANamedInvariantType(ILexNameToken, PType)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newANamedTraceDefinition(ILexLocation, List, List)
M: 0 C: 57
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 11
100%
M: 0 C: 1
100%
newANarrowExpression(ILexLocation, ILexNameToken, PExp)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newANarrowExpression(ILexLocation, PType, PExp)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newANatNumericBasicType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newANatOneNumericBasicType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newANewExp(ILexLocation, ILexIdentifierToken, List)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newANewObjectDesignator(LexIdentifierToken, List)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newANilExp(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newANilPattern(LexKeywordToken)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newANonDeterministicSimpleBlockStm(ILexLocation)
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newANotEqualBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newANotInSetBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newANotUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newANotYetSpecifiedExp(ILexLocation)
M: 0 C: 16
100%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 5
100%
M: 0 C: 1
100%
newANotYetSpecifiedStm(ILexLocation)
M: 0 C: 14
100%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAObjectPattern(ILexNameToken, List)
M: 20 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
newAOperationExport(ILexLocation, List, PType)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAOperationType(ILexLocation)
M: 0 C: 22
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAOperationType(ILexLocation, List, PType)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAOperationValueImport(ILexNameToken, PType, ILexNameToken)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAOptionalType(ILexLocation, PType)
M: 0 C: 20
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAOrBooleanBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAOrdRelation(PPattern, PPattern, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAParameterType(ILexNameToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAPatternListTypePair(List, PType)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAPatternTypePair(PPattern, PType)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAPerSyncDefinition(ILexLocation, ILexNameToken, PExp)
M: 0 C: 25
100%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAPeriodicStm(ILexNameToken, List)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAPlusNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAPlusPlusBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAPostOpExp(ILexNameToken, PExp, PExp, List, AStateDefinition)
M: 0 C: 25
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 8
100%
M: 0 C: 1
100%
newAPowerSetUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAPreExp(ILexLocation, PExp, List)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAPreOpExp(ILexNameToken, PExp, List, AStateDefinition)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAProductType(ILexLocation, List)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAProperSubsetBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAQuoteLiteralExp(ILexQuoteToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAQuotePattern(LexQuoteToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAQuoteType(ILexQuoteToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newARangeResByBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newARangeResToBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newARationalNumericBasicType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newARealLiteralExp(LexRealToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newARealNumericBasicType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newARealPattern(LexRealToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newARecordInvariantType(ILexLocation, List)
M: 0 C: 20
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newARecordInvariantType(ILexNameToken, List)
M: 0 C: 22
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newARecordModifier(LexIdentifierToken, PExp)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newARecordPattern(ILexNameToken, List)
M: 0 C: 20
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newARemNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newARenamedDefinition(ILexNameToken, PDefinition)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newARepeatTraceDefinition(ILexLocation, PTraceCoreDefinition, long, long)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newAReturnStm(ILexLocation)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAReturnStm(ILexLocation, PExp)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAReverseUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newASameBaseClassExp(ILexLocation, List)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASameClassExp(ILexLocation, List)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASelfExp(ILexLocation)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newASelfObjectDesignator(ILexLocation)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newASeq1SeqType(ILexLocation, PType)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASeqBind(PPattern, PExp)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASeqCompSeqExp(ILexLocation, PExp, PBind, PExp)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newASeqConcatBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newASeqEnumSeqExp(ILexLocation)
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newASeqEnumSeqExp(ILexLocation, List)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newASeqMultipleBind(List, PExp)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASeqPattern(ILexLocation, List)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newASeqSeqType(ILexLocation)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASeqSeqType(ILexLocation, PType)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASet1SetType(ILexLocation)
M: 17 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
newASet1SetType(ILexLocation, PType)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASetBind(PPattern, PExp)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASetCompSetExp(ILexLocation, PExp, List, PExp)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newASetDifferenceBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newASetEnumSetExp(ILexLocation)
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newASetEnumSetExp(ILexLocation, List)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newASetIntersectBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newASetMultipleBind(List, PExp)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASetPattern(ILexLocation, List)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASetRangeSetExp(ILexLocation, PExp, PExp)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASetSetType(ILexLocation)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASetSetType(ILexLocation, PType)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newASetUnionBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newASkipStm(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newASpecificationStm(ILexLocation, List, PExp, PExp, List)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newASporadicStm(ILexNameToken, List)
M: 16 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
newAStarStarBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAStartStm(ILexLocation, PExp)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAStateDefinition(ILexNameToken, List, PPattern, PExp, PPattern, PExp)
M: 0 C: 118
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 24
100%
M: 0 C: 1
100%
newAStateInitExp(AStateDefinition)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAStopStm(ILexLocation, PExp)
M: 12 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
newAStringLiteralExp(ILexStringToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAStringPattern(LexStringToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newASubclassResponsibilityExp(ILexLocation)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newASubclassResponsibilityStm(ILexLocation)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newASubseqExp(PExp, PExp, PExp)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newASubsetBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newASubstractNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newASystemClassDefinition(ILexNameToken, List)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newATailUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAThreadDefinition(PStm)
M: 0 C: 38
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 7
100%
M: 0 C: 1
100%
newAThreadIdExp(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newATimeExp(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newATimesNumericBinaryExp(PExp, LexToken, PExp)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newATixeStm(ILexLocation, List, PStm)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newATixeStmtAlternative(ADefPatternBind, PStm)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newATokenBasicType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newATraceDefinitionTerm(List)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newATrapStm(ILexLocation, ADefPatternBind, PStm, PStm)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newATupleExp(ILexLocation, List)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newATuplePattern(ILexLocation, List)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newATypeBind(PPattern, PType)
M: 0 C: 16
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newATypeDefinition(ILexNameToken, SInvariantType, PPattern, PExp)
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newATypeDefinition(ILexNameToken, SInvariantType, PPattern, PExp, AEqRelation, AOrdRelation)
M: 5 C: 47
90%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 1 C: 13
93%
M: 0 C: 1
100%
newATypeExport(ILexNameToken, boolean)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newATypeImport(ATypeDefinition, ILexNameToken)
M: 0 C: 21
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newATypeImport(ILexNameToken, ILexNameToken)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newATypeMultipleBind(List, PType)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAUnaryMinusUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAUnaryPlusUnaryExp(ILexLocation, PExp)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAUndefinedExp(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAUndefinedType(ILexLocation)
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
newAUnionPattern(PPattern, ILexLocation, PPattern)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAUnionType(ILexLocation, List)
M: 0 C: 18
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAUnionType(ILexLocation, PType, PType)
M: 0 C: 30
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 9
100%
M: 0 C: 1
100%
newAUnknownType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAUnresolvedType(ILexNameToken)
M: 0 C: 13
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
newAUntypedDefinition(ILexLocation, ILexNameToken, NameScope)
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAValueDefinition(PPattern, NameScope, PType, PExp)
M: 0 C: 54
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 11
100%
M: 0 C: 1
100%
newAValueExport(ILexLocation, List, PType)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAValueValueImport(LexNameToken, PType, LexNameToken)
M: 0 C: 19
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
newAVariableExp(ILexNameToken)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newAVoidReturnType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAVoidType(ILexLocation)
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
newAWhileStm(ILexLocation, PExp, PStm)
M: 0 C: 15
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
newPeriodicAThreadDefinition(ILexNameToken, List)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
newSporadicAThreadDefinition(ILexNameToken, List)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%

Coverage

1: /*
2: * #%~
3: * The Overture Abstract Syntax Tree
4: * %%
5: * Copyright (C) 2008 - 2014 Overture
6: * %%
7: * This program is free software: you can redistribute it and/or modify
8: * it under the terms of the GNU General Public License as
9: * published by the Free Software Foundation, either version 3 of the
10: * License, or (at your option) any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public
18: * License along with this program. If not, see
19: * <http://www.gnu.org/licenses/gpl-3.0.html>.
20: * #~%
21: */
22: package org.overture.ast.factory;
23:
24: import java.io.File;
25: import java.util.ArrayList;
26: import java.util.LinkedList;
27: import java.util.List;
28: import java.util.Vector;
29:
30: import org.overture.ast.annotations.AAnnotationAnnotation;
31: import org.overture.ast.annotations.PAnnotation;
32: import org.overture.ast.assistant.AstAssistantFactory;
33: import org.overture.ast.assistant.IAstAssistantFactory;
34: import org.overture.ast.definitions.AAssignmentDefinition;
35: import org.overture.ast.definitions.AClassClassDefinition;
36: import org.overture.ast.definitions.AClassInvariantDefinition;
37: import org.overture.ast.definitions.AEqualsDefinition;
38: import org.overture.ast.definitions.AExplicitFunctionDefinition;
39: import org.overture.ast.definitions.AExplicitOperationDefinition;
40: import org.overture.ast.definitions.AExternalDefinition;
41: import org.overture.ast.definitions.AImplicitFunctionDefinition;
42: import org.overture.ast.definitions.AImplicitOperationDefinition;
43: import org.overture.ast.definitions.AImportedDefinition;
44: import org.overture.ast.definitions.AInheritedDefinition;
45: import org.overture.ast.definitions.AInstanceVariableDefinition;
46: import org.overture.ast.definitions.ALocalDefinition;
47: import org.overture.ast.definitions.AMultiBindListDefinition;
48: import org.overture.ast.definitions.AMutexSyncDefinition;
49: import org.overture.ast.definitions.ANamedTraceDefinition;
50: import org.overture.ast.definitions.APerSyncDefinition;
51: import org.overture.ast.definitions.APrivateAccess;
52: import org.overture.ast.definitions.ARenamedDefinition;
53: import org.overture.ast.definitions.AStateDefinition;
54: import org.overture.ast.definitions.ASystemClassDefinition;
55: import org.overture.ast.definitions.AThreadDefinition;
56: import org.overture.ast.definitions.ATypeDefinition;
57: import org.overture.ast.definitions.AUntypedDefinition;
58: import org.overture.ast.definitions.AValueDefinition;
59: import org.overture.ast.definitions.PAccess;
60: import org.overture.ast.definitions.PDefinition;
61: import org.overture.ast.definitions.SClassDefinition;
62: import org.overture.ast.definitions.relations.AEqRelation;
63: import org.overture.ast.definitions.relations.AOrdRelation;
64: import org.overture.ast.definitions.traces.AApplyExpressionTraceCoreDefinition;
65: import org.overture.ast.definitions.traces.ABracketedExpressionTraceCoreDefinition;
66: import org.overture.ast.definitions.traces.AConcurrentExpressionTraceCoreDefinition;
67: import org.overture.ast.definitions.traces.ALetBeStBindingTraceDefinition;
68: import org.overture.ast.definitions.traces.ALetDefBindingTraceDefinition;
69: import org.overture.ast.definitions.traces.ARepeatTraceDefinition;
70: import org.overture.ast.definitions.traces.ATraceDefinitionTerm;
71: import org.overture.ast.definitions.traces.PTraceCoreDefinition;
72: import org.overture.ast.definitions.traces.PTraceDefinition;
73: import org.overture.ast.expressions.*;
74: import org.overture.ast.intf.lex.ILexIdentifierToken;
75: import org.overture.ast.intf.lex.ILexLocation;
76: import org.overture.ast.intf.lex.ILexNameToken;
77: import org.overture.ast.intf.lex.ILexQuoteToken;
78: import org.overture.ast.intf.lex.ILexStringToken;
79: import org.overture.ast.intf.lex.ILexToken;
80: import org.overture.ast.lex.LexBooleanToken;
81: import org.overture.ast.lex.LexCharacterToken;
82: import org.overture.ast.lex.LexIdentifierToken;
83: import org.overture.ast.lex.LexIntegerToken;
84: import org.overture.ast.lex.LexKeywordToken;
85: import org.overture.ast.lex.LexLocation;
86: import org.overture.ast.lex.LexNameList;
87: import org.overture.ast.lex.LexNameToken;
88: import org.overture.ast.lex.LexQuoteToken;
89: import org.overture.ast.lex.LexRealToken;
90: import org.overture.ast.lex.LexStringToken;
91: import org.overture.ast.lex.LexToken;
92: import org.overture.ast.lex.VDMToken;
93: import org.overture.ast.messages.InternalException;
94: import org.overture.ast.modules.AAllExport;
95: import org.overture.ast.modules.AAllImport;
96: import org.overture.ast.modules.AFromModuleImports;
97: import org.overture.ast.modules.AFunctionExport;
98: import org.overture.ast.modules.AFunctionValueImport;
99: import org.overture.ast.modules.AModuleExports;
100: import org.overture.ast.modules.AModuleImports;
101: import org.overture.ast.modules.AModuleModules;
102: import org.overture.ast.modules.AOperationExport;
103: import org.overture.ast.modules.AOperationValueImport;
104: import org.overture.ast.modules.ATypeExport;
105: import org.overture.ast.modules.ATypeImport;
106: import org.overture.ast.modules.AValueExport;
107: import org.overture.ast.modules.AValueValueImport;
108: import org.overture.ast.modules.PExport;
109: import org.overture.ast.modules.PImport;
110: import org.overture.ast.node.tokens.TAsync;
111: import org.overture.ast.node.tokens.TStatic;
112: import org.overture.ast.patterns.ABooleanPattern;
113: import org.overture.ast.patterns.ACharacterPattern;
114: import org.overture.ast.patterns.AConcatenationPattern;
115: import org.overture.ast.patterns.ADefPatternBind;
116: import org.overture.ast.patterns.AExpressionPattern;
117: import org.overture.ast.patterns.AIdentifierPattern;
118: import org.overture.ast.patterns.AIgnorePattern;
119: import org.overture.ast.patterns.AIntegerPattern;
120: import org.overture.ast.patterns.AMapPattern;
121: import org.overture.ast.patterns.AMapUnionPattern;
122: import org.overture.ast.patterns.AMapletPatternMaplet;
123: import org.overture.ast.patterns.ANamePatternPair;
124: import org.overture.ast.patterns.ANilPattern;
125: import org.overture.ast.patterns.AObjectPattern;
126: import org.overture.ast.patterns.APatternListTypePair;
127: import org.overture.ast.patterns.APatternTypePair;
128: import org.overture.ast.patterns.AQuotePattern;
129: import org.overture.ast.patterns.ARealPattern;
130: import org.overture.ast.patterns.ARecordPattern;
131: import org.overture.ast.patterns.ASeqBind;
132: import org.overture.ast.patterns.ASeqMultipleBind;
133: import org.overture.ast.patterns.ASeqPattern;
134: import org.overture.ast.patterns.ASetBind;
135: import org.overture.ast.patterns.ASetMultipleBind;
136: import org.overture.ast.patterns.ASetPattern;
137: import org.overture.ast.patterns.AStringPattern;
138: import org.overture.ast.patterns.ATuplePattern;
139: import org.overture.ast.patterns.ATypeBind;
140: import org.overture.ast.patterns.ATypeMultipleBind;
141: import org.overture.ast.patterns.AUnionPattern;
142: import org.overture.ast.patterns.PBind;
143: import org.overture.ast.patterns.PMultipleBind;
144: import org.overture.ast.patterns.PPattern;
145: import org.overture.ast.statements.AAlwaysStm;
146: import org.overture.ast.statements.AAnnotatedStm;
147: import org.overture.ast.statements.AApplyObjectDesignator;
148: import org.overture.ast.statements.AAssignmentStm;
149: import org.overture.ast.statements.AAtomicStm;
150: import org.overture.ast.statements.ABlockSimpleBlockStm;
151: import org.overture.ast.statements.ACallObjectStm;
152: import org.overture.ast.statements.ACallStm;
153: import org.overture.ast.statements.ACaseAlternativeStm;
154: import org.overture.ast.statements.ACasesStm;
155: import org.overture.ast.statements.AClassInvariantStm;
156: import org.overture.ast.statements.ACyclesStm;
157: import org.overture.ast.statements.ADurationStm;
158: import org.overture.ast.statements.AElseIfStm;
159: import org.overture.ast.statements.AErrorCase;
160: import org.overture.ast.statements.AErrorStm;
161: import org.overture.ast.statements.AExitStm;
162: import org.overture.ast.statements.AExternalClause;
163: import org.overture.ast.statements.AFieldObjectDesignator;
164: import org.overture.ast.statements.AFieldStateDesignator;
165: import org.overture.ast.statements.AForAllStm;
166: import org.overture.ast.statements.AForIndexStm;
167: import org.overture.ast.statements.AForPatternBindStm;
168: import org.overture.ast.statements.AIdentifierObjectDesignator;
169: import org.overture.ast.statements.AIdentifierStateDesignator;
170: import org.overture.ast.statements.AIfStm;
171: import org.overture.ast.statements.ALetBeStStm;
172: import org.overture.ast.statements.ALetStm;
173: import org.overture.ast.statements.AMapSeqStateDesignator;
174: import org.overture.ast.statements.ANewObjectDesignator;
175: import org.overture.ast.statements.ANonDeterministicSimpleBlockStm;
176: import org.overture.ast.statements.ANotYetSpecifiedStm;
177: import org.overture.ast.statements.APeriodicStm;
178: import org.overture.ast.statements.AReturnStm;
179: import org.overture.ast.statements.ASelfObjectDesignator;
180: import org.overture.ast.statements.ASkipStm;
181: import org.overture.ast.statements.ASpecificationStm;
182: import org.overture.ast.statements.ASporadicStm;
183: import org.overture.ast.statements.AStartStm;
184: import org.overture.ast.statements.AStopStm;
185: import org.overture.ast.statements.ASubclassResponsibilityStm;
186: import org.overture.ast.statements.ATixeStm;
187: import org.overture.ast.statements.ATixeStmtAlternative;
188: import org.overture.ast.statements.ATrapStm;
189: import org.overture.ast.statements.AWhileStm;
190: import org.overture.ast.statements.PObjectDesignator;
191: import org.overture.ast.statements.PStateDesignator;
192: import org.overture.ast.statements.PStm;
193: import org.overture.ast.typechecker.ClassDefinitionSettings;
194: import org.overture.ast.typechecker.NameScope;
195: import org.overture.ast.typechecker.Pass;
196: import org.overture.ast.types.AAccessSpecifierAccessSpecifier;
197: import org.overture.ast.types.ABooleanBasicType;
198: import org.overture.ast.types.ABracketType;
199: import org.overture.ast.types.ACharBasicType;
200: import org.overture.ast.types.AClassType;
201: import org.overture.ast.types.AFieldField;
202: import org.overture.ast.types.AFunctionType;
203: import org.overture.ast.types.AInMapMapType;
204: import org.overture.ast.types.AIntNumericBasicType;
205: import org.overture.ast.types.AMapMapType;
206: import org.overture.ast.types.ANamedInvariantType;
207: import org.overture.ast.types.ANatNumericBasicType;
208: import org.overture.ast.types.ANatOneNumericBasicType;
209: import org.overture.ast.types.AOperationType;
210: import org.overture.ast.types.AOptionalType;
211: import org.overture.ast.types.AParameterType;
212: import org.overture.ast.types.AProductType;
213: import org.overture.ast.types.AQuoteType;
214: import org.overture.ast.types.ARationalNumericBasicType;
215: import org.overture.ast.types.ARealNumericBasicType;
216: import org.overture.ast.types.ARecordInvariantType;
217: import org.overture.ast.types.ASeq1SeqType;
218: import org.overture.ast.types.ASeqSeqType;
219: import org.overture.ast.types.ASet1SetType;
220: import org.overture.ast.types.ASetSetType;
221: import org.overture.ast.types.ATokenBasicType;
222: import org.overture.ast.types.AUndefinedType;
223: import org.overture.ast.types.AUnionType;
224: import org.overture.ast.types.AUnknownType;
225: import org.overture.ast.types.AUnresolvedType;
226: import org.overture.ast.types.AVoidReturnType;
227: import org.overture.ast.types.AVoidType;
228: import org.overture.ast.types.PType;
229: import org.overture.ast.types.SBasicType;
230: import org.overture.ast.types.SInvariantType;
231: import org.overture.ast.util.ClonableFile;
232: import org.overture.ast.util.ClonableString;
233: import org.overture.ast.util.Utils;
234:
235: @SuppressWarnings("deprecation")
236: public class AstFactory
237: {
238:         // Should we instanciatte an assistant factory here?
239:         // Create a setter and a getter.
240:         protected static IAstAssistantFactory af;
241:
242:         static
243:         {
244:                 // This static init is needed because the AstFactory is always used
245:                 // statically
246:                 af = new AstAssistantFactory();//
247:         }
248:
249:         /*
250:          * Init Methods - correspond to constructors of the abstract classes, e.g. Definition, Pattern, Type, etc.
251:          */
252:         private static void initPattern(PPattern result, ILexLocation location)
253:         {
254:                 result.setLocation(location);
255:                 result.setResolved(false);
256:
257:         }
258:
259:         private static void initStatement(PStm result, ILexLocation token)
260:         {
261:                 result.setLocation(token);
262:•                if (token != null)
263:                 {
264:                         token.executable(true);
265:                 }
266:         }
267:
268:         private static void initStateDesignator(PStateDesignator result,
269:                         ILexLocation location)
270:         {
271:                 result.setLocation(location);
272:         }
273:
274:         private static void initDefinition(PDefinition result, Pass values,
275:                         ILexLocation location, ILexNameToken name, NameScope scope)
276:         {
277:                 result.setPass(values);
278:                 result.setLocation(location);
279:                 result.setName(name);
280:                 result.setNameScope(scope);
281:                 result.setAccess(getDefaultAccessSpecifier());
282:                 result.setUsed(false);
283:         }
284:
285:         private static void initExpressionUnary(SUnaryExp result,
286:                         ILexLocation location, PExp exp)
287:         {
288:                 initExpression(result, location);
289:                 result.setExp(exp);
290:         }
291:
292:         private static void initExpressionBinary(SBinaryExp result, PExp left,
293:                         LexToken op, PExp right)
294:         {
295:                 initExpression(result, op.location);
296:                 result.setLeft(left);
297:                 result.setOp(op);
298:                 result.setRight(right);
299:         }
300:
301:         private static void initExpression(PExp result, ILexLocation location)
302:         {
303:                 result.setLocation(location);
304:•                if (location != null)
305:                 {
306:                         location.executable(true);
307:                 }
308:         }
309:
310:         private static void initExpression(PExp result, PExp expression)
311:         {
312:                 initExpression(result, expression.getLocation());
313:
314:         }
315:
316:         private static void initUnionType(AUnionType result)
317:         {
318:                 result.setSetDone(false);
319:                 result.setSeqDone(false);
320:                 result.setMapDone(false);
321:                 result.setRecDone(false);
322:                 result.setNumDone(false);
323:                 result.setFuncDone(false);
324:                 result.setOpDone(false);
325:                 result.setClassDone(false);
326:                 result.setProdCard(-1);
327:                 result.setExpanded(false);
328:         }
329:
330:         private static void initType(PType result, ILexLocation location)
331:         {
332:                 result.setLocation(location);
333:                 result.setResolved(false);
334:         }
335:
336:         private static void initInvariantType(SInvariantType result)
337:         {
338:                 result.setOpaque(false);
339:                 result.setInNarrower(false);
340:         }
341:
342:         /*
343:          * Get various pre-built access specifiers
344:          */
345:
346:         public static AAccessSpecifierAccessSpecifier getDefaultAccessSpecifier()
347:         {
348:                 return AstFactory.newAAccessSpecifierAccessSpecifier(new APrivateAccess(), false, false, false);
349:         }
350:
351:         /*
352:          * Constructors for each type
353:          */
354:         
355:         public static AAnnotationAnnotation newAAnnotationAnnotation(ILexIdentifierToken name, List<PExp> args)
356:         {
357:                 AAnnotationAnnotation annotation = new AAnnotationAnnotation();
358:                 annotation.setName(name);
359:                 annotation.setArgs(args);
360:                 return annotation;
361:         }
362:
363:         public static ADefPatternBind newADefPatternBind(ILexLocation location,
364:                         Object patternOrBind)
365:         {
366:
367:                 ADefPatternBind result = new ADefPatternBind();
368:                 result.setLocation(location);
369:
370:•                if (patternOrBind instanceof PPattern)
371:                 {
372:                         result.setPattern((PPattern) patternOrBind);
373:                         result.setBind(null);
374:•                } else if (patternOrBind instanceof PBind)
375:                 {
376:                         result.setPattern(null);
377:                         result.setBind((PBind) patternOrBind);
378:                 } else
379:                 {
380:                         throw new InternalException(3, "PatternBind passed "
381:                                         + patternOrBind.getClass().getName());
382:                 }
383:
384:                 return result;
385:         }
386:
387:         public static ASetBind newASetBind(PPattern pattern, PExp readExpression)
388:         {
389:                 ASetBind result = new ASetBind();
390:
391:                 result.setLocation(pattern.getLocation());
392:                 result.setPattern(pattern);
393:                 result.setSet(readExpression);
394:
395:                 return result;
396:         }
397:
398:         public static ASeqBind newASeqBind(PPattern pattern, PExp readExpression)
399:         {
400:                 ASeqBind result = new ASeqBind();
401:
402:                 result.setLocation(pattern.getLocation());
403:                 result.setPattern(pattern);
404:                 result.setSeq(readExpression);
405:
406:                 return result;
407:         }
408:
409:         public static ATypeBind newATypeBind(PPattern pattern, PType readType)
410:         {
411:                 ATypeBind result = new ATypeBind();
412:
413:                 result.setLocation(pattern.getLocation());
414:                 result.setPattern(pattern);
415:                 result.setType(readType);
416:
417:                 return result;
418:         }
419:
420:         public static ASetMultipleBind newASetMultipleBind(List<PPattern> plist, PExp readExpression)
421:         {
422:                 ASetMultipleBind result = new ASetMultipleBind();
423:
424:                 result.setLocation(plist.get(0).getLocation());
425:                 result.setPlist(plist);
426:                 result.setSet(readExpression);
427:
428:                 return result;
429:         }
430:
431:         public static ASeqMultipleBind newASeqMultipleBind(List<PPattern> plist, PExp readExpression)
432:         {
433:                 ASeqMultipleBind result = new ASeqMultipleBind();
434:
435:                 result.setLocation(plist.get(0).getLocation());
436:                 result.setPlist(plist);
437:                 result.setSeq(readExpression);
438:
439:                 return result;
440:         }
441:
442:         public static ATypeMultipleBind newATypeMultipleBind(List<PPattern> plist,
443:                         PType readType)
444:         {
445:                 ATypeMultipleBind result = new ATypeMultipleBind();
446:
447:                 result.setLocation(plist.get(0).getLocation());
448:                 result.setPlist(plist);
449:                 result.setType(readType);
450:
451:                 return result;
452:         }
453:
454:         public static AClassClassDefinition newAClassClassDefinition(
455:                         ILexNameToken className,
456:                         List<? extends ILexNameToken> superclasses,
457:                         List<PDefinition> members)
458:         {
459:
460:                 AClassClassDefinition result = new AClassClassDefinition();
461:                 initClassDefinition(result, className, superclasses, members);
462:
463:                 return result;
464:         }
465:
466:         protected static void initClassDefinition(SClassDefinition result,
467:                         ILexNameToken className,
468:                         List<? extends ILexNameToken> superclasses,
469:                         List<PDefinition> members)
470:         {
471:                 initDefinition(result, Pass.DEFS, className.getLocation(), className, NameScope.CLASSNAME);
472:                 result.setAccess(af.createPAccessSpecifierAssistant().getPublic());
473:                 result.setUsed(true);
474:                 result.setTypeChecked(false);
475:                 result.setGettingInvDefs(false);
476:                 result.setHasContructors(false);
477:                 result.setGettingInheritable(false);
478:                 result.setSupernames(superclasses);
479:                 result.setSuperDefs(new ArrayList<SClassDefinition>());
480:                 result.setSupertypes(new ArrayList<PType>());
481:                 result.setSuperInheritedDefinitions(new ArrayList<PDefinition>());
482:                 result.setLocalInheritedDefinitions(new ArrayList<PDefinition>());
483:                 result.setAllInheritedDefinitions(new ArrayList<PDefinition>());
484:                 result.setIsAbstract(false);
485:                 // this.delegate = new Delegate(name.name, definitions);
486:                 result.setDefinitions(members);
487:
488:•                if (members != null)
489:                 {
490:•                        for (PDefinition p : members)
491:                         {
492:                                 p.parent(result);
493:                         }
494:                 }
495:
496:                 // Classes are all effectively public types
497:                 af.createPDefinitionAssistant().setClassDefinition(result.getDefinitions(), result);
498:
499:                 // others
500:                 result.setSettingHierarchy(ClassDefinitionSettings.UNSET);
501:
502:                 // Reset parent set by member graph field
503:                 result.parent(null);
504:         }
505:
506:         public static ASystemClassDefinition newASystemClassDefinition(
507:                         ILexNameToken className, List<PDefinition> members)
508:         {
509:                 ASystemClassDefinition result = new ASystemClassDefinition();
510:                 initClassDefinition(result, className, new LexNameList(), members);
511:
512:                 return result;
513:         }
514:
515:         public static ANamedInvariantType newANamedInvariantType(
516:                         ILexNameToken typeName, PType type)
517:         {
518:
519:                 ANamedInvariantType result = new ANamedInvariantType();
520:                 initType(result, typeName.getLocation());
521:                 initInvariantType(result);
522:
523:                 result.setName(typeName);
524:                 result.setType(type);
525:
526:                 return result;
527:         }
528:
529:         public static ARecordInvariantType newARecordInvariantType(
530:                         ILexNameToken name, List<AFieldField> fields)
531:         {
532:
533:                 ARecordInvariantType result = new ARecordInvariantType();
534:
535:                 initType(result, name.getLocation());
536:                 initInvariantType(result);
537:
538:                 result.setName(name);
539:                 result.setFields(fields);
540:                 result.setComposed(false);
541:
542:                 return result;
543:         }
544:
545:         public static ATypeDefinition newATypeDefinition(ILexNameToken name,
546:                                                                                                          SInvariantType type, PPattern invPattern, PExp invExpression)
547:         {
548:                 return newATypeDefinition(name, type, invPattern, invExpression, null, null);
549:         }
550:
551:         public static ATypeDefinition newATypeDefinition(ILexNameToken name,
552:                                                                                                          SInvariantType type, PPattern invPattern, PExp invExpression,
553:                                                                                                          AEqRelation eqRelation, AOrdRelation ordRelation)
554:         {
555:
556:                 ATypeDefinition result = new ATypeDefinition();
557:                 initDefinition(result, Pass.TYPES, name.getLocation(), name, NameScope.TYPENAME);
558:
559:                 // Force all type defs (invs) to be static. There is no guarantee that
560:                 // this will say here but is should
561:                 result.getAccess().setStatic(new TStatic());
562:
563:                 result.setInvType(type);
564:                 result.setInvPattern(invPattern);
565:                 result.setInvExpression(invExpression);
566:
567:                 result.setEqRelation(eqRelation);
568:                 result.setOrdRelation(ordRelation);
569:
570:                 result.setType(type);
571:
572:•                if (type != null)
573:                 {
574:•                        if (type.getDefinitions() == null)
575:                         {
576:                                 type.setDefinitions(new LinkedList<PDefinition>());
577:                         }
578:
579:                         type.getDefinitions().add(result);
580:                 }
581:
582:                 return result;
583:         }
584:
585:         public static AEqRelation newAEqRelation(PPattern leftPattern, PPattern rightPattern, PExp exp)
586:         {
587:                 AEqRelation result = new AEqRelation();
588:
589:                 result.setLhsPattern(leftPattern);
590:                 result.setRhsPattern(rightPattern);
591:                 result.setRelExp(exp);
592:
593:                 return result;
594:         }
595:
596:         public static AOrdRelation newAOrdRelation(PPattern leftPattern, PPattern rightPattern, PExp exp)
597:         {
598:                 AOrdRelation result = new AOrdRelation();
599:
600:                 result.setLhsPattern(leftPattern);
601:                 result.setRhsPattern(rightPattern);
602:                 result.setRelExp(exp);
603:
604:                 return result;
605:         }
606:
607:         public static AExplicitFunctionDefinition newAExplicitFunctionDefinition(
608:                         ILexNameToken name, NameScope scope,
609:                         List<ILexNameToken> typeParams, AFunctionType type,
610:                         List<List<PPattern>> parameters, PExp body, PExp precondition,
611:                         PExp postcondition, boolean typeInvariant, PExp measure)
612:         {
613:
614:                 AExplicitFunctionDefinition result = new AExplicitFunctionDefinition();
615:
616:                 // Definition initialization
617:                 initDefinition(result, Pass.DEFS, name.getLocation(), name, scope);
618:
619:                 // AExplicitFunctionDefinition initialization
620:                 result.setTypeParams(typeParams);
621:                 result.setType(type);
622:                 result.setParamPatternList(parameters);
623:                 result.setPrecondition(precondition);
624:                 result.setPostcondition(postcondition);
625:                 result.setBody(body);
626:                 result.setIsTypeInvariant(typeInvariant);
627:                 result.setMeasure(measure);
628:•                result.setIsCurried(parameters.size() > 1);
629:                 result.setRecursive(false);
630:                 result.setIsUndefined(false);
631:                 result.setMeasureName(null);
632:
633:                 List<PDefinition> defsList = new LinkedList<PDefinition>();
634:                 defsList.add(result);
635:                 type.getDefinitions().add(result);
636:                 
637:•                type.setInstantiated(typeParams == null || typeParams.isEmpty() ? null : false);
638:
639:                 return result;
640:         }
641:
642:         public static AImplicitFunctionDefinition newAImplicitFunctionDefinition(
643:                         ILexNameToken name, NameScope scope,
644:                         List<ILexNameToken> typeParams,
645:                         List<APatternListTypePair> parameterPatterns,
646:                         APatternTypePair resultPattern, PExp body, PExp precondition,
647:                         PExp postcondition, PExp measure)
648:         {
649:
650:                 AImplicitFunctionDefinition result = new AImplicitFunctionDefinition();
651:
652:                 // Definition initialization
653:                 initDefinition(result, Pass.DEFS, name.getLocation(), name, scope);
654:
655:                 // AImplicitFunctionDefinition initialization
656:                 result.setTypeParams(typeParams);
657:                 result.setParamPatterns(parameterPatterns);
658:                 result.setResult(resultPattern);
659:                 result.setBody(body);
660:                 result.setPrecondition(precondition);
661:                 result.setPostcondition(postcondition);
662:                 result.setMeasure(measure);
663:                 result.setRecursive(false);
664:                 result.setIsUndefined(false);
665:                 result.setMeasureName(null);
666:
667:                 List<PType> ptypes = new LinkedList<PType>();
668:
669:•                for (APatternListTypePair ptp : parameterPatterns)
670:                 {
671:                         ptypes.addAll(getTypeList(ptp));
672:                 }
673:
674:                 // NB: implicit functions are always +> total, apparently
675:                 AFunctionType type = AstFactory.newAFunctionType(result.getLocation(), false, ptypes, resultPattern.getType());
676:•                type.setInstantiated(typeParams == null || typeParams.isEmpty() ? null : false);
677:
678:                 List<PDefinition> defs = new Vector<PDefinition>();
679:                 defs.add(result);
680:                 type.setDefinitions(defs);
681:                 result.setType(type);
682:
683:                 return result;
684:         }
685:
686:         public static AFunctionType newAFunctionType(ILexLocation location,
687:                         boolean partial, List<PType> parameters, PType resultType)
688:         {
689:                 AFunctionType result = new AFunctionType();
690:                 initType(result, location);
691:
692:                 result.setParameters(parameters);
693:                 result.setResult(resultType);
694:                 result.setPartial(partial);
695:                 result.setInstantiated(null);
696:
697:                 return result;
698:         }
699:
700:         private static List<PType> getTypeList(APatternListTypePair node)
701:         {
702:                 List<PType> list = new Vector<PType>();
703:
704:•                for (int i = 0; i < node.getPatterns().size(); i++)
705:                 {
706:                         PType type = (PType) node.getType();// .clone();//Use clone since we
707:                                                                                                 // don't want to make a switch
708:                                                                                                 // for all
709:                                                                                                 // types.
710:                         // type.parent(null);//new new type not in the tree yet.
711:                         list.add(type);
712:                 }
713:
714:                 return list;
715:         }
716:
717:         public static AValueDefinition newAValueDefinition(PPattern p,
718:                         NameScope scope, PType type, PExp readExpression)
719:         {
720:
721:                 AValueDefinition result = new AValueDefinition();
722:
723:                 // Definition initialization
724:                 initDefinition(result, Pass.VALUES, p.getLocation(), null, scope);
725:
726:                 result.setPattern(p);
727:                 result.setType(type);
728:                 result.setExpression(readExpression);
729:
730:                 List<PDefinition> defs = new Vector<PDefinition>();
731:
732:•                for (ILexNameToken var : af.createPPatternAssistant(p.getLocation().getModule()).getVariableNames(p))
733:                 {
734:                         defs.add(AstFactory.newAUntypedDefinition(result.getLocation(), var, scope));
735:                 }
736:
737:                 result.setDefs(defs);
738:
739:                 return result;
740:         }
741:
742:         public static PDefinition newAUntypedDefinition(ILexLocation location,
743:                         ILexNameToken name, NameScope scope)
744:         {
745:
746:                 AUntypedDefinition result = new AUntypedDefinition();
747:                 // Definition initialization
748:                 initDefinition(result, Pass.DEFS, location, name, scope);
749:
750:                 return result;
751:         }
752:
753:         public static AStateDefinition newAStateDefinition(ILexNameToken name,
754:                         List<AFieldField> fields, PPattern invPattern, PExp invExpression,
755:                         PPattern initPattern, PExp initExpression)
756:         {
757:
758:                 AStateDefinition result = new AStateDefinition();
759:                 // Definition initialization
760:                 initDefinition(result, Pass.TYPES, name.getLocation(), name, NameScope.STATE);
761:
762:                 // AStateDefinition init
763:                 result.setFields(fields);
764:                 result.setInvPattern(invPattern);
765:                 result.setInvExpression(invExpression);
766:                 result.setInitPattern(initPattern);
767:                 result.setInitExpression(initExpression);
768:
769:                 List<PDefinition> stateDefs = new Vector<PDefinition>();
770:
771:•                for (AFieldField f : fields)
772:                 {
773:                         stateDefs.add(AstFactory.newALocalDefinition(f.getTagname().getLocation(), f.getTagname(), NameScope.STATE, f.getType()));
774:                         ALocalDefinition ld = AstFactory.newALocalDefinition(f.getTagname().getLocation(), f.getTagname().getOldName(), NameScope.OLDSTATE, f.getType());
775:
776:                         ld.setUsed(true); // Else we moan about unused ~x names
777:                         stateDefs.add(ld);
778:                 }
779:
780:                 result.setRecordType(AstFactory.newARecordInvariantType(name.clone(), fields));
781:
782:                 ALocalDefinition recordDefinition = null;
783:
784:                 recordDefinition = AstFactory.newALocalDefinition(result.getLocation(), name, NameScope.STATE, result.getRecordType());
785:                 recordDefinition.setUsed(true); // Can't be exported anyway
786:                 stateDefs.add(recordDefinition);
787:
788:                 recordDefinition = AstFactory.newALocalDefinition(result.getLocation(), name.getOldName(), NameScope.OLDSTATE, result.getRecordType());
789:                 recordDefinition.setUsed(true); // Can't be exported anyway
790:                 stateDefs.add(recordDefinition);
791:                 result.setStateDefs(stateDefs);
792:
793:                 return result;
794:         }
795:
796:         public static ALocalDefinition newALocalDefinition(ILexLocation location,
797:                         ILexNameToken name, NameScope scope, PType type)
798:         {
799:
800:                 ALocalDefinition result = new ALocalDefinition();
801:                 // Definition initialization
802:                 initDefinition(result, Pass.DEFS, name.getLocation(), name, scope);
803:
804:                 result.setType(type);
805:                 result.setValueDefinition(null);
806:
807:                 return result;
808:         }
809:
810:         public static AExplicitOperationDefinition newAExplicitOperationDefinition(
811:                         ILexNameToken name, AOperationType type, List<PPattern> parameters,
812:                         PExp precondition, PExp postcondition, PStm body)
813:         {
814:
815:                 AExplicitOperationDefinition result = new AExplicitOperationDefinition();
816:                 // Definition initialization
817:                 initDefinition(result, Pass.DEFS, name.getLocation(), name, NameScope.GLOBAL);
818:
819:                 result.setType(type);
820:                 result.setParameterPatterns(parameters);
821:                 result.setPrecondition(precondition);
822:                 result.setPostcondition(postcondition);
823:                 result.setBody(body);
824:                 result.setIsConstructor(false);
825:
826:                 return result;
827:         }
828:
829:         public static AImplicitOperationDefinition newAImplicitOperationDefinition(
830:                         ILexNameToken name, List<APatternListTypePair> parameterPatterns,
831:                         APatternTypePair resultPattern, PStm body, ASpecificationStm spec)
832:         {
833:
834:                 AImplicitOperationDefinition result = new AImplicitOperationDefinition();
835:                 // Definition initialization
836:                 initDefinition(result, Pass.DEFS, name.getLocation(), name, NameScope.GLOBAL);
837:
838:                 result.setParameterPatterns(parameterPatterns);
839:                 result.setResult(resultPattern);
840:                 result.setBody(body);
841:                 result.setExternals(spec.getExternals());
842:                 result.setPrecondition(spec.getPrecondition());
843:                 result.setPostcondition(spec.getPostcondition());
844:                 result.setErrors(spec.getErrors());
845:                 result.setIsConstructor(false);
846:
847:                 List<PType> ptypes = new Vector<PType>();
848:
849:•                for (APatternListTypePair ptp : parameterPatterns)
850:                 {
851:                         ptypes.addAll(getTypeList(ptp));
852:                 }
853:•                AOperationType operationType = AstFactory.newAOperationType(result.getLocation(), ptypes, result.getResult() == null ? AstFactory.newAVoidType(name.getLocation())
854:                                 : result.getResult().getType());
855:                 result.setType(operationType);
856:
857:                 return result;
858:         }
859:
860:         public static AOperationType newAOperationType(ILexLocation location,
861:                         List<PType> parameters, PType resultType)
862:         {
863:                 AOperationType result = new AOperationType();
864:                 initType(result, location);
865:
866:                 result.setParameters(parameters);
867:                 result.setResult(resultType);
868:                 result.setPure(false);        // Set explicitly where needed
869:
870:                 return result;
871:         }
872:
873:         public static AVoidType newAVoidType(ILexLocation location)
874:         {
875:                 AVoidType result = new AVoidType();
876:                 initType(result, location);
877:
878:                 return result;
879:         }
880:
881:         public static ASpecificationStm newASpecificationStm(ILexLocation location,
882:                         List<AExternalClause> externals, PExp precondition,
883:                         PExp postcondition, List<AErrorCase> errors)
884:         {
885:
886:                 ASpecificationStm result = new ASpecificationStm();
887:                 initStatement(result, location);
888:
889:                 result.setExternals(externals);
890:                 result.setPrecondition(precondition);
891:                 result.setPostcondition(postcondition);
892:                 result.setErrors(errors);
893:
894:                 return result;
895:         }
896:
897:         public static AExternalClause newAExternalClause(ILexToken mode,
898:                         List<? extends ILexNameToken> names, PType type)
899:         {
900:
901:                 AExternalClause result = new AExternalClause();
902:                 result.setMode(mode);
903:                 result.setIdentifiers(names);
904:•                result.setType(type == null ? AstFactory.newAUnknownType(names.get(0).getLocation())
905:                                 : type);
906:
907:                 return result;
908:         }
909:
910:         public static PType newAUnknownType(ILexLocation location)
911:         {
912:                 AUnknownType result = new AUnknownType();
913:                 initType(result, location);
914:                 return result;
915:         }
916:
917:         private static AEqualsDefinition newAEqualsDefinition(ILexLocation location)
918:         {
919:                 AEqualsDefinition result = new AEqualsDefinition();
920:                 // Definition initialization
921:                 initDefinition(result, Pass.DEFS, location, null, NameScope.LOCAL);
922:                 return result;
923:         }
924:
925:         public static AEqualsDefinition newAEqualsDefinition(ILexLocation location,
926:                         PPattern pattern, PExp test)
927:         {
928:                 AEqualsDefinition result = AstFactory.newAEqualsDefinition(location);
929:
930:                 result.setPattern(pattern);
931:                 result.setTypebind(null);
932:                 result.setSetbind(null);
933:                 result.setTest(test);
934:
935:                 return result;
936:         }
937:
938:         public static AEqualsDefinition newAEqualsDefinition(ILexLocation location,
939:                         ATypeBind typebind, PExp test)
940:         {
941:                 AEqualsDefinition result = AstFactory.newAEqualsDefinition(location);
942:
943:                 result.setPattern(null);
944:                 result.setTypebind(typebind);
945:                 result.setSetbind(null);
946:                 result.setTest(test);
947:
948:                 return result;
949:         }
950:
951:         public static AEqualsDefinition newAEqualsDefinition(ILexLocation location,
952:                         PBind bind, PExp test)
953:         {
954:                 AEqualsDefinition result = AstFactory.newAEqualsDefinition(location);
955:
956:                 result.setPattern(null);
957:                 result.setTypebind(null);
958:                 
959:•                if (bind instanceof ASetBind)
960:                 {
961:                         result.setSetbind((ASetBind) bind);
962:                 }
963:                 else
964:                 {
965:                         result.setSeqbind((ASeqBind) bind);
966:                 }
967:                 
968:                 result.setTest(test);
969:
970:                 return result;
971:         }
972:
973:         public static AClassInvariantDefinition newAClassInvariantDefinition(
974:                         ILexNameToken name, PExp expression)
975:         {
976:                 AClassInvariantDefinition result = new AClassInvariantDefinition();
977:                 // Definition initialization
978:                 initDefinition(result, Pass.DEFS, name.getLocation(), name, NameScope.GLOBAL);
979:
980:                 result.setExpression(expression);
981:
982:                 return result;
983:         }
984:
985:         public static AInstanceVariableDefinition newAInstanceVariableDefinition(
986:                         ILexNameToken name, PType type, PExp expression)
987:         {
988:                 AInstanceVariableDefinition result = new AInstanceVariableDefinition();
989:
990:                 // Definition initialization
991:                 initDefinition(result, Pass.VALUES, name.getLocation(), name, NameScope.VARSANDSTATE);
992:
993:                 result.setType(type);
994:                 result.setExpression(expression);
995:•                if (result.getLocation() != null)
996:                 {
997:                         result.getLocation().executable(false);
998:                 }
999:                 result.setOldname(name.getOldName());
1000:•                result.setInitialized(!(expression instanceof AUndefinedExp));
1001:
1002:                 return result;
1003:         }
1004:
1005:         public static AThreadDefinition newAThreadDefinition(PStm statement)
1006:         {
1007:                 AThreadDefinition result = new AThreadDefinition();
1008:
1009:                 // Definition initialization
1010:                 initDefinition(result, Pass.DEFS, statement.getLocation(), null, NameScope.GLOBAL);
1011:
1012:                 result.setStatement(statement);
1013:                 // used to be a static method on LexNameToken - removed when we went to
1014:                 // interface
1015:                 result.setOperationName(new LexNameToken(statement.getLocation().getModule(), "thread", statement.getLocation()));
1016:                 result.getOperationName().setTypeQualifier(new Vector<PType>());
1017:                 result.setAccess(af.createPAccessSpecifierAssistant().getProtected());
1018:
1019:                 return result;
1020:         }
1021:
1022:         public static AThreadDefinition newPeriodicAThreadDefinition(
1023:                         ILexNameToken opname, List<PExp> args)
1024:         {
1025:                 return newAThreadDefinition(AstFactory.newAPeriodicStm(opname, args));
1026:         }
1027:
1028:         public static AThreadDefinition newSporadicAThreadDefinition(
1029:                         ILexNameToken opname, List<PExp> args)
1030:         {
1031:                 return newAThreadDefinition(AstFactory.newASporadicStm(opname, args));
1032:         }
1033:
1034:         private static PStm newASporadicStm(ILexNameToken opname, List<PExp> args)
1035:         {
1036:                 ASporadicStm result = new ASporadicStm();
1037:
1038:                 // Statement initialization
1039:                 initStatement(result, opname.getLocation());
1040:
1041:                 result.setOpname(opname);
1042:                 result.setArgs(args);
1043:
1044:                 return result;
1045:         }
1046:
1047:         private static APeriodicStm newAPeriodicStm(ILexNameToken opname,
1048:                         List<PExp> args)
1049:         {
1050:                 APeriodicStm result = new APeriodicStm();
1051:
1052:                 // Statement initialization
1053:                 initStatement(result, opname.getLocation());
1054:
1055:                 result.setOpname(opname);
1056:                 result.setArgs(args);
1057:
1058:                 return result;
1059:         }
1060:
1061:         public static APerSyncDefinition newAPerSyncDefinition(
1062:                         ILexLocation location, ILexNameToken opname, PExp guard)
1063:         {
1064:                 APerSyncDefinition result = new APerSyncDefinition();
1065:                 // Definition initialization
1066:                 initDefinition(result, Pass.DEFS, location, opname.getPerName(location), NameScope.GLOBAL);
1067:
1068:                 result.setOpname(opname);
1069:                 result.setGuard(guard);
1070:                 
1071:•                if(guard != null)
1072:                 {
1073:                         guard.parent(result);
1074:                 }
1075:
1076:                 return result;
1077:         }
1078:
1079:         public static AMutexSyncDefinition newAMutexSyncDefinition(
1080:                         ILexLocation location, LexNameList operations)
1081:         {
1082:                 AMutexSyncDefinition result = new AMutexSyncDefinition();
1083:                 // Definition initialization
1084:                 initDefinition(result, Pass.DEFS, location, null, NameScope.GLOBAL);
1085:
1086:                 result.setOperations(operations);
1087:
1088:                 return result;
1089:         }
1090:
1091:         public static ANamedTraceDefinition newANamedTraceDefinition(
1092:                         ILexLocation location, List<String> pathname,
1093:                         List<ATraceDefinitionTerm> terms)
1094:         {
1095:                 ANamedTraceDefinition result = new ANamedTraceDefinition();
1096:                 // Definition initialization
1097:                 initDefinition(result, Pass.DEFS, location, new LexNameToken(location.getModule(), Utils.listToString(pathname, "_"), location), NameScope.GLOBAL);
1098:
1099:                 List<ClonableString> namesClonable = new Vector<ClonableString>();
1100:•                for (String string : pathname)
1101:                 {
1102:                         namesClonable.add(new ClonableString(string));
1103:                 }
1104:
1105:                 // List<ATraceDefinitionTerm> tracesTerms = new
1106:                 // Vector<ATraceDefinitionTerm>();
1107:                 // for (ATraceDefinitionTerm list : terms)
1108:                 // {
1109:                 // tracesTerms.add( new ATraceDefinitionTerm(list));
1110:                 // }
1111:
1112:                 result.setPathname(namesClonable);
1113:                 result.setTerms(terms);
1114:                 result.setAccess(af.createPAccessSpecifierAssistant().getPublic());
1115:                 result.setType(newAOperationType(location));
1116:
1117:                 return result;
1118:         }
1119:
1120:         public static ARepeatTraceDefinition newARepeatTraceDefinition(
1121:                         ILexLocation location, PTraceCoreDefinition core, long from, long to)
1122:         {
1123:                 return new ARepeatTraceDefinition(location, core, from, to);
1124:         }
1125:
1126:         public static ALetDefBindingTraceDefinition newALetDefBindingTraceDefinition(
1127:                         ILexLocation location, List<AValueDefinition> localDefs,
1128:                         PTraceDefinition body)
1129:         {
1130:                 return new ALetDefBindingTraceDefinition(location, localDefs, body);
1131:         }
1132:
1133:         public static ALetBeStBindingTraceDefinition newALetBeStBindingTraceDefinition(
1134:                         ILexLocation location, PMultipleBind bind, PExp stexp,
1135:                         PTraceDefinition body)
1136:         {
1137:                 return new ALetBeStBindingTraceDefinition(location, bind, stexp, body, null);
1138:         }
1139:
1140:         public static AConcurrentExpressionTraceCoreDefinition newAConcurrentExpressionTraceCoreDefinition(
1141:                         ILexLocation location, List<PTraceDefinition> defs)
1142:         {
1143:                 return new AConcurrentExpressionTraceCoreDefinition(location, defs);
1144:         }
1145:
1146:         public static AAccessSpecifierAccessSpecifier newAAccessSpecifierAccessSpecifier(
1147:                         PAccess access, boolean isStatic, boolean isAsync)
1148:         {
1149:                 return newAAccessSpecifierAccessSpecifier(access, isStatic, isAsync, false);
1150:         }
1151:         
1152:         public static AAccessSpecifierAccessSpecifier newAAccessSpecifierAccessSpecifier(
1153:                         PAccess access, boolean isStatic, boolean isAsync, boolean isPure)
1154:         {
1155:                 AAccessSpecifierAccessSpecifier result = new AAccessSpecifierAccessSpecifier();
1156:                 result.setAccess(access);
1157:•                result.setStatic(isStatic ? new TStatic() : null);
1158:•                result.setAsync(isAsync ? new TAsync() : null);
1159:                 result.setPure(isPure);
1160:                 return result;
1161:         }
1162:
1163:         public static APatternListTypePair newAPatternListTypePair(
1164:                         List<PPattern> patterns, PType type)
1165:         {
1166:                 APatternListTypePair result = new APatternListTypePair();
1167:                 result.setPatterns(patterns);
1168:                 result.setType(type);
1169:
1170:                 return result;
1171:         }
1172:
1173:         public static AIdentifierPattern newAIdentifierPattern(ILexNameToken token)
1174:         {
1175:                 AIdentifierPattern result = new AIdentifierPattern();
1176:                 initPattern(result, token.getLocation());
1177:
1178:                 result.setLocation(token.getLocation());
1179:                 result.setName(token);
1180:                 result.setConstrained(false);
1181:
1182:                 return result;
1183:         }
1184:
1185:         public static ATuplePattern newATuplePattern(ILexLocation location,
1186:                         List<PPattern> list)
1187:         {
1188:                 ATuplePattern result = new ATuplePattern();
1189:                 initPattern(result, location);
1190:
1191:                 result.setPlist(list);
1192:                 return result;
1193:         }
1194:
1195:         public static AProductType newAProductType(ILexLocation location,
1196:                         List<PType> types)
1197:         {
1198:                 AProductType result = new AProductType();
1199:
1200:                 initType(result, location);
1201:                 result.setTypes(types);
1202:                 return result;
1203:         }
1204:
1205:         public static APatternTypePair newAPatternTypePair(PPattern pattern,
1206:                         PType type)
1207:         {
1208:                 APatternTypePair result = new APatternTypePair();
1209:                 result.setResolved(false);
1210:                 result.setPattern(pattern);
1211:                 result.setType(type);
1212:                 return result;
1213:         }
1214:
1215:         public static AErrorCase newAErrorCase(LexIdentifierToken name, PExp left,
1216:                         PExp right)
1217:         {
1218:                 return new AErrorCase(name, left, right);
1219:         }
1220:
1221:         public static AApplyExpressionTraceCoreDefinition newAApplyExpressionTraceCoreDefinition(
1222:                         PStm stmt, String currentModule)
1223:         {
1224:                 return new AApplyExpressionTraceCoreDefinition(stmt.getLocation(), stmt, currentModule);
1225:         }
1226:
1227:         public static ABracketedExpressionTraceCoreDefinition newABracketedExpressionTraceCoreDefinition(
1228:                         ILexLocation location, List<ATraceDefinitionTerm> list)
1229:         {
1230:                 return new ABracketedExpressionTraceCoreDefinition(location, list);
1231:         }
1232:
1233:         public static AEquivalentBooleanBinaryExp newAEquivalentBooleanBinaryExp(
1234:                         PExp left, LexToken op, PExp right)
1235:         {
1236:                 AEquivalentBooleanBinaryExp result = new AEquivalentBooleanBinaryExp();
1237:                 // Binary Expression init
1238:                 initExpressionBinary(result, left, op, right);
1239:
1240:                 return result;
1241:
1242:         }
1243:
1244:         public static AImpliesBooleanBinaryExp newAImpliesBooleanBinaryExp(
1245:                         PExp left, LexToken op, PExp right)
1246:         {
1247:                 AImpliesBooleanBinaryExp result = new AImpliesBooleanBinaryExp();
1248:                 // Binary Expression init
1249:                 initExpressionBinary(result, left, op, right);
1250:
1251:                 return result;
1252:         }
1253:
1254:         public static AOrBooleanBinaryExp newAOrBooleanBinaryExp(PExp left,
1255:                         LexToken op, PExp right)
1256:         {
1257:                 AOrBooleanBinaryExp result = new AOrBooleanBinaryExp();
1258:                 // Binary Expression init
1259:                 initExpressionBinary(result, left, op, right);
1260:
1261:                 return result;
1262:         }
1263:
1264:         public static AAndBooleanBinaryExp newAAndBooleanBinaryExp(PExp left,
1265:                         LexToken op, PExp right)
1266:         {
1267:                 AAndBooleanBinaryExp result = new AAndBooleanBinaryExp();
1268:                 // Binary Expression init
1269:                 initExpressionBinary(result, left, op, right);
1270:                 
1271:
1272:                 return result;
1273:         }
1274:
1275:         public static ANotUnaryExp newANotUnaryExp(ILexLocation location,
1276:                         PExp readNotExpression)
1277:         {
1278:                 ANotUnaryExp result = new ANotUnaryExp();
1279:                 initExpressionUnary(result, location, readNotExpression);
1280:                 return result;
1281:         }
1282:
1283:         public static AEqualsBinaryExp newAEqualsBinaryExp(PExp left, LexToken op,
1284:                         PExp right)
1285:         {
1286:                 AEqualsBinaryExp result = new AEqualsBinaryExp();
1287:                 initExpressionBinary(result, left, op, right);
1288:                 return result;
1289:         }
1290:
1291:         public static ALessNumericBinaryExp newALessNumericBinaryExp(PExp left,
1292:                         LexToken op, PExp right)
1293:         {
1294:                 ALessNumericBinaryExp result = new ALessNumericBinaryExp();
1295:                 initExpressionBinary(result, left, op, right);
1296:                 return result;
1297:         }
1298:
1299:         public static ALessEqualNumericBinaryExp newALessEqualNumericBinaryExp(
1300:                         PExp left, LexToken op, PExp right)
1301:         {
1302:                 ALessEqualNumericBinaryExp result = new ALessEqualNumericBinaryExp();
1303:                 initExpressionBinary(result, left, op, right);
1304:
1305:                 return result;
1306:         }
1307:
1308:         public static AGreaterNumericBinaryExp newAGreaterNumericBinaryExp(
1309:                         PExp left, LexToken op, PExp right)
1310:         {
1311:                 AGreaterNumericBinaryExp result = new AGreaterNumericBinaryExp();
1312:                 initExpressionBinary(result, left, op, right);
1313:
1314:                 return result;
1315:         }
1316:
1317:         public static AGreaterEqualNumericBinaryExp newAGreaterEqualNumericBinaryExp(
1318:                         PExp left, LexToken op, PExp right)
1319:         {
1320:                 AGreaterEqualNumericBinaryExp result = new AGreaterEqualNumericBinaryExp();
1321:                 initExpressionBinary(result, left, op, right);
1322:                 return result;
1323:         }
1324:
1325:         public static ANotEqualBinaryExp newANotEqualBinaryExp(PExp left,
1326:                         LexToken op, PExp right)
1327:         {
1328:                 ANotEqualBinaryExp result = new ANotEqualBinaryExp();
1329:                 initExpressionBinary(result, left, op, right);
1330:                 return result;
1331:         }
1332:
1333:         public static ASubsetBinaryExp newASubsetBinaryExp(PExp left, LexToken op,
1334:                         PExp right)
1335:         {
1336:                 ASubsetBinaryExp result = new ASubsetBinaryExp();
1337:                 initExpressionBinary(result, left, op, right);
1338:                 return result;
1339:         }
1340:
1341:         public static AProperSubsetBinaryExp newAProperSubsetBinaryExp(PExp left,
1342:                         LexToken op, PExp right)
1343:         {
1344:                 AProperSubsetBinaryExp result = new AProperSubsetBinaryExp();
1345:                 initExpressionBinary(result, left, op, right);
1346:                 return result;
1347:         }
1348:
1349:         public static AInSetBinaryExp newAInSetBinaryExp(PExp left, LexToken op,
1350:                         PExp right)
1351:         {
1352:                 AInSetBinaryExp result = new AInSetBinaryExp();
1353:                 initExpressionBinary(result, left, op, right);
1354:                 return result;
1355:         }
1356:
1357:         public static ANotInSetBinaryExp newANotInSetBinaryExp(PExp left,
1358:                         LexToken op, PExp right)
1359:         {
1360:                 ANotInSetBinaryExp result = new ANotInSetBinaryExp();
1361:                 initExpressionBinary(result, left, op, right);
1362:                 return result;
1363:         }
1364:
1365:         public static APlusNumericBinaryExp newAPlusNumericBinaryExp(PExp left,
1366:                         LexToken op, PExp right)
1367:         {
1368:                 APlusNumericBinaryExp result = new APlusNumericBinaryExp();
1369:                 initExpressionBinary(result, left, op, right);
1370:                 return result;
1371:         }
1372:
1373:         public static ASubtractNumericBinaryExp newASubstractNumericBinaryExp(
1374:                         PExp left, LexToken op, PExp right)
1375:         {
1376:                 ASubtractNumericBinaryExp result = new ASubtractNumericBinaryExp();
1377:                 initExpressionBinary(result, left, op, right);
1378:                 return result;
1379:         }
1380:
1381:         public static ASetUnionBinaryExp newASetUnionBinaryExp(PExp left,
1382:                         LexToken op, PExp right)
1383:         {
1384:                 ASetUnionBinaryExp result = new ASetUnionBinaryExp();
1385:                 initExpressionBinary(result, left, op, right);
1386:                 return result;
1387:         }
1388:
1389:         public static ASetDifferenceBinaryExp newASetDifferenceBinaryExp(PExp left,
1390:                         LexToken op, PExp right)
1391:         {
1392:                 ASetDifferenceBinaryExp result = new ASetDifferenceBinaryExp();
1393:                 initExpressionBinary(result, left, op, right);
1394:                 return result;
1395:         }
1396:
1397:         public static AMapUnionBinaryExp newAMapUnionBinaryExp(PExp left,
1398:                         LexToken op, PExp right)
1399:         {
1400:                 AMapUnionBinaryExp result = new AMapUnionBinaryExp();
1401:                 initExpressionBinary(result, left, op, right);
1402:                 return result;
1403:         }
1404:
1405:         public static APlusPlusBinaryExp newAPlusPlusBinaryExp(PExp left,
1406:                         LexToken op, PExp right)
1407:         {
1408:                 APlusPlusBinaryExp result = new APlusPlusBinaryExp();
1409:                 initExpressionBinary(result, left, op, right);
1410:                 return result;
1411:         }
1412:
1413:         public static ASeqConcatBinaryExp newASeqConcatBinaryExp(PExp left,
1414:                         LexToken op, PExp right)
1415:         {
1416:                 ASeqConcatBinaryExp result = new ASeqConcatBinaryExp();
1417:                 initExpressionBinary(result, left, op, right);
1418:                 return result;
1419:         }
1420:
1421:         public static ATimesNumericBinaryExp newATimesNumericBinaryExp(PExp left,
1422:                         LexToken op, PExp right)
1423:         {
1424:                 ATimesNumericBinaryExp result = new ATimesNumericBinaryExp();
1425:                 initExpressionBinary(result, left, op, right);
1426:                 return result;
1427:         }
1428:
1429:         public static ADivideNumericBinaryExp newADivideNumericBinaryExp(PExp left,
1430:                         LexToken op, PExp right)
1431:         {
1432:                 ADivideNumericBinaryExp result = new ADivideNumericBinaryExp();
1433:                 initExpressionBinary(result, left, op, right);
1434:                 return result;
1435:         }
1436:
1437:         public static ARemNumericBinaryExp newARemNumericBinaryExp(PExp left,
1438:                         LexToken op, PExp right)
1439:         {
1440:                 ARemNumericBinaryExp result = new ARemNumericBinaryExp();
1441:                 initExpressionBinary(result, left, op, right);
1442:                 return result;
1443:         }
1444:
1445:         public static AModNumericBinaryExp newAModNumericBinaryExp(PExp left,
1446:                         LexToken op, PExp right)
1447:         {
1448:                 AModNumericBinaryExp result = new AModNumericBinaryExp();
1449:                 initExpressionBinary(result, left, op, right);
1450:                 return result;
1451:         }
1452:
1453:         public static ADivNumericBinaryExp newADivNumericBinaryExp(PExp left,
1454:                         LexToken op, PExp right)
1455:         {
1456:                 ADivNumericBinaryExp result = new ADivNumericBinaryExp();
1457:                 initExpressionBinary(result, left, op, right);
1458:                 return result;
1459:         }
1460:
1461:         public static ASetIntersectBinaryExp newASetIntersectBinaryExp(PExp left,
1462:                         LexToken op, PExp right)
1463:         {
1464:                 ASetIntersectBinaryExp result = new ASetIntersectBinaryExp();
1465:                 initExpressionBinary(result, left, op, right);
1466:                 return result;
1467:         }
1468:
1469:         public static AMapInverseUnaryExp newAMapInverseUnaryExp(
1470:                         ILexLocation location, PExp exp)
1471:         {
1472:                 AMapInverseUnaryExp result = new AMapInverseUnaryExp();
1473:                 initExpressionUnary(result, location, exp);
1474:                 return result;
1475:         }
1476:
1477:         public static ADomainResToBinaryExp newADomainResToBinaryExp(PExp left,
1478:                         LexToken op, PExp right)
1479:         {
1480:                 ADomainResToBinaryExp result = new ADomainResToBinaryExp();
1481:                 initExpressionBinary(result, left, op, right);
1482:                 return result;
1483:         }
1484:
1485:         public static ADomainResByBinaryExp newADomainResByBinaryExp(PExp left,
1486:                         LexToken op, PExp right)
1487:         {
1488:                 ADomainResByBinaryExp result = new ADomainResByBinaryExp();
1489:                 initExpressionBinary(result, left, op, right);
1490:                 return result;
1491:         }
1492:
1493:         public static ARangeResToBinaryExp newARangeResToBinaryExp(PExp left,
1494:                         LexToken op, PExp right)
1495:         {
1496:                 ARangeResToBinaryExp result = new ARangeResToBinaryExp();
1497:                 initExpressionBinary(result, left, op, right);
1498:                 return result;
1499:         }
1500:
1501:         public static ARangeResByBinaryExp newARangeResByBinaryExp(PExp left,
1502:                         LexToken op, PExp right)
1503:         {
1504:                 ARangeResByBinaryExp result = new ARangeResByBinaryExp();
1505:                 initExpressionBinary(result, left, op, right);
1506:                 return result;
1507:         }
1508:
1509:         public static AApplyExp newAApplyExp(PExp root)
1510:         {
1511:                 AApplyExp result = new AApplyExp();
1512:                 result.setLocation(root.getLocation());
1513:                 result.setRoot(root);
1514:                 result.setArgs(new Vector<PExp>());
1515:                 return result;
1516:         }
1517:
1518:         public static ASubseqExp newASubseqExp(PExp seq, PExp from, PExp to)
1519:         {
1520:                 ASubseqExp result = new ASubseqExp();
1521:                 result.setLocation(seq.getLocation());
1522:                 result.setSeq(seq);
1523:                 result.setFrom(from);
1524:                 result.setTo(to);
1525:
1526:                 return result;
1527:         }
1528:
1529:         public static PExp newAApplyExp(PExp root, List<PExp> args)
1530:         {
1531:                 AApplyExp result = new AApplyExp();
1532:                 result.setLocation(root.getLocation());
1533:                 result.setRoot(root);
1534:                 result.setArgs(args);
1535:                 return result;
1536:         }
1537:
1538:         public static AFuncInstatiationExp newAFuncInstatiationExp(PExp function,
1539:                         List<PType> types)
1540:         {
1541:                 AFuncInstatiationExp result = new AFuncInstatiationExp();
1542:                 result.setLocation(function.getLocation());
1543:                 result.setFunction(function);
1544:                 result.setActualTypes(types);
1545:                 return result;
1546:         }
1547:
1548:         public static AFieldExp newAFieldExp(PExp object, ILexNameToken field)
1549:         {
1550:                 AFieldExp result = new AFieldExp();
1551:                 result.setLocation(object.getLocation());
1552:                 result.setObject(object);
1553:                 result.setField(new LexIdentifierToken(field.getName(), field.getOld(), field.getLocation()));
1554:                 result.setMemberName(field);
1555:                 result.getField().getLocation().executable(true);
1556:                 return result;
1557:         }
1558:
1559:         public static PExp newAFieldExp(PExp object, ILexIdentifierToken field)
1560:         {
1561:                 AFieldExp result = new AFieldExp();
1562:                 result.setLocation(object.getLocation());
1563:                 result.setObject(object);
1564:                 result.setField(field);
1565:                 result.getField().getLocation().executable(true);
1566:                 return result;
1567:         }
1568:
1569:         public static PExp newAFieldNumberExp(PExp tuple, LexIntegerToken field)
1570:         {
1571:                 AFieldNumberExp result = new AFieldNumberExp();
1572:                 result.setLocation(tuple.getLocation());
1573:                 result.setTuple(tuple);
1574:                 result.setField(field);
1575:                 result.getField().getLocation().executable(true);
1576:
1577:                 return result;
1578:         }
1579:
1580:         public static ACompBinaryExp newACompBinaryExp(PExp left, LexToken op,
1581:                         PExp right)
1582:         {
1583:                 ACompBinaryExp result = new ACompBinaryExp();
1584:                 initExpressionBinary(result, left, op, right);
1585:                 return result;
1586:         }
1587:
1588:         public static AStarStarBinaryExp newAStarStarBinaryExp(PExp left,
1589:                         LexToken op, PExp right)
1590:         {
1591:                 AStarStarBinaryExp result = new AStarStarBinaryExp();
1592:                 initExpressionBinary(result, left, op, right);
1593:                 return result;
1594:         }
1595:
1596:         public static AIntLiteralExp newAIntLiteralExp(LexIntegerToken value)
1597:         {
1598:                 AIntLiteralExp result = new AIntLiteralExp();
1599:                 initExpression(result, value.location);
1600:                 result.setValue(value);
1601:                 return result;
1602:         }
1603:
1604:         public static ARealLiteralExp newARealLiteralExp(LexRealToken value)
1605:         {
1606:                 ARealLiteralExp result = new ARealLiteralExp();
1607:                 initExpression(result, value.location);
1608:                 result.setValue(value);
1609:                 return result;
1610:         }
1611:
1612:         public static AVariableExp newAVariableExp(ILexNameToken name)
1613:         {
1614:                 AVariableExp result = new AVariableExp();
1615:                 initExpression(result, name.getLocation());
1616:                 result.setName(name);
1617:                 result.setOriginal(name.getFullName());
1618:                 return result;
1619:         }
1620:
1621:         public static AStringLiteralExp newAStringLiteralExp(ILexStringToken value)
1622:         {
1623:                 AStringLiteralExp result = new AStringLiteralExp();
1624:                 initExpression(result, value.getLocation());
1625:                 result.setValue(value);
1626:                 return result;
1627:         }
1628:
1629:         public static ACharLiteralExp newACharLiteralExp(LexCharacterToken value)
1630:         {
1631:                 ACharLiteralExp result = new ACharLiteralExp();
1632:                 initExpression(result, value.location);
1633:                 result.setValue(value);
1634:                 return result;
1635:         }
1636:
1637:         public static AQuoteLiteralExp newAQuoteLiteralExp(ILexQuoteToken value)
1638:         {
1639:                 AQuoteLiteralExp result = new AQuoteLiteralExp();
1640:                 initExpression(result, value.getLocation());
1641:                 result.setValue(value);
1642:                 return result;
1643:         }
1644:
1645:         public static ABooleanConstExp newABooleanConstExp(LexBooleanToken value)
1646:         {
1647:                 ABooleanConstExp result = new ABooleanConstExp();
1648:                 initExpression(result, value.location);
1649:                 result.setValue(value);
1650:                 return result;
1651:         }
1652:
1653:         public static AUndefinedExp newAUndefinedExp(ILexLocation location)
1654:         {
1655:                 AUndefinedExp result = new AUndefinedExp();
1656:                 initExpression(result, location);
1657:                 return result;
1658:         }
1659:
1660:         public static ANilExp newANilExp(ILexLocation location)
1661:         {
1662:                 ANilExp result = new ANilExp();
1663:                 initExpression(result, location);
1664:                 return result;
1665:         }
1666:
1667:         public static AThreadIdExp newAThreadIdExp(ILexLocation location)
1668:         {
1669:                 AThreadIdExp result = new AThreadIdExp();
1670:                 initExpression(result, location);
1671:                 return result;
1672:         }
1673:
1674:         public static ASelfExp newASelfExp(ILexLocation location)
1675:         {
1676:                 ASelfExp result = new ASelfExp();
1677:                 initExpression(result, location);
1678:                 result.setName(new LexNameToken(location.getModule(), "self", location));
1679:                 return result;
1680:         }
1681:
1682:         public static ANotYetSpecifiedExp newANotYetSpecifiedExp(
1683:                         ILexLocation location)
1684:         {
1685:                 ANotYetSpecifiedExp result = new ANotYetSpecifiedExp();
1686:                 initExpression(result, location);
1687:•                if (result.getLocation() != null)
1688:                 {
1689:                         result.getLocation().executable(false); // ie. ignore coverage for
1690:                                                                                                         // these
1691:                 }
1692:                 return result;
1693:         }
1694:
1695:         public static ASubclassResponsibilityExp newASubclassResponsibilityExp(
1696:                         ILexLocation location)
1697:         {
1698:                 ASubclassResponsibilityExp result = new ASubclassResponsibilityExp();
1699:                 initExpression(result, location);
1700:                 location.hit();
1701:                 return result;
1702:         }
1703:
1704:         public static ATimeExp newATimeExp(ILexLocation location)
1705:         {
1706:                 ATimeExp result = new ATimeExp();
1707:                 initExpression(result, location);
1708:                 return result;
1709:         }
1710:
1711:         public static AMuExp newAMuExp(ILexLocation location, PExp record,
1712:                         List<ARecordModifier> args)
1713:         {
1714:                 AMuExp result = new AMuExp();
1715:                 initExpression(result, location);
1716:                 result.setRecord(record);
1717:                 result.setModifiers(args);
1718:                 return result;
1719:         }
1720:
1721:         public static ARecordModifier newARecordModifier(LexIdentifierToken tag,
1722:                         PExp value)
1723:         {
1724:                 ARecordModifier result = new ARecordModifier();
1725:                 result.setTag(tag);
1726:                 result.setValue(value);
1727:                 return result;
1728:         }
1729:
1730:         public static ATupleExp newATupleExp(ILexLocation location, List<PExp> args)
1731:         {
1732:                 ATupleExp result = new ATupleExp();
1733:                 initExpression(result, location);
1734:                 result.setArgs(args);
1735:                 return result;
1736:         }
1737:
1738:         public static ABooleanBasicType newABooleanBasicType(ILexLocation location)
1739:         {
1740:                 ABooleanBasicType result = new ABooleanBasicType();
1741:                 result.setLocation(location);
1742:                 return result;
1743:         }
1744:
1745:         public static AMkBasicExp newAMkBasicExp(SBasicType type, PExp arg)
1746:         {
1747:                 AMkBasicExp result = new AMkBasicExp();
1748:                 initExpression(result, type.getLocation());
1749:                 result.setType(type);
1750:                 result.setArg(arg);
1751:                 return result;
1752:         }
1753:
1754:         public static ANatNumericBasicType newANatNumericBasicType(
1755:                         ILexLocation location)
1756:         {
1757:                 ANatNumericBasicType result = new ANatNumericBasicType();
1758:                 initType(result, location);
1759:                 return result;
1760:         }
1761:
1762:         public static ANatOneNumericBasicType newANatOneNumericBasicType(
1763:                         ILexLocation location)
1764:         {
1765:                 ANatOneNumericBasicType result = new ANatOneNumericBasicType();
1766:                 initType(result, location);
1767:                 return result;
1768:         }
1769:
1770:         public static AIntNumericBasicType newAIntNumericBasicType(
1771:                         ILexLocation location)
1772:         {
1773:                 AIntNumericBasicType result = new AIntNumericBasicType();
1774:                 initType(result, location);
1775:                 return result;
1776:         }
1777:
1778:         public static ARationalNumericBasicType newARationalNumericBasicType(
1779:                         ILexLocation location)
1780:         {
1781:                 ARationalNumericBasicType result = new ARationalNumericBasicType();
1782:                 initType(result, location);
1783:                 return result;
1784:         }
1785:
1786:         public static ARealNumericBasicType newARealNumericBasicType(
1787:                         ILexLocation location)
1788:         {
1789:                 ARealNumericBasicType result = new ARealNumericBasicType();
1790:                 initType(result, location);
1791:                 return result;
1792:         }
1793:
1794:         public static ACharBasicType newACharBasicType(ILexLocation location)
1795:         {
1796:                 ACharBasicType result = new ACharBasicType();
1797:                 initType(result, location);
1798:                 return result;
1799:         }
1800:
1801:         public static ATokenBasicType newATokenBasicType(ILexLocation location)
1802:         {
1803:                 ATokenBasicType result = new ATokenBasicType();
1804:                 initType(result, location);
1805:                 return result;
1806:         }
1807:
1808:         public static AMkTypeExp newAMkTypeExp(ILexNameToken typename,
1809:                         List<PExp> args)
1810:         {
1811:                 AMkTypeExp result = new AMkTypeExp();
1812:                 initExpression(result, typename.getLocation());
1813:                 result.setTypeName(typename);
1814:                 result.setArgs(args);
1815:                 return result;
1816:         }
1817:
1818:         public static AIsExp newAIsExp(ILexLocation location, ILexNameToken name,
1819:                         PExp test)
1820:         {
1821:                 AIsExp result = new AIsExp();
1822:                 initExpression(result, location);
1823:
1824:                 result.setBasicType(null);
1825:                 result.setTypeName(name);
1826:                 result.setTest(test);
1827:
1828:                 return result;
1829:         }
1830:
1831:         public static AIsExp newAIsExp(ILexLocation location, PType type, PExp test)
1832:         {
1833:                 AIsExp result = new AIsExp();
1834:                 initExpression(result, location);
1835:
1836:                 result.setBasicType(type);
1837:                 result.setTypeName(null);
1838:                 result.setTest(test);
1839:
1840:                 return result;
1841:         }
1842:
1843:         public static APreExp newAPreExp(ILexLocation location, PExp function,
1844:                         List<PExp> args)
1845:         {
1846:                 APreExp result = new APreExp();
1847:                 initExpression(result, location);
1848:
1849:                 result.setFunction(function);
1850:                 result.setArgs(args);
1851:                 return result;
1852:         }
1853:
1854:         public static ASetEnumSetExp newASetEnumSetExp(ILexLocation start)
1855:         {
1856:                 ASetEnumSetExp result = new ASetEnumSetExp();
1857:                 initExpression(result, start);
1858:
1859:                 result.setMembers(new Vector<PExp>());
1860:                 return result;
1861:         }
1862:
1863:         public static AMapEnumMapExp newAMapEnumMapExp(ILexLocation start)
1864:         {
1865:                 AMapEnumMapExp result = new AMapEnumMapExp();
1866:                 initExpression(result, start);
1867:
1868:                 result.setMembers(new Vector<AMapletExp>());
1869:                 return result;
1870:         }
1871:
1872:         public static AMapletExp newAMapletExp(PExp left, LexToken op, PExp right)
1873:         {
1874:                 AMapletExp result = new AMapletExp();
1875:                 initExpression(result, op.location);
1876:                 result.setLeft(left);
1877:                 result.setRight(right);
1878:
1879:                 return result;
1880:         }
1881:
1882:         public static ASetCompSetExp newASetCompSetExp(ILexLocation start,
1883:                         PExp first, List<PMultipleBind> bindings, PExp predicate)
1884:         {
1885:                 ASetCompSetExp result = new ASetCompSetExp();
1886:                 initExpression(result, start);
1887:
1888:                 result.setFirst(first);
1889:                 result.setBindings(bindings);
1890:                 result.setPredicate(predicate);
1891:
1892:                 return result;
1893:         }
1894:
1895:         public static ASetRangeSetExp newASetRangeSetExp(ILexLocation start,
1896:                         PExp first, PExp last)
1897:         {
1898:                 ASetRangeSetExp result = new ASetRangeSetExp();
1899:                 initExpression(result, start);
1900:
1901:                 result.setFirst(first);
1902:                 result.setLast(last);
1903:
1904:                 return result;
1905:         }
1906:
1907:         public static AMapCompMapExp newAMapCompMapExp(ILexLocation start,
1908:                         AMapletExp first, List<PMultipleBind> bindings, PExp predicate)
1909:         {
1910:                 AMapCompMapExp result = new AMapCompMapExp();// start, first, bindings,
1911:                                                                                                                 // predicate);
1912:                 initExpression(result, start);
1913:
1914:                 result.setFirst(first);
1915:                 result.setBindings(bindings);
1916:                 result.setPredicate(predicate);
1917:                 return result;
1918:         }
1919:
1920:         public static AMapEnumMapExp newAMapEnumMapExp(ILexLocation start,
1921:                         List<AMapletExp> members)
1922:         {
1923:                 AMapEnumMapExp result = new AMapEnumMapExp();
1924:                 result.setLocation(start);
1925:
1926:                 result.setMembers(members);
1927:                 return result;
1928:         }
1929:
1930:         public static ASeqEnumSeqExp newASeqEnumSeqExp(ILexLocation start)
1931:         {
1932:                 ASeqEnumSeqExp result = new ASeqEnumSeqExp();
1933:                 initExpression(result, start);
1934:
1935:                 result.setMembers(new Vector<PExp>());
1936:
1937:                 return result;
1938:         }
1939:
1940:         public static ASeqCompSeqExp newASeqCompSeqExp(ILexLocation start,
1941:                         PExp first, PBind bind, PExp predicate)
1942:         {
1943:                 ASeqCompSeqExp result = new ASeqCompSeqExp();
1944:                 initExpression(result, start);
1945:
1946:                 result.setFirst(first);
1947:                 result.setBind(bind);
1948:                 result.setPredicate(predicate);
1949:
1950:                 return result;
1951:         }
1952:
1953:         public static ASeqEnumSeqExp newASeqEnumSeqExp(ILexLocation start,
1954:                         List<PExp> members)
1955:         {
1956:                 ASeqEnumSeqExp result = new ASeqEnumSeqExp();
1957:                 initExpression(result, start);
1958:
1959:                 result.setMembers(members);
1960:
1961:                 return result;
1962:         }
1963:
1964:         public static AIfExp newAIfExp(ILexLocation start, PExp test, PExp thenExp,
1965:                         List<AElseIfExp> elseList, PExp elseExp)
1966:         {
1967:
1968:                 AIfExp result = new AIfExp();
1969:                 initExpression(result, start);
1970:
1971:                 result.setTest(test);
1972:                 result.setThen(thenExp);
1973:                 result.setElseList(elseList);
1974:                 result.setElse(elseExp);
1975:                 return result;
1976:         }
1977:
1978:         public static AElseIfExp newAElseIfExp(ILexLocation start, PExp elseIfExp,
1979:                         PExp thenExp)
1980:         {
1981:                 AElseIfExp result = new AElseIfExp();
1982:                 initExpression(result, start);
1983:
1984:                 result.setElseIf(elseIfExp);
1985:                 result.setThen(thenExp);
1986:                 return result;
1987:         }
1988:
1989:         public static ACasesExp newACasesExp(ILexLocation start, PExp exp,
1990:                         List<ACaseAlternative> cases, PExp others)
1991:         {
1992:                 ACasesExp result = new ACasesExp();
1993:                 initExpression(result, start);
1994:
1995:                 result.setExpression(exp);
1996:                 result.setCases(cases);
1997:                 result.setOthers(others);
1998:
1999:                 return result;
2000:         }
2001:
2002:         public static ACaseAlternative newACaseAlternative(PExp cexp,
2003:                         PPattern pattern, PExp resultExp)
2004:         {
2005:                 ACaseAlternative result = new ACaseAlternative();
2006:                 result.setLocation(pattern.getLocation());
2007:                 result.setCexp(cexp);
2008:                 result.setPattern(pattern);
2009:                 result.setResult(resultExp);
2010:                 return result;
2011:         }
2012:
2013:         public static ALetDefExp newALetDefExp(ILexLocation start,
2014:                         List<PDefinition> localDefs, PExp readConnectiveExpression)
2015:         {
2016:                 ALetDefExp result = new ALetDefExp();
2017:                 initExpression(result, start);
2018:
2019:                 result.setLocalDefs(localDefs);
2020:                 result.setExpression(readConnectiveExpression);
2021:                 return result;
2022:         }
2023:
2024:         public static ALetBeStExp newALetBeStExp(ILexLocation start,
2025:                         PMultipleBind bind, PExp suchThat, PExp value)
2026:         {
2027:                 ALetBeStExp result = new ALetBeStExp();
2028:                 initExpression(result, start);
2029:
2030:                 result.setBind(bind);
2031:                 result.setSuchThat(suchThat);
2032:                 result.setValue(value);
2033:
2034:                 return result;
2035:         }
2036:
2037:         public static AForAllExp newAForAllExp(ILexLocation start,
2038:                         List<PMultipleBind> bindList, PExp predicate)
2039:         {
2040:                 AForAllExp result = new AForAllExp();
2041:                 initExpression(result, start);
2042:
2043:                 result.setBindList(bindList);
2044:                 result.setPredicate(predicate);
2045:
2046:                 return result;
2047:         }
2048:
2049:         public static AExistsExp newAExistsExp(ILexLocation start,
2050:                         List<PMultipleBind> bindList, PExp predicate)
2051:         {
2052:                 AExistsExp result = new AExistsExp();
2053:                 initExpression(result, start);
2054:
2055:                 result.setBindList(bindList);
2056:                 result.setPredicate(predicate);
2057:
2058:                 return result;
2059:         }
2060:
2061:         public static AExists1Exp newAExists1Exp(ILexLocation start, PBind bind,
2062:                         PExp predicate)
2063:         {
2064:                 AExists1Exp result = new AExists1Exp();
2065:                 initExpression(result, start);
2066:
2067:                 result.setBind(bind);
2068:                 result.setPredicate(predicate);
2069:                 return result;
2070:         }
2071:
2072:         public static AIotaExp newAIotaExp(ILexLocation start, PBind bind,
2073:                         PExp predicate)
2074:         {
2075:                 AIotaExp result = new AIotaExp();
2076:                 initExpression(result, start);
2077:
2078:                 result.setBind(bind);
2079:                 result.setPredicate(predicate);
2080:                 return result;
2081:         }
2082:
2083:         public static ALambdaExp newALambdaExp(ILexLocation start,
2084:                         List<ATypeBind> bindList, PExp expression)
2085:         {
2086:                 ALambdaExp result = new ALambdaExp();
2087:                 initExpression(result, start);
2088:
2089:                 result.setBindList(bindList);
2090:                 result.setExpression(expression);
2091:                 return result;
2092:         }
2093:
2094:         public static ADefExp newADefExp(ILexLocation start,
2095:                         List<PDefinition> equalsDefs, PExp expression)
2096:         {
2097:                 ADefExp result = new ADefExp();
2098:                 initExpression(result, start);
2099:
2100:                 result.setLocalDefs(equalsDefs);
2101:                 result.setExpression(expression);
2102:                 return result;
2103:         }
2104:
2105:         public static ANewExp newANewExp(ILexLocation start,
2106:                         ILexIdentifierToken classname, List<PExp> args)
2107:         {
2108:                 ANewExp result = new ANewExp();
2109:                 initExpression(result, start);
2110:
2111:                 result.setClassName(classname);
2112:                 result.setArgs(args);
2113:                 classname.getLocation().executable(true);
2114:                 return result;
2115:         }
2116:
2117:         public static AIsOfBaseClassExp newAIsOfBaseClassExp(ILexLocation start,
2118:                         ILexNameToken classname, PExp pExp)
2119:         {
2120:                 AIsOfBaseClassExp result = new AIsOfBaseClassExp();
2121:                 initExpression(result, start);
2122:
2123:                 result.setBaseClass(classname.getExplicit(false));
2124:                 result.setExp(pExp);
2125:                 return result;
2126:         }
2127:
2128:         public static AIsOfClassExp newAIsOfClassExp(ILexLocation start,
2129:                         ILexNameToken classname, PExp pExp)
2130:         {
2131:                 AIsOfClassExp result = new AIsOfClassExp();
2132:                 initExpression(result, start);
2133:
2134:                 result.setClassName(classname.getExplicit(false));
2135:                 result.setExp(pExp);
2136:                 return result;
2137:         }
2138:
2139:         public static ASameBaseClassExp newASameBaseClassExp(ILexLocation start,
2140:                         List<PExp> args)
2141:         {
2142:                 ASameBaseClassExp result = new ASameBaseClassExp();
2143:                 initExpression(result, start);
2144:
2145:                 result.setLeft(args.get(0));
2146:                 result.setRight(args.get(1));
2147:                 return result;
2148:         }
2149:
2150:         public static ASameClassExp newASameClassExp(ILexLocation start,
2151:                         List<PExp> args)
2152:         {
2153:                 ASameClassExp result = new ASameClassExp();
2154:                 initExpression(result, start);
2155:
2156:                 result.setLeft(args.get(0));
2157:                 result.setRight(args.get(1));
2158:                 return result;
2159:         }
2160:
2161:         public static AHistoryExp newAHistoryExp(ILexLocation location,
2162:                         LexToken op, LexNameList opnames)
2163:         {
2164:                 AHistoryExp result = new AHistoryExp();
2165:                 initExpression(result, location);
2166:
2167:                 result.setHop(op);
2168:                 result.setOpnames(opnames);
2169:
2170:                 return result;
2171:         }
2172:
2173:         public static AAllImport newAAllImport(ILexNameToken name)
2174:         {
2175:                 AAllImport result = new AAllImport();
2176:                 result.setLocation(name.getLocation());
2177:                 result.setName(name);
2178:                 result.setRenamed(null);
2179:                 return result;
2180:         }
2181:
2182:         public static AFromModuleImports newAFromModuleImports(
2183:                         ILexIdentifierToken name, List<List<PImport>> signatures)
2184:         {
2185:                 return new AFromModuleImports(name, signatures);
2186:         }
2187:
2188:         public static AModuleModules newAModuleModules(File file,
2189:                         List<PDefinition> definitions)
2190:         {
2191:
2192:                 AModuleModules result = new AModuleModules();
2193:
2194:•                if (definitions.isEmpty())
2195:                 {
2196:                         result.setName(defaultName(new LexLocation()));
2197:                 } else
2198:                 {
2199:                         result.setName(defaultName(definitions.get(0).getLocation()));
2200:                 }
2201:
2202:                 result.setImports(null);
2203:                 result.setExports(null);
2204:                 result.setDefs(definitions);
2205:
2206:•                if (definitions != null)
2207:                 {
2208:•                        for (PDefinition d : definitions)
2209:                         {
2210:                                 d.parent(result);
2211:                         }
2212:                 }
2213:
2214:                 result.setTypeChecked(false);
2215:                 result.setIsDLModule(false); // TODO: this does not exist in VDMj
2216:
2217:                 List<ClonableFile> files = new Vector<ClonableFile>();
2218:•                if (file != null)
2219:                 {
2220:                         files.add(new ClonableFile(file));
2221:                 }
2222:                 result.setFiles(files);
2223:
2224:                 result.setExportdefs(new Vector<PDefinition>()); // Export nothing
2225:                 result.setImportdefs(new Vector<PDefinition>()); // and import nothing
2226:
2227:                 result.setIsFlat(true);
2228:
2229:                 // Reset parent set by member graph field
2230:                 result.parent(null);
2231:
2232:                 return result;
2233:         }
2234:
2235:         /**
2236:          * Generate the default module name.
2237:          *
2238:          * @param location
2239:          * The textual location of the name
2240:          * @return The default module name.
2241:          */
2242:
2243:         private static LexIdentifierToken defaultName(ILexLocation location)
2244:         {
2245:                 return new LexIdentifierToken("DEFAULT", false, location);
2246:         }
2247:
2248:         public static AModuleModules newAModuleModules(LexIdentifierToken name,
2249:                         AModuleImports imports, AModuleExports exports,
2250:                         List<PDefinition> defs)
2251:         {
2252:                 AModuleModules result = new AModuleModules();
2253:
2254:                 result.setName(name);
2255:                 result.setImports(imports);
2256:                 result.setExports(exports);
2257:                 result.setDefs(defs);
2258:
2259:                 List<ClonableFile> files = new Vector<ClonableFile>();
2260:                 files.add(new ClonableFile(name.location.getFile()));
2261:                 result.setFiles(files);
2262:                 result.setIsFlat(false);
2263:                 result.setTypeChecked(false);
2264:                 result.setIsDLModule(false); // TODO: this does not exist in VDMj
2265:
2266:                 result.setExportdefs(new Vector<PDefinition>()); // By default, export
2267:                                                                                                                         // nothing
2268:                 result.setImportdefs(new Vector<PDefinition>()); // and import nothing
2269:
2270:                 // Reset parent set by member graph field
2271:                 result.parent(null);
2272:
2273:                 return result;
2274:         }
2275:
2276:         public static AModuleExports newAModuleExports(List<List<PExport>> exports)
2277:         {
2278:                 return new AModuleExports(exports);
2279:         }
2280:
2281:         public static AAllExport newAAllExport(ILexLocation location)
2282:         {
2283:                 AAllExport result = new AAllExport();
2284:                 result.setLocation(location);
2285:                 return result;
2286:         }
2287:
2288:         public static ATypeExport newATypeExport(ILexNameToken name, boolean struct)
2289:         {
2290:                 ATypeExport result = new ATypeExport();
2291:                 result.setLocation(name.getLocation());
2292:                 result.setName(name);
2293:                 result.setStruct(struct);
2294:                 return result;
2295:         }
2296:
2297:         public static AValueExport newAValueExport(ILexLocation location,
2298:                         List<ILexNameToken> nameList, PType type)
2299:         {
2300:                 AValueExport result = new AValueExport();
2301:                 result.setLocation(location);
2302:                 result.setNameList(nameList);
2303:                 result.setExportType(type);
2304:                 return result;
2305:         }
2306:
2307:         public static AFunctionExport newAFunctionExport(ILexLocation location,
2308:                         List<ILexNameToken> nameList, PType type, List<ILexNameToken> typeParams)
2309:         {
2310:                 AFunctionExport result = new AFunctionExport();
2311:                 result.setLocation(location);
2312:                 result.setNameList(nameList);
2313:                 result.setExportType(type);
2314:                 result.setTypeParams(typeParams);
2315:                 return result;
2316:         }
2317:
2318:         public static AOperationExport newAOperationExport(ILexLocation location,
2319:                         List<ILexNameToken> nameList, PType type)
2320:         {
2321:                 AOperationExport result = new AOperationExport();
2322:                 result.setLocation(location);
2323:                 result.setNameList(nameList);
2324:                 result.setExportType(type);
2325:                 return result;
2326:         }
2327:
2328:         public static AModuleImports newAModuleImports(ILexIdentifierToken name,
2329:                         List<AFromModuleImports> imports)
2330:         {
2331:                 return new AModuleImports(name, imports);
2332:         }
2333:
2334:         public static ATypeImport newATypeImport(ATypeDefinition def,
2335:                         ILexNameToken renamed)
2336:         {
2337:                 ATypeImport result = new ATypeImport();
2338:                 result.setLocation(def.getName().getLocation());
2339:                 result.setName(def.getName());
2340:                 result.setRenamed(renamed);
2341:                 result.setDef(def);
2342:                 return result;
2343:         }
2344:
2345:         public static ATypeImport newATypeImport(ILexNameToken defname,
2346:                         ILexNameToken renamed)
2347:         {
2348:                 ATypeImport result = new ATypeImport();
2349:                 result.setLocation(defname.getLocation());
2350:                 result.setName(defname);
2351:                 result.setRenamed(renamed);
2352:                 result.setDef(null);
2353:                 return result;
2354:         }
2355:
2356:         public static AValueValueImport newAValueValueImport(LexNameToken defname,
2357:                         PType type, LexNameToken renamed)
2358:         {
2359:                 AValueValueImport result = new AValueValueImport();
2360:                 result.setLocation(defname.location);
2361:                 result.setName(defname);
2362:                 result.setRenamed(renamed);
2363:                 result.setImportType(type);
2364:                 return result;
2365:         }
2366:
2367:         public static AFunctionValueImport newAFunctionValueImport(
2368:                         ILexNameToken defname, PType type, LexNameList typeParams,
2369:                         ILexNameToken renamed)
2370:         {
2371:                 AFunctionValueImport result = new AFunctionValueImport();
2372:                 result.setLocation(defname.getLocation());
2373:                 result.setName(defname);
2374:                 result.setRenamed(renamed);
2375:                 result.setImportType(type);
2376:                 result.setTypeParams(typeParams);
2377:
2378:                 return result;
2379:         }
2380:
2381:         public static AOperationValueImport newAOperationValueImport(
2382:                         ILexNameToken defname, PType type, ILexNameToken renamed)
2383:         {
2384:                 AOperationValueImport result = new AOperationValueImport();
2385:                 result.setLocation(defname.getLocation());
2386:                 result.setName(defname);
2387:                 result.setRenamed(renamed);
2388:                 result.setImportType(type);
2389:
2390:                 return result;
2391:         }
2392:
2393:         public static AUnionPattern newAUnionPattern(PPattern left,
2394:                         ILexLocation location, PPattern right)
2395:         {
2396:                 AUnionPattern result = new AUnionPattern();
2397:                 initPattern(result, location);
2398:                 result.setLeft(left);
2399:                 result.setRight(right);
2400:                 return result;
2401:         }
2402:
2403:         public static AConcatenationPattern newAConcatenationPattern(PPattern left,
2404:                         ILexLocation location, PPattern right)
2405:         {
2406:                 AConcatenationPattern result = new AConcatenationPattern();
2407:                 initPattern(result, location);
2408:                 result.setLeft(left);
2409:                 result.setRight(right);
2410:                 return result;
2411:         }
2412:
2413:         public static AIntegerPattern newAIntegerPattern(LexIntegerToken token)
2414:         {
2415:                 AIntegerPattern result = new AIntegerPattern();
2416:                 initPattern(result, token.location);
2417:                 result.setValue(token);
2418:                 return result;
2419:         }
2420:
2421:         public static ARealPattern newARealPattern(LexRealToken token)
2422:         {
2423:                 ARealPattern result = new ARealPattern();
2424:                 initPattern(result, token.location);
2425:                 result.setValue(token);
2426:                 return result;
2427:         }
2428:
2429:         public static ACharacterPattern newACharacterPattern(LexCharacterToken token)
2430:         {
2431:                 ACharacterPattern result = new ACharacterPattern();
2432:                 initPattern(result, token.location);
2433:                 result.setValue(token);
2434:                 return result;
2435:         }
2436:
2437:         public static AStringPattern newAStringPattern(LexStringToken token)
2438:         {
2439:                 AStringPattern result = new AStringPattern();
2440:                 initPattern(result, token.location);
2441:                 result.setValue(token);
2442:                 return result;
2443:         }
2444:
2445:         public static AQuotePattern newAQuotePattern(LexQuoteToken token)
2446:         {
2447:                 AQuotePattern result = new AQuotePattern();
2448:                 initPattern(result, token.location);
2449:                 result.setValue(token);
2450:                 return result;
2451:         }
2452:
2453:         public static ABooleanPattern newABooleanPattern(LexBooleanToken token)
2454:         {
2455:                 ABooleanPattern result = new ABooleanPattern();
2456:                 initPattern(result, token.location);
2457:
2458:                 result.setValue(token);
2459:                 return result;
2460:         }
2461:
2462:         public static ANilPattern newANilPattern(LexKeywordToken token)
2463:         {
2464:                 ANilPattern result = new ANilPattern();
2465:                 initPattern(result, token.location);
2466:
2467:                 return result;
2468:         }
2469:
2470:         public static AExpressionPattern newAExpressionPattern(PExp expression)
2471:         {
2472:                 AExpressionPattern result = new AExpressionPattern();
2473:                 initPattern(result, expression.getLocation());
2474:
2475:                 result.setExp(expression);
2476:                 return result;
2477:         }
2478:
2479:         public static ASetPattern newASetPattern(ILexLocation location,
2480:                         List<PPattern> list)
2481:         {
2482:                 ASetPattern result = new ASetPattern();
2483:                 initPattern(result, location);
2484:                 result.setLocation(location);
2485:                 result.setPlist(list);
2486:                 return result;
2487:         }
2488:
2489:         public static ASeqPattern newASeqPattern(ILexLocation location,
2490:                         List<PPattern> list)
2491:         {
2492:                 ASeqPattern result = new ASeqPattern();
2493:                 initPattern(result, location);
2494:                 result.setPlist(list);
2495:                 return result;
2496:         }
2497:
2498:         public static ARecordPattern newARecordPattern(ILexNameToken typename,
2499:                         List<PPattern> list)
2500:         {
2501:                 ARecordPattern result = new ARecordPattern();
2502:                 initPattern(result, typename.getLocation());
2503:                 result.setPlist(list);
2504:                 result.setTypename(typename);
2505:                 result.setType(AstFactory.getAUnresolvedType(typename));
2506:                 return result;
2507:         }
2508:
2509:         public static AObjectPattern newAObjectPattern(ILexNameToken classname,
2510:                         List<ANamePatternPair> list)
2511:         {
2512:                 AObjectPattern result = new AObjectPattern();
2513:                 initPattern(result, classname.getLocation());
2514:                 result.setFields(list);
2515:                 result.setClassname(classname);
2516:                 result.setType(AstFactory.getAUnresolvedType(classname));
2517:                 return result;
2518:         }
2519:         
2520:         public static ANamePatternPair newANamePatternPair(ILexNameToken name, PPattern pattern)
2521:         {
2522:                 ANamePatternPair pair = new ANamePatternPair();
2523:                 pair.setName(name);
2524:                 pair.setPattern(pattern);
2525:                 pair.setResolved(false);
2526:                 return pair;
2527:         }
2528:
2529:         private static AUnresolvedType getAUnresolvedType(ILexNameToken typename)
2530:         {
2531:                 AUnresolvedType result = new AUnresolvedType();
2532:                 initType(result, typename.getLocation());
2533:
2534:                 result.setName(typename);
2535:                 return result;
2536:         }
2537:
2538:         public static AIgnorePattern newAIgnorePattern(ILexLocation location)
2539:         {
2540:                 AIgnorePattern result = new AIgnorePattern();
2541:                 initPattern(result, location);
2542:                 return result;
2543:         }
2544:
2545:         public static ANotYetSpecifiedStm newANotYetSpecifiedStm(
2546:                         ILexLocation location)
2547:         {
2548:                 ANotYetSpecifiedStm result = new ANotYetSpecifiedStm();
2549:                 initStatement(result, location);
2550:
2551:•                if (location != null)
2552:                 {
2553:                         location.executable(false); // ie. ignore coverage for these
2554:                 }
2555:                 return result;
2556:         }
2557:
2558:         public static ASubclassResponsibilityStm newASubclassResponsibilityStm(
2559:                         ILexLocation location)
2560:         {
2561:                 ASubclassResponsibilityStm result = new ASubclassResponsibilityStm();
2562:                 initStatement(result, location);
2563:                 location.hit(); // ie. ignore coverage for these
2564:                 return result;
2565:         }
2566:
2567:         public static AExitStm newAExitStm(ILexLocation token, PExp exp)
2568:         {
2569:                 AExitStm result = new AExitStm();
2570:                 initStatement(result, token);
2571:
2572:                 result.setExpression(exp);
2573:                 return result;
2574:         }
2575:
2576:         public static PStm newAExitStm(ILexLocation token)
2577:         {
2578:                 AExitStm result = new AExitStm();
2579:                 initStatement(result, token);
2580:
2581:                 result.setExpression(null);
2582:                 return result;
2583:         }
2584:
2585:         public static ATixeStm newATixeStm(ILexLocation token,
2586:                         List<ATixeStmtAlternative> traps, PStm body)
2587:         {
2588:                 ATixeStm result = new ATixeStm();
2589:                 initStatement(result, token);
2590:
2591:                 result.setTraps(traps);
2592:                 result.setBody(body);
2593:                 return result;
2594:         }
2595:
2596:         public static ATrapStm newATrapStm(ILexLocation token,
2597:                         ADefPatternBind patternBind, PStm with, PStm body)
2598:         {
2599:                 ATrapStm result = new ATrapStm();
2600:                 initStatement(result, token);
2601:
2602:                 result.setPatternBind(patternBind);
2603:                 result.setWith(with);
2604:                 result.setBody(body);
2605:
2606:                 return result;
2607:         }
2608:
2609:         public static AAlwaysStm newAAlwaysStm(ILexLocation token, PStm always,
2610:                         PStm body)
2611:         {
2612:                 AAlwaysStm result = new AAlwaysStm();
2613:                 initStatement(result, token);
2614:
2615:                 result.setAlways(always);
2616:                 result.setBody(body);
2617:
2618:                 return result;
2619:         }
2620:
2621:         public static AAnnotatedStm newAAnnotatedStm(ILexLocation location,
2622:                         PAnnotation annotation, PStm body)
2623:         {
2624:                 AAnnotatedStm result = new AAnnotatedStm();
2625:                 initStatement(result, location);
2626:                 
2627:                 result.setAnnotation(annotation);
2628:                 result.setStmt(body);
2629:                 return result;
2630:         }
2631:
2632:         public static ANonDeterministicSimpleBlockStm newANonDeterministicSimpleBlockStm(
2633:                         ILexLocation token)
2634:         {
2635:                 ANonDeterministicSimpleBlockStm result = new ANonDeterministicSimpleBlockStm();
2636:                 initStatement(result, token);
2637:
2638:                 result.setStatements(new Vector<PStm>());
2639:
2640:                 return result;
2641:         }
2642:
2643:         public static AAtomicStm newAAtomicStm(ILexLocation token,
2644:                         List<AAssignmentStm> assignments)
2645:         {
2646:                 AAtomicStm result = new AAtomicStm();
2647:                 initStatement(result, token);
2648:
2649:                 result.setAssignments(assignments);
2650:                 return result;
2651:         }
2652:
2653:         public static ACallStm newACallStm(ILexNameToken name, List<PExp> args)
2654:         {
2655:                 ACallStm result = new ACallStm();
2656:                 initStatement(result, name.getLocation());
2657:
2658:                 result.setName(name);
2659:                 result.setArgs(args);
2660:
2661:                 return result;
2662:         }
2663:
2664:         public static ACallObjectStm newACallObjectStm(
2665:                         PObjectDesignator designator, ILexNameToken classname,
2666:                         List<PExp> args)
2667:         {
2668:                 ACallObjectStm result = new ACallObjectStm();
2669:                 initStatement(result, designator.getLocation());
2670:
2671:                 result.setDesignator(designator);
2672:                 result.setClassname(classname);
2673:                 result.setFieldname(null);
2674:                 result.setArgs(args);
2675:                 result.setExplicit(classname.getExplicit());
2676:
2677:                 return result;
2678:         }
2679:
2680:         public static ACallObjectStm newACallObjectStm(
2681:                         PObjectDesignator designator, ILexIdentifierToken fieldname,
2682:                         List<PExp> args)
2683:         {
2684:                 ACallObjectStm result = new ACallObjectStm();
2685:                 initStatement(result, designator.getLocation());
2686:
2687:                 result.setDesignator(designator);
2688:                 result.setClassname(null);
2689:                 result.setFieldname(fieldname);
2690:                 result.setArgs(args);
2691:                 result.setExplicit(false);
2692:
2693:                 return result;
2694:         }
2695:
2696:         public static AFieldObjectDesignator newAFieldObjectDesignator(
2697:                         PObjectDesignator object, ILexIdentifierToken fieldname)
2698:         {
2699:                 AFieldObjectDesignator result = new AFieldObjectDesignator();
2700:                 result.setLocation(object.getLocation());
2701:                 result.setObject(object);
2702:                 result.setClassName(null);
2703:                 result.setFieldName(fieldname);
2704:
2705:                 return result;
2706:         }
2707:
2708:         public static PObjectDesignator newAFieldObjectDesignator(
2709:                         PObjectDesignator object, ILexNameToken classname)
2710:         {
2711:                 AFieldObjectDesignator result = new AFieldObjectDesignator();
2712:                 result.setLocation(object.getLocation());
2713:                 result.setObject(object);
2714:                 result.setClassName(classname);
2715:                 result.setFieldName(null);
2716:
2717:                 return result;
2718:         }
2719:
2720:         public static AApplyObjectDesignator newAApplyObjectDesignator(
2721:                         PObjectDesignator object, List<PExp> args)
2722:         {
2723:
2724:                 AApplyObjectDesignator result = new AApplyObjectDesignator();
2725:                 result.setLocation(object.getLocation());
2726:                 result.setObject(object);
2727:                 result.setArgs(args);
2728:
2729:                 return result;
2730:         }
2731:
2732:         public static ASelfObjectDesignator newASelfObjectDesignator(
2733:                         ILexLocation location)
2734:         {
2735:
2736:                 ASelfObjectDesignator result = new ASelfObjectDesignator();
2737:                 result.setLocation(location);
2738:                 result.setSelf(new LexNameToken(location.getModule(), "self", location));
2739:                 return result;
2740:         }
2741:
2742:         public static AIdentifierObjectDesignator newAIdentifierObjectDesignator(
2743:                         ILexNameToken name)
2744:         {
2745:                 AIdentifierObjectDesignator result = new AIdentifierObjectDesignator();
2746:                 result.setLocation(name.getLocation());
2747:                 result.setName(name);
2748:                 result.setExpression(AstFactory.newAVariableExp(name.getExplicit(true)));
2749:                 return result;
2750:         }
2751:
2752:         public static ANewObjectDesignator newANewObjectDesignator(
2753:                         LexIdentifierToken classname, List<PExp> args)
2754:         {
2755:                 ANewObjectDesignator result = new ANewObjectDesignator();
2756:                 result.setLocation(classname.location);
2757:                 result.setExpression(AstFactory.newANewExp(classname.location, classname, args));
2758:                 return result;
2759:         }
2760:
2761:         public static AWhileStm newAWhileStm(ILexLocation token, PExp exp, PStm body)
2762:         {
2763:                 AWhileStm result = new AWhileStm();
2764:                 initStatement(result, token);
2765:                 result.setExp(exp);
2766:                 result.setStatement(body);
2767:                 return result;
2768:         }
2769:
2770:         public static AForAllStm newAForAllStm(ILexLocation token,
2771:                         PPattern pattern, PExp set, PStm stmt)
2772:         {
2773:                 AForAllStm result = new AForAllStm();
2774:                 initStatement(result, token);
2775:
2776:                 result.setPattern(pattern);
2777:                 result.setSet(set);
2778:                 result.setStatement(stmt);
2779:                 return result;
2780:         }
2781:
2782:         public static AForPatternBindStm newAForPatternBindStm(ILexLocation token,
2783:                         ADefPatternBind pb, boolean reverse, PExp exp, PStm body)
2784:         {
2785:                 AForPatternBindStm result = new AForPatternBindStm();
2786:                 initStatement(result, token);
2787:
2788:                 result.setPatternBind(pb);
2789:                 result.setReverse(reverse);
2790:                 result.setExp(exp);
2791:                 result.setStatement(body);
2792:                 return result;
2793:         }
2794:
2795:         public static AForIndexStm newAForIndexStm(ILexLocation token,
2796:                         ILexNameToken var, PExp from, PExp to, PExp by, PStm body)
2797:         {
2798:
2799:                 AForIndexStm result = new AForIndexStm();
2800:                 initStatement(result, token);
2801:
2802:                 result.setVar(var);
2803:                 result.setFrom(from);
2804:                 result.setTo(to);
2805:                 result.setBy(by);
2806:                 result.setStatement(body);
2807:
2808:                 return result;
2809:         }
2810:
2811:         public static AIfStm newAIfStm(ILexLocation token, PExp ifExp,
2812:                         PStm thenStmt, List<AElseIfStm> elseIfList, PStm elseStmt)
2813:         {
2814:
2815:                 AIfStm result = new AIfStm();
2816:                 initStatement(result, token);
2817:
2818:                 result.setIfExp(ifExp);
2819:                 result.setThenStm(thenStmt);
2820:                 result.setElseIf(elseIfList);
2821:                 result.setElseStm(elseStmt);
2822:
2823:                 return result;
2824:         }
2825:
2826:         public static AElseIfStm newAElseIfStm(ILexLocation token, PExp elseIfExp,
2827:                         PStm thenStmt)
2828:         {
2829:                 AElseIfStm result = new AElseIfStm();
2830:                 initStatement(result, token);
2831:
2832:                 result.setElseIf(elseIfExp);
2833:                 result.setThenStm(thenStmt);
2834:
2835:                 return result;
2836:         }
2837:
2838:         public static AAssignmentStm newAAssignmentStm(ILexLocation token,
2839:                         PStateDesignator target, PExp exp)
2840:         {
2841:                 AAssignmentStm result = new AAssignmentStm();
2842:                 initStatement(result, token);
2843:
2844:                 result.setInConstructor(false);
2845:                 result.setExp(exp);
2846:                 result.setTarget(target);
2847:                 return result;
2848:         }
2849:
2850:         public static AFieldStateDesignator newAFieldStateDesignator(
2851:                         PStateDesignator object, ILexIdentifierToken field)
2852:         {
2853:                 AFieldStateDesignator result = new AFieldStateDesignator();
2854:                 initStateDesignator(result, object.getLocation());
2855:
2856:                 result.setObject(object);
2857:                 result.setField(field);
2858:
2859:                 return result;
2860:         }
2861:
2862:         public static AMapSeqStateDesignator newAMapSeqStateDesignator(
2863:                         PStateDesignator mapseq, PExp exp)
2864:         {
2865:                 AMapSeqStateDesignator result = new AMapSeqStateDesignator();
2866:                 initStateDesignator(result, mapseq.getLocation());
2867:
2868:                 result.setMapseq(mapseq);
2869:                 result.setExp(exp);
2870:                 return result;
2871:         }
2872:
2873:         public static ABlockSimpleBlockStm newABlockSimpleBlockStm(
2874:                         ILexLocation token, List<AAssignmentDefinition> assignmentDefs)
2875:         {
2876:                 ABlockSimpleBlockStm result = new ABlockSimpleBlockStm();
2877:                 initStatement(result, token);
2878:
2879:                 result.setAssignmentDefs(assignmentDefs);
2880:                 return result;
2881:         }
2882:
2883:         public static AAssignmentDefinition newAAssignmentDefinition(
2884:                         ILexNameToken name, PType type, PExp exp)
2885:         {
2886:                 AAssignmentDefinition result = new AAssignmentDefinition();
2887:                 initDefinition(result, Pass.VALUES, name.getLocation(), name, NameScope.STATE);
2888:
2889:                 result.setType(type);
2890:                 result.setExpression(exp);
2891:                 result.getLocation().executable(false);
2892:                 return result;
2893:         }
2894:
2895:         public static AReturnStm newAReturnStm(ILexLocation token, PExp exp)
2896:         {
2897:                 AReturnStm result = new AReturnStm();
2898:                 initStatement(result, token);
2899:
2900:                 result.setExpression(exp);
2901:                 return result;
2902:         }
2903:
2904:         public static PStm newAReturnStm(ILexLocation token)
2905:         {
2906:                 AReturnStm result = new AReturnStm();
2907:                 initStatement(result, token);
2908:
2909:                 result.setExpression(null);
2910:                 return result;
2911:         }
2912:
2913:         public static ALetStm newALetStm(ILexLocation token,
2914:                         List<PDefinition> localDefs, PStm readStatement, boolean isDef)
2915:         {
2916:                 ALetStm result = new ALetStm();
2917:                 initStatement(result, token);
2918:
2919:                 result.setLocalDefs(localDefs);
2920:                 result.setStatement(readStatement);
2921:                 result.setIsDef(isDef);
2922:                 return result;
2923:         }
2924:
2925:         public static ALetBeStStm newALetBeStStm(ILexLocation token,
2926:                         PMultipleBind bind, PExp stexp, PStm statement)
2927:         {
2928:                 ALetBeStStm result = new ALetBeStStm();
2929:                 initStatement(result, token);
2930:
2931:                 result.setBind(bind);
2932:                 result.setSuchThat(stexp);
2933:                 result.setStatement(statement);
2934:
2935:                 return result;
2936:         }
2937:
2938:         public static ACasesStm newACasesStm(ILexLocation token, PExp exp,
2939:                         List<ACaseAlternativeStm> cases, PStm others)
2940:         {
2941:                 ACasesStm result = new ACasesStm();
2942:                 initStatement(result, token);
2943:
2944:                 result.setExp(exp);
2945:                 result.setCases(cases);
2946:                 result.setOthers(others);
2947:
2948:                 return result;
2949:         }
2950:
2951:         public static ACaseAlternativeStm newACaseAlternativeStm(PPattern pattern,
2952:                         PStm stmt)
2953:         {
2954:                 ACaseAlternativeStm result = new ACaseAlternativeStm();
2955:                 result.setLocation(pattern.getLocation());
2956:                 result.getLocation().executable(true);
2957:                 result.setPattern(pattern);
2958:                 result.setResult(stmt);
2959:                 return result;
2960:         }
2961:
2962:         public static AStartStm newAStartStm(ILexLocation location, PExp obj)
2963:         {
2964:                 AStartStm result = new AStartStm();
2965:                 initStatement(result, location);
2966:
2967:                 result.setObj(obj);
2968:                 return result;
2969:         }
2970:
2971:         public static AStopStm newAStopStm(ILexLocation location, PExp obj)
2972:         {
2973:                 AStopStm result = new AStopStm();
2974:                 initStatement(result, location);
2975:
2976:                 result.setObj(obj);
2977:                 return result;
2978:         }
2979:
2980:         public static ADurationStm newADurationStm(ILexLocation location,
2981:                         PExp duration, PStm stmt)
2982:         {
2983:                 ADurationStm result = new ADurationStm();
2984:                 initStatement(result, location);
2985:
2986:                 result.setDuration(duration);
2987:                 result.setStatement(stmt);
2988:                 return result;
2989:         }
2990:
2991:         public static ACyclesStm newACyclesStm(ILexLocation location,
2992:                         PExp duration, PStm stmt)
2993:         {
2994:                 ACyclesStm result = new ACyclesStm();
2995:                 initStatement(result, location);
2996:
2997:                 result.setCycles(duration);
2998:                 result.setStatement(stmt);
2999:
3000:                 return result;
3001:         }
3002:
3003:         public static AUnionType newAUnionType(ILexLocation location, PType a,
3004:                         PType b)
3005:         {
3006:                 AUnionType result = new AUnionType();
3007:                 initType(result, location);
3008:                 initUnionType(result);
3009:
3010:                 List<PType> list = new Vector<PType>();
3011:                 list.add(a);
3012:                 list.add(b);
3013:                 result.setTypes(list);
3014:                 af.createAUnionTypeAssistant().expand(result);
3015:                 return result;
3016:         }
3017:
3018:         public static AFieldField newAFieldField(ILexNameToken tagname, String tag,
3019:                         PType type, boolean equalityAbstraction)
3020:         {
3021:                 AFieldField result = new AFieldField();
3022:
3023:                 result.setAccess(null);
3024:                 result.setTagname(tagname);
3025:                 result.setTag(tag);
3026:                 result.setType(type);
3027:                 result.setEqualityAbstraction(equalityAbstraction);
3028:
3029:                 return result;
3030:         }
3031:
3032:         public static AMapMapType newAMapMapType(ILexLocation location, PType from,
3033:                         PType to)
3034:         {
3035:
3036:                 AMapMapType result = new AMapMapType();
3037:                 initType(result, location);
3038:
3039:                 result.setFrom(from);
3040:                 result.setTo(to);
3041:                 result.setEmpty(false);
3042:
3043:                 return result;
3044:         }
3045:
3046:         public static AInMapMapType newAInMapMapType(ILexLocation location,
3047:                         PType from, PType to)
3048:         {
3049:                 AInMapMapType result = new AInMapMapType();
3050:                 initType(result, location);
3051:
3052:                 result.setFrom(from);
3053:                 result.setTo(to);
3054:                 result.setEmpty(false);
3055:
3056:                 return result;
3057:         }
3058:
3059:         public static ASetSetType newASetSetType(ILexLocation location, PType type)
3060:         {
3061:                 ASetSetType result = new ASetSetType();
3062:
3063:                 initType(result, location);
3064:                 result.setSetof(type);
3065:                 result.setEmpty(false);
3066:
3067:                 return result;
3068:         }
3069:
3070:         public static ASet1SetType newASet1SetType(ILexLocation location, PType type)
3071:         {
3072:                 ASet1SetType result = new ASet1SetType();
3073:
3074:                 initType(result, location);
3075:                 result.setSetof(type);
3076:                 result.setEmpty(false);
3077:
3078:                 return result;
3079:         }
3080:
3081:         public static ASeqSeqType newASeqSeqType(ILexLocation location, PType type)
3082:         {
3083:                 ASeqSeqType result = new ASeqSeqType();
3084:
3085:                 initType(result, location);
3086:                 result.setSeqof(type);
3087:                 result.setEmpty(false);
3088:
3089:                 return result;
3090:         }
3091:
3092:         public static ASeq1SeqType newASeq1SeqType(ILexLocation location, PType type)
3093:         {
3094:                 ASeq1SeqType result = new ASeq1SeqType();
3095:
3096:                 initType(result, location);
3097:                 result.setSeqof(type);
3098:                 result.setEmpty(false);
3099:
3100:                 return result;
3101:         }
3102:
3103:         public static AQuoteType newAQuoteType(ILexQuoteToken token)
3104:         {
3105:                 AQuoteType result = new AQuoteType();
3106:                 initType(result, token.getLocation());
3107:
3108:                 result.setValue(token);
3109:
3110:                 return result;
3111:         }
3112:
3113:         public static ABracketType newABracketType(ILexLocation location, PType type)
3114:         {
3115:                 ABracketType result = new ABracketType();
3116:                 initType(result, location);
3117:                 result.setType(type);
3118:
3119:                 return result;
3120:         }
3121:
3122:         public static AOptionalType newAOptionalType(ILexLocation location,
3123:                         PType type)
3124:         {
3125:                 AOptionalType result = new AOptionalType();
3126:                 initType(result, location);
3127:
3128:•                while (type instanceof AOptionalType)
3129:                 {
3130:                         type = ((AOptionalType) type).getType();
3131:                 }
3132:
3133:                 result.setType(type);
3134:                 return result;
3135:         }
3136:
3137:         public static AUnresolvedType newAUnresolvedType(ILexNameToken typename)
3138:         {
3139:                 AUnresolvedType result = new AUnresolvedType();
3140:                 initType(result, typename.getLocation());
3141:
3142:                 result.setName(typename);
3143:
3144:                 return result;
3145:         }
3146:
3147:         public static AParameterType newAParameterType(ILexNameToken name)
3148:         {
3149:                 AParameterType result = new AParameterType();
3150:
3151:                 initType(result, name.getLocation());
3152:                 result.setName(name);
3153:                 return result;
3154:         }
3155:
3156:         public static AOperationType newAOperationType(ILexLocation location)
3157:         {
3158:                 AOperationType result = new AOperationType();
3159:                 initType(result, location);
3160:                 result.setParameters(new Vector<PType>());
3161:                 result.setResult(AstFactory.newAVoidType(location));
3162:                 result.setPure(false);
3163:
3164:                 return result;
3165:         }
3166:
3167:         public static AClassInvariantStm newAClassInvariantStm(ILexNameToken name,
3168:                         List<PDefinition> invdefs)
3169:         {
3170:                 AClassInvariantStm result = new AClassInvariantStm();
3171:                 initStatement(result, name.getLocation());
3172:
3173:                 result.setName(name);
3174:                 result.setInvDefs(invdefs);
3175:                 name.getLocation().executable(false);
3176:
3177:                 return result;
3178:         }
3179:
3180:         public static AInheritedDefinition newAInheritedDefinition(
3181:                         ILexNameToken localname, PDefinition d)
3182:         {
3183:                 AInheritedDefinition result = new AInheritedDefinition();
3184:                 initDefinition(result, d.getPass(), d.getLocation(), localname, d.getNameScope());
3185:
3186:                 result.setSuperdef(d);
3187:                 result.setOldname(localname.getOldName());
3188:                 result.setType(d.getType());
3189:
3190:                 af.createPDefinitionAssistant().setClassDefinition(result, d.getClassDefinition());
3191:                 result.setAccess(d.getAccess().clone());
3192:
3193:                 return result;
3194:         }
3195:
3196:         public static AImportedDefinition newAImportedDefinition(
3197:                         ILexLocation location, PDefinition d)
3198:         {
3199:                 AImportedDefinition result = new AImportedDefinition();
3200:                 initDefinition(result, Pass.DEFS, location, d.getName(), d.getNameScope());
3201:                 result.setDef(d);
3202:
3203:                 return result;
3204:         }
3205:
3206:         public static ARenamedDefinition newARenamedDefinition(ILexNameToken name,
3207:                         PDefinition def)
3208:         {
3209:                 ARenamedDefinition result = new ARenamedDefinition();
3210:                 initDefinition(result, def.getPass(), name.getLocation(), name, def.getNameScope());
3211:                 result.setDef(def);
3212:
3213:                 return result;
3214:         }
3215:
3216:         public static AClassClassDefinition newAClassClassDefinition()
3217:         {
3218:                 AClassClassDefinition result = AstFactory.newAClassClassDefinition(new LexNameToken("CLASS", "DEFAULT", new LexLocation()), new LexNameList(), new Vector<PDefinition>());
3219:                 // TODO: missing types in AClassClassDefinition
3220:                 // privateStaticValues = new NameValuePairMap();
3221:                 // publicStaticValues = new NameValuePairMap();
3222:                 return result;
3223:         }
3224:
3225:         public static AClassType newAClassType(ILexLocation location,
3226:                         SClassDefinition classdef)
3227:         {
3228:                 AClassType result = new AClassType();
3229:                 initType(result, location);
3230:
3231:                 result.setClassdef(classdef);
3232:                 result.setName(classdef.getName().clone());
3233:
3234:                 return result;
3235:         }
3236:
3237:         public static AMapMapType newAMapMapType(ILexLocation location)
3238:         {
3239:                 AMapMapType result = new AMapMapType();
3240:                 initType(result, location);
3241:
3242:                 result.setFrom(AstFactory.newAUnknownType(location));
3243:                 result.setTo(AstFactory.newAUnknownType(location));
3244:                 result.setEmpty(true);
3245:
3246:                 return result;
3247:         }
3248:
3249:         public static ASetSetType newASetSetType(ILexLocation location)
3250:         {
3251:                 ASetSetType result = new ASetSetType();
3252:                 initType(result, location);
3253:
3254:                 result.setSetof(AstFactory.newAUnknownType(location));
3255:                 result.setEmpty(true);
3256:
3257:                 return result;
3258:         }
3259:
3260:         public static ASet1SetType newASet1SetType(ILexLocation location)
3261:         {
3262:                 ASet1SetType result = new ASet1SetType();
3263:                 initType(result, location);
3264:
3265:                 result.setSetof(AstFactory.newAUnknownType(location));
3266:                 result.setEmpty(true);
3267:
3268:                 return result;
3269:         }
3270:
3271:         public static ASeqSeqType newASeqSeqType(ILexLocation location)
3272:         {
3273:                 ASeqSeqType result = new ASeqSeqType();
3274:                 initType(result, location);
3275:                 result.setSeqof(AstFactory.newAUnknownType(location));
3276:                 result.setEmpty(true);
3277:
3278:                 return result;
3279:         }
3280:
3281:         public static ARecordInvariantType newARecordInvariantType(
3282:                         ILexLocation location, List<AFieldField> fields)
3283:         {
3284:                 ARecordInvariantType result = new ARecordInvariantType();
3285:                 initType(result, location);
3286:
3287:                 result.setName(new LexNameToken("?", "?", location));
3288:                 result.setFields(fields);
3289:
3290:                 return result;
3291:         }
3292:
3293:         public static AExternalDefinition newAExternalDefinition(PDefinition state,
3294:                         ILexToken mode)
3295:         {
3296:                 AExternalDefinition result = new AExternalDefinition();
3297:                 initDefinition(result, Pass.DEFS, state.getLocation(), state.getName(), NameScope.STATE);
3298:
3299:                 result.setState(state);
3300:                 result.setReadOnly(mode.is(VDMToken.READ));
3301:•                result.setOldname(result.getReadOnly() ? null
3302:                                 : state.getName().getOldName());
3303:
3304:                 return result;
3305:         }
3306:
3307:         public static AMultiBindListDefinition newAMultiBindListDefinition(
3308:                         ILexLocation location, List<PMultipleBind> bindings)
3309:         {
3310:                 AMultiBindListDefinition result = new AMultiBindListDefinition();
3311:                 initDefinition(result, Pass.DEFS, location, null, null);
3312:                 result.setBindings(bindings);
3313:                 return result;
3314:         }
3315:
3316:         public static AUndefinedType newAUndefinedType(ILexLocation location)
3317:         {
3318:                 AUndefinedType result = new AUndefinedType();
3319:                 initType(result, location);
3320:                 return result;
3321:         }
3322:
3323:         public static AVoidReturnType newAVoidReturnType(ILexLocation location)
3324:         {
3325:                 AVoidReturnType result = new AVoidReturnType();
3326:                 initType(result, location);
3327:                 return result;
3328:         }
3329:
3330:         public static AUnaryPlusUnaryExp newAUnaryPlusUnaryExp(
3331:                         ILexLocation location, PExp exp)
3332:         {
3333:                 AUnaryPlusUnaryExp result = new AUnaryPlusUnaryExp();
3334:                 initExpressionUnary(result, location, exp);
3335:                 return result;
3336:         }
3337:
3338:         public static AUnaryMinusUnaryExp newAUnaryMinusUnaryExp(
3339:                         ILexLocation location, PExp exp)
3340:         {
3341:                 AUnaryMinusUnaryExp result = new AUnaryMinusUnaryExp();
3342:                 initExpressionUnary(result, location, exp);
3343:                 return result;
3344:         }
3345:
3346:         public static ACardinalityUnaryExp newACardinalityUnaryExp(
3347:                         ILexLocation location, PExp exp)
3348:         {
3349:                 ACardinalityUnaryExp result = new ACardinalityUnaryExp();
3350:                 initExpressionUnary(result, location, exp);
3351:                 return result;
3352:         }
3353:
3354:         public static AMapDomainUnaryExp newAMapDomainUnaryExp(
3355:                         ILexLocation location, PExp exp)
3356:         {
3357:                 AMapDomainUnaryExp result = new AMapDomainUnaryExp();
3358:                 initExpressionUnary(result, location, exp);
3359:                 return result;
3360:         }
3361:
3362:         public static ALenUnaryExp newALenUnaryExp(ILexLocation location, PExp exp)
3363:         {
3364:                 ALenUnaryExp result = new ALenUnaryExp();
3365:                 initExpressionUnary(result, location, exp);
3366:                 return result;
3367:         }
3368:
3369:         public static APowerSetUnaryExp newAPowerSetUnaryExp(ILexLocation location,
3370:                         PExp exp)
3371:         {
3372:                 APowerSetUnaryExp result = new APowerSetUnaryExp();
3373:                 initExpressionUnary(result, location, exp);
3374:                 return result;
3375:         }
3376:
3377:         public static AMapRangeUnaryExp newAMapRangeUnaryExp(ILexLocation location,
3378:                         PExp exp)
3379:         {
3380:                 AMapRangeUnaryExp result = new AMapRangeUnaryExp();
3381:                 initExpressionUnary(result, location, exp);
3382:                 return result;
3383:         }
3384:
3385:         public static AElementsUnaryExp newAElementsUnaryExp(ILexLocation location,
3386:                         PExp exp)
3387:         {
3388:                 AElementsUnaryExp result = new AElementsUnaryExp();
3389:                 initExpressionUnary(result, location, exp);
3390:                 return result;
3391:         }
3392:
3393:         public static AAbsoluteUnaryExp newAAbsoluteUnaryExp(ILexLocation location,
3394:                         PExp exp)
3395:         {
3396:                 AAbsoluteUnaryExp result = new AAbsoluteUnaryExp();
3397:                 initExpressionUnary(result, location, exp);
3398:                 return result;
3399:         }
3400:
3401:         public static AAnnotatedUnaryExp newAAnnotatedUnaryExp(ILexLocation location,
3402:                         PAnnotation annotation, PExp exp)
3403:         {
3404:                 AAnnotatedUnaryExp result = new AAnnotatedUnaryExp();
3405:                 initExpressionUnary(result, location, exp);
3406:                 result.setAnnotation(annotation);
3407:                 return result;
3408:         }
3409:
3410:         public static ADistIntersectUnaryExp newADistIntersectUnaryExp(
3411:                         ILexLocation location, PExp exp)
3412:         {
3413:                 ADistIntersectUnaryExp result = new ADistIntersectUnaryExp();
3414:                 initExpressionUnary(result, location, exp);
3415:                 return result;
3416:         }
3417:
3418:         public static ADistMergeUnaryExp newADistMergeUnaryExp(
3419:                         ILexLocation location, PExp exp)
3420:         {
3421:                 ADistMergeUnaryExp result = new ADistMergeUnaryExp();
3422:                 initExpressionUnary(result, location, exp);
3423:                 return result;
3424:         }
3425:
3426:         public static AHeadUnaryExp newAHeadUnaryExp(ILexLocation location, PExp exp)
3427:         {
3428:                 AHeadUnaryExp result = new AHeadUnaryExp();
3429:                 initExpressionUnary(result, location, exp);
3430:                 return result;
3431:         }
3432:
3433:         public static ATailUnaryExp newATailUnaryExp(ILexLocation location, PExp exp)
3434:         {
3435:                 ATailUnaryExp result = new ATailUnaryExp();
3436:                 initExpressionUnary(result, location, exp);
3437:                 return result;
3438:         }
3439:
3440:         public static AReverseUnaryExp newAReverseUnaryExp(ILexLocation location,
3441:                         PExp exp)
3442:         {
3443:                 AReverseUnaryExp result = new AReverseUnaryExp();
3444:                 initExpressionUnary(result, location, exp);
3445:                 return result;
3446:         }
3447:
3448:         public static AFloorUnaryExp newAFloorUnaryExp(ILexLocation location,
3449:                         PExp exp)
3450:         {
3451:                 AFloorUnaryExp result = new AFloorUnaryExp();
3452:                 initExpressionUnary(result, location, exp);
3453:                 return result;
3454:         }
3455:
3456:         public static ADistUnionUnaryExp newADistUnionUnaryExp(
3457:                         ILexLocation location, PExp exp)
3458:         {
3459:                 ADistUnionUnaryExp result = new ADistUnionUnaryExp();
3460:                 initExpressionUnary(result, location, exp);
3461:                 return result;
3462:         }
3463:
3464:         public static ADistConcatUnaryExp newADistConcatUnaryExp(
3465:                         ILexLocation location, PExp exp)
3466:         {
3467:                 ADistConcatUnaryExp result = new ADistConcatUnaryExp();
3468:                 initExpressionUnary(result, location, exp);
3469:                 return result;
3470:         }
3471:
3472:         public static AIndicesUnaryExp newAIndicesUnaryExp(ILexLocation location,
3473:                         PExp exp)
3474:         {
3475:                 AIndicesUnaryExp result = new AIndicesUnaryExp();
3476:                 initExpressionUnary(result, location, exp);
3477:                 return result;
3478:         }
3479:
3480:         public static ASetEnumSetExp newASetEnumSetExp(ILexLocation start,
3481:                         List<PExp> members)
3482:         {
3483:                 ASetEnumSetExp result = new ASetEnumSetExp();
3484:                 initExpression(result, start);
3485:                 result.setMembers(members);
3486:
3487:                 return result;
3488:         }
3489:
3490:         public static AIdentifierStateDesignator newAIdentifierStateDesignator(
3491:                         ILexNameToken name)
3492:         {
3493:                 AIdentifierStateDesignator result = new AIdentifierStateDesignator();
3494:                 initStateDesignator(result, name.getLocation());
3495:                 result.setName(name);
3496:                 return result;
3497:         }
3498:
3499:         public static AErrorStm newAErrorStm(ILexLocation location)
3500:         {
3501:                 AErrorStm result = new AErrorStm();
3502:                 initStatement(result, location);
3503:                 return result;
3504:         }
3505:
3506:         public static ASkipStm newASkipStm(ILexLocation location)
3507:         {
3508:                 ASkipStm result = new ASkipStm();
3509:                 initStatement(result, location);
3510:                 return result;
3511:         }
3512:
3513:         public static ATixeStmtAlternative newATixeStmtAlternative(
3514:                         ADefPatternBind patternBind, PStm resultStm)
3515:         {
3516:                 ATixeStmtAlternative result = new ATixeStmtAlternative();
3517:                 result.setPatternBind(patternBind);
3518:                 result.setStatement(resultStm);
3519:                 return result;
3520:         }
3521:
3522:         public static APostOpExp newAPostOpExp(ILexNameToken opname,
3523:                         PExp preexpression, PExp postexpression, List<AErrorCase> errors,
3524:                         AStateDefinition state)
3525:         {
3526:                 APostOpExp result = new APostOpExp();
3527:                 initExpression(result, postexpression.getLocation());
3528:
3529:                 result.setOpname(opname);
3530:                 result.setPreexpression(preexpression);
3531:                 result.setPostexpression(postexpression);
3532:                 result.setErrors(errors);
3533:                 result.setState(state);
3534:
3535:                 return result;
3536:         }
3537:
3538:         public static APreOpExp newAPreOpExp(ILexNameToken opname, PExp expression,
3539:                         List<AErrorCase> errors, AStateDefinition state)
3540:         {
3541:                 APreOpExp result = new APreOpExp();
3542:                 initExpression(result, expression);
3543:
3544:                 result.setOpname(opname);
3545:                 result.setExpression(expression);
3546:                 result.setErrors(errors);
3547:                 result.setState(state);
3548:
3549:                 return result;
3550:         }
3551:
3552:         public static AUnionType newAUnionType(ILexLocation location,
3553:                         List<? extends PType> types)
3554:         {
3555:                 AUnionType result = new AUnionType();
3556:                 initType(result, location);
3557:                 initUnionType(result);
3558:
3559:                 result.setTypes(types);
3560:                 af.createAUnionTypeAssistant().expand(result);
3561:                 return result;
3562:         }
3563:
3564:         public static AStateInitExp newAStateInitExp(AStateDefinition state)
3565:         {
3566:                 AStateInitExp result = new AStateInitExp();
3567:                 initExpression(result, state.getInitExpression().getLocation());
3568:                 result.setState(state);
3569:                 result.getLocation().executable(false);
3570:                 return result;
3571:         }
3572:
3573:         public static AMapletPatternMaplet newAMapletPatternMaplet(PPattern from,
3574:                         PPattern to)
3575:         {
3576:                 AMapletPatternMaplet result = new AMapletPatternMaplet();
3577:
3578:                 result.setResolved(false);
3579:                 result.setFrom(from);
3580:                 result.setTo(to);
3581:
3582:                 return result;
3583:         }
3584:
3585:         public static AMapPattern newAMapPattern(ILexLocation location,
3586:                         List<AMapletPatternMaplet> maplets)
3587:         {
3588:                 AMapPattern result = new AMapPattern();
3589:                 initPattern(result, location);
3590:                 result.setMaplets(maplets);
3591:                 return result;
3592:         }
3593:
3594:         public static AMapUnionPattern newAMapUnionPattern(PPattern left,
3595:                         ILexLocation location, PPattern right)
3596:         {
3597:                 AMapUnionPattern result = new AMapUnionPattern();
3598:                 initPattern(result, location);
3599:                 result.setLeft(left);
3600:                 result.setRight(right);
3601:                 return result;
3602:         }
3603:
3604:         public static AModuleModules newAModuleModules()
3605:         {
3606:                 return newAModuleModules(null, new Vector<PDefinition>());
3607:         }
3608:
3609:         public static ANarrowExp newANarrowExpression(ILexLocation location,
3610:                         ILexNameToken name, PExp test)
3611:         {
3612:
3613:                 ANarrowExp result = new ANarrowExp();
3614:
3615:                 initExpression(result, location);
3616:
3617:                 result.setLocation(location);
3618:                 result.setTypeName(name);
3619:                 result.setTest(test);
3620:
3621:                 return result;
3622:         }
3623:
3624:         public static ANarrowExp newANarrowExpression(ILexLocation location,
3625:                         PType type, PExp test)
3626:         {
3627:
3628:                 ANarrowExp result = new ANarrowExp();
3629:
3630:                 initExpression(result, location);
3631:
3632:                 result.setLocation(location);
3633:                 result.setTypeName(null);
3634:                 result.setBasicType(type);
3635:                 result.setTest(test);
3636:
3637:                 return result;
3638:         }
3639:
3640:         public static ATraceDefinitionTerm newATraceDefinitionTerm(
3641:                         List<PTraceDefinition> term)
3642:         {
3643:                 ATraceDefinitionTerm result = new ATraceDefinitionTerm();
3644:                 result.setList(term);
3645:                 return result;
3646:         }
3647:
3648:         // public static AIsExp newAIsExp(ILexLocation location,
3649:         // LexNameToken name, PExp test) {
3650:         // AIsExp result = new AIsExp();
3651:         // initExpression(result, location);
3652:         //
3653:         //
3654:         // result.setBasicType(null);
3655:         // result.setTypeName(name);
3656:         // result.setTest(test);
3657:         //
3658:         // return result;
3659:         // }
3660:         //
3661:         // public static AIsExp newAIsExp(ILexLocation location, PType type, PExp
3662:         // test) {
3663:         // AIsExp result = new AIsExp();
3664:         // initExpression(result, location);
3665:         //
3666:         //
3667:         // result.setBasicType(type);
3668:         // result.setTypeName(null);
3669:         // result.setTest(test);
3670:         //
3671:         // return result;
3672:         // }
3673:
3674:         // public static PExp newAApplyExp(PExp root, List<PExp> args) {
3675:         // AApplyExp result = new AApplyExp();
3676:         // result.setLocation(root.getLocation());
3677:         // result.setRoot(root);
3678:         // result.setArgs(args);
3679:         // return result;
3680:         // }
3681:
3682: }