public class Context
extends java.lang.Object
| Constructor and Description |
|---|
Context()
Constructs a new sort ordering context.
|
Context(int sortCodeArraySize)
Constructs a new sort ordering context with the specified sort code array size.
|
Context(int sortCodeArraySize,
float namedSortTableFactor,
float cachCodeTableFactor)
Constructs a new sort ordering context with the specified sort code
array size, the named sort table's size factor, and the code
cache's size.
|
| Modifier and Type | Method and Description |
|---|---|
static byte |
AND() |
static byte |
BNT() |
static Sort |
bottom()
Returns the bottom sort symbol.
|
java.util.HashMap |
codeCache()
Returns this OSF context's table associating a bit code to the sort
it denotes if there is one, or the set of sorts that are its
maximal lower bounds as an array or sorts.
|
void |
declareIsa(java.lang.String s1,
java.lang.String s2,
Locatable where)
This declares that the sort named s1 is a subsort of the
sort named s2.
|
java.lang.Object |
decode(BitCode code)
Given a bit code, this returns the object that it corresponds to in
the current taxonomy.
|
java.lang.String |
decodedString(BitCode code)
This returns a string form of the sorts whose codes are maximal
lower bounds of the specified code.
|
static byte |
DIS() |
DisplayManager |
displayManager() |
void |
encodeSorts()
Encodes all the sorts of this sort ordering context's taxonomy.
|
void |
encodeSorts(int first,
int last)
Encodes the sorts between index first and index last (both
inclusive) of this sort ordering context's taxonomy.
|
ErrorLogger |
errorLogger() |
BitCode |
evaluate(SortExpression expression)
Compiles and evaluates the specified sort expression.
|
Sort |
getSort(java.lang.String sortName)
If the specified name is an undefined sort, this defines the sort
with this name initializing it in the sort array.
|
BitCode |
getSortCode(java.lang.String name)
This returns the bit code of the sort bearing the specified name.
|
static boolean |
isTracing() |
SortExpression |
lastExpression()
Returns the last sort expression evaluated in this context.
|
java.util.HashMap |
namedSorts()
Returns this OSF context's table associating a name to the sort it denotes.
|
static byte |
NOT() |
static byte |
OR() |
void |
reset()
Resets this sort ordering context to a "virginal" state, preserving
only built-in sorts.
|
void |
setDisplayManager(DisplayManager displayManager) |
static byte |
SYM() |
static void |
tallyCodeCopy() |
Taxonomy |
taxonomy()
Returns this OSF context's array where sorts are recorded.
|
static void |
toggleTracing() |
static Sort |
top()
Returns the top sort symbol.
|
public Context()
public Context(int sortCodeArraySize)
public Context(int sortCodeArraySize,
float namedSortTableFactor,
float cachCodeTableFactor)
public Taxonomy taxonomy()
public ErrorLogger errorLogger()
public static Sort top() throws LockedCodeArrayException
LockedCodeArrayExceptionpublic static Sort bottom() throws LockedCodeArrayException
LockedCodeArrayExceptionpublic void reset()
public java.util.HashMap namedSorts()
public java.util.HashMap codeCache()
public Sort getSort(java.lang.String sortName) throws UndefinedSymbolException
UndefinedSymbolExceptionpublic BitCode getSortCode(java.lang.String name) throws LockedCodeArrayException, UndefinedSymbolException
public java.lang.String decodedString(BitCode code)
public java.lang.Object decode(BitCode code)
public void declareIsa(java.lang.String s1,
java.lang.String s2,
Locatable where)
throws LockedCodeArrayException,
CyclicSortOrderingException
public void encodeSorts()
throws AnomalousSituationException
AnomalousSituationExceptionpublic void encodeSorts(int first,
int last)
throws AnomalousSituationException
AnomalousSituationExceptionpublic DisplayManager displayManager()
public void setDisplayManager(DisplayManager displayManager)
public static final byte SYM()
public static final byte DIS()
public static final byte NOT()
public static final byte AND()
public static final byte OR()
public static final byte BNT()
public SortExpression lastExpression() throws LockedCodeArrayException, AnomalousSituationException
public BitCode evaluate(SortExpression expression) throws LockedCodeArrayException
LockedCodeArrayExceptionpublic static void toggleTracing()
public static boolean isTracing()
public static void tallyCodeCopy()