public final class TheorySymbol extends GlobalSymbolBase
Constructor and Description |
---|
TheorySymbol(ClassSymbol csymbol)
Construct theory symbol for class theory for later processing
(no declaration is provided yet).
|
TheorySymbol(ClassSymbol csymbol,
Identifier name,
TheoryDeclaration decl,
ErrorStream error)
Construct local theory symbol from declaration.
|
TheorySymbol(PackageSymbol psymbol,
Identifier name,
TheoryDeclaration decl,
ErrorStream error)
Construct theory symbol from declaration.
|
TheorySymbol(PackageSymbol psymbol,
Identifier name,
TheoryReader reader)
Construct theory symbol from reader.
|
Modifier and Type | Method and Description |
---|---|
static void |
add(java.util.Collection<TheorySymbol> symbols,
java.util.Collection<TheorySymbol> symbols0)
Add symbols to collection of symbols (if it is not there).
|
static void |
add(java.util.Collection<TheorySymbol> symbols,
TheorySymbol symbol)
Add symbol to collection of symbols (if it is not there).
|
ClassSymbol |
getClassSymbol()
Returns class from which theory is derived (if any).
|
TheoryDeclaration |
getDeclaration()
Get the declaration of the theory.
|
SymbolTable<FormulaSymbol> |
getFormulas()
Get set of formulas of this class.
|
TaskFolder |
getFormulaTasks()
Get the formula tasks.
|
ClassSymbol |
getHostClass()
Get the class for which this theory is local.
|
LogicTypeTable |
getLogicTypeTable()
Get type table of class.
|
PackageSymbol |
getPackage()
Get package of theory.
|
java.util.Collection<Symbol> |
getReferencedUnits()
Get symbols of units referenced by this unit.
|
Source |
getSource()
Get source of theory (respectively of associated class).
|
TaskFolder |
getTCCs()
Get the type checking conditions.
|
SymbolTable<TypeSymbol> |
getTypes()
Get set of types of this theory.
|
TypeTable |
getTypeTable()
Get type table of theory.
|
SymbolTable<ValueSymbol> |
getValues()
Get set of values of this theory.
|
boolean |
hasErrors()
Show whether class has errors.
|
boolean |
isFromClass()
Returns true if theory is derived from class.
|
boolean |
isRead()
Returns true if theory has been read, i.e.
|
void |
print(java.io.PrintWriter out)
Print symbol on output stream.
|
boolean |
read(ErrorStream error)
Update declaration from reader or derive it from class symbol.
|
void |
reset()
Reset symbol.
|
void |
setDeclaration(TheoryDeclaration decl,
ErrorStream error)
Set and process new theory declaration
|
void |
setErrors(boolean status)
Set error status.
|
getLongName
getName
public TheorySymbol(PackageSymbol psymbol, Identifier name, TheoryReader reader)
psymbol
- the symbol of the package holding the theory.name
- the name of the theory.reader
- the reader for getting the declaration.public TheorySymbol(ClassSymbol csymbol)
csymbol
- the symbol of the class.public TheorySymbol(PackageSymbol psymbol, Identifier name, TheoryDeclaration decl, ErrorStream error)
psymbol
- the symbol of the package holding the theory.name
- the name of the theory.decl
- the theory declaration.error
- the error stream to print messages topublic TheorySymbol(ClassSymbol csymbol, Identifier name, TheoryDeclaration decl, ErrorStream error)
csymbol
- the symbol of the class holding the theory.name
- the name of the theory.decl
- the theory declaration.error
- the error stream to print messages topublic PackageSymbol getPackage()
public Source getSource()
public TypeTable getTypeTable()
public boolean isRead()
public boolean isFromClass()
public ClassSymbol getClassSymbol()
public boolean read(ErrorStream error)
error
- the error stream on which to print any messages.public void setDeclaration(TheoryDeclaration decl, ErrorStream error)
decl
- the new theory declaration (updating any previous one)error
- the error stream on which to print any messages.public boolean hasErrors()
public void setErrors(boolean status)
status
- true iff errors, false otherwise.public void reset()
public TheoryDeclaration getDeclaration()
getDeclaration
in interface Symbol
getDeclaration
in class SymbolBase
public SymbolTable<TypeSymbol> getTypes()
public SymbolTable<ValueSymbol> getValues()
public SymbolTable<FormulaSymbol> getFormulas()
public LogicTypeTable getLogicTypeTable()
public void print(java.io.PrintWriter out)
out
- the output stream.public TaskFolder getTCCs()
public TaskFolder getFormulaTasks()
public java.util.Collection<Symbol> getReferencedUnits()
public static void add(java.util.Collection<TheorySymbol> symbols, TheorySymbol symbol)
symbols
- the symbol collection to which to add.symbol
- the symbol to be added.public static void add(java.util.Collection<TheorySymbol> symbols, java.util.Collection<TheorySymbol> symbols0)
symbols
- the symbol collection to which to add.symbols0
- the symbols to be added.public ClassSymbol getHostClass()