|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cve.Context
A context is a tuple of variables and their values.
Field Summary | |
private int[] |
contextVals
|
private Variable[] |
contextVars
|
Constructor Summary | |
(package private) |
Context()
constructs the empty context. |
(package private) |
Context(Context oldcon,
Variable var,
int val)
constructs a new context that is oldcon together with var=val. |
(package private) |
Context(Variable[] vars,
int[] vals)
constructs a new context with variables vars and values vals. |
(package private) |
Context(Variable[] vars,
int[] vals,
int len)
constructs a new context with variables vars and values vals, given that len is the number of observed variables. |
Method Summary | |
boolean |
compatible(Context c1)
is true if this context is compatible with c1. |
int[] |
getVals()
returns the array of values for the context. |
Variable[] |
getVars()
returns the array of variables for the context. |
boolean |
involves(Variable var)
is true if this context involves variable var. |
int |
lookup(Variable var)
returns the value of variable var. |
void |
print()
|
Context |
remove(Variable var)
returns a new context with var removed. |
Context |
union(Context c1)
returns the union of this context and c1. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Variable[] contextVars
private int[] contextVals
Constructor Detail |
Context(Variable[] vars, int[] vals)
vars
- the array of variables for the new contextvals
- the array of values for the new contextContext(Variable[] vars, int[] vals, int len)
vars
- the array containing variables for the new contextvals
- the array containing values for the new contextint
- the numner of variables in the contextContext()
Context(Context oldcon, Variable var, int val)
oldcon
- the context being expandedvar
- a variable that doesn't appear in oldconval
- a value in the domain of varMethod Detail |
public Variable[] getVars()
public int[] getVals()
public boolean compatible(Context c1)
c1
- a context to compare this one to.public Context union(Context c1)
c1
- a context to compare this one to.public boolean involves(Variable var)
public int lookup(Variable var)
public Context remove(Variable var)
public void print()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |