|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.bbk.dcs.automed.qproc.iql.Cell
public class Cell
Every node in an ASG is a Cell, so one has to use this class in order to perform any operations on an ASG
Field Summary | |
---|---|
static int |
ANNOTATION_COMP_ARG
|
static int |
ANNOTATION_COMP_ROOT
|
static int |
ANNOTATION_OPT_DO_NOT_UNNEST
|
static int |
ANNOTATION_OTHER
|
static int |
apply
|
static int |
constructor
|
static int |
copyGraphCalls
|
static long |
copyOfGraphTimeSpent
|
static int |
dateTimeType
|
static int |
EVALUATION_STATE_EVALUATED
|
static int |
EVALUATION_STATE_UNKNOWN
|
static int |
EVALUATION_STATE_WHNF
|
static int |
floatType
|
static int |
function
|
static int |
intType
|
static int |
lambda
|
protected java.util.logging.Logger |
logger
|
static int |
scheme
|
static int |
special
|
static int |
stringType
|
static int |
sysConstructor
|
static int |
sysvariable
|
static int |
variable
|
Constructor Summary | |
---|---|
Cell(int snum,
double f)
|
|
Cell(int snum,
int i)
|
|
Cell(int snum,
java.lang.Object sdata)
|
|
Cell(int snum,
java.lang.Object lRef,
java.lang.Object rRef)
|
|
Cell(int snum,
java.lang.Object lRef,
java.lang.Object rRef,
java.lang.Object sdata)
|
|
Cell(java.lang.Object lRef,
java.lang.Object rRef)
|
|
Cell(java.lang.String sdata)
|
Method Summary | |
---|---|
void |
annotate(Cell c,
boolean inComp)
|
Cell |
bsingleton()
Returns the root of an ASG representing an empty bag |
Cell |
copyOfGraph()
Returns an exact copy of the ASG |
java.lang.Object |
data()
Returns the Object contained in the Cell |
boolean |
equals(java.lang.Object o)
|
void |
finalize()
|
int |
getAnnotation()
|
static long |
getCreated()
|
java.lang.String |
getDate()
|
java.lang.String |
getDateTime()
|
java.lang.String |
getDay()
|
static long |
getDestroyed()
|
int |
getEvaluationState()
|
double |
getFloat()
|
java.lang.String |
getHours()
|
java.lang.String |
getID()
|
int |
getInt()
|
PersistentKey |
getKey()
|
java.lang.String |
getMinutes()
|
java.lang.String |
getMonth()
|
int |
getOptimisationAnnotation()
|
java.util.Map |
getPersistentAttributes()
|
java.lang.String |
getSeconds()
|
java.lang.String |
getTime()
|
java.lang.String |
getYear()
|
boolean |
isApply()
Returns true if tag is apply |
boolean |
isBConsConstructor()
Returns true if tag is "BCons" |
boolean |
isBNilConstructor()
Returns true if tag is "BNil" |
boolean |
isCollectionConstructor()
Returns true if tag is "Cons", "BCons" or "SCons" |
boolean |
isCollectionNilConstructor()
Returns true if tag is "Nil" |
boolean |
isConsConstructor()
|
boolean |
isConstant()
Returns true if tag is constant |
boolean |
isConstructor()
Returns true if tag is constructor |
boolean |
isConstructor(java.lang.String s)
|
boolean |
isConstructorOrSysConstructor()
Returns true if tag is constructor or system constructor |
boolean |
isDateTime()
|
boolean |
isFloat()
|
boolean |
isFunction()
Returns true if tag is function |
boolean |
isInteger()
|
boolean |
isLambda()
Returns true if tag is lambda |
boolean |
isNilConstructor()
Returns true if tag is "Nil" |
boolean |
isNum()
Deprecated. use isNumberType() instead |
boolean |
isNumberType()
|
boolean |
isScheme()
Returns true if tag is scheme |
boolean |
isSConsConstructor()
Returns true if tag is "SCons" |
boolean |
isSNilConstructor()
Returns true if tag is "SNil" |
boolean |
isSpecial()
Returns true if tag is special |
boolean |
isSpecial(java.lang.String s)
|
boolean |
isString()
|
boolean |
isSysConstructor()
Returns true if tag is system constructor |
boolean |
isSysConstructor(java.lang.String s)
|
boolean |
isSysVariable()
Returns true if tag is sysvariable |
boolean |
isVariable()
Returns true if tag is variable |
boolean |
isVarOrSysVar()
Returns true if tag is variable or sysvariable |
Cell |
l()
Returns a reference to the left child of the Cell |
void |
mimicThisCell(Cell n)
Copies content of all fields of input Cell to current Cell. |
Cell |
r()
Returns a reference to the right child of the Cell |
boolean |
representsBag()
Returns true if the Cell is the root of an ASG representing a bag |
boolean |
representsBagComprehension()
|
boolean |
representsBSingleton()
|
boolean |
representsCollection()
Returns true if the Cell is the root of an ASG representing a collection |
boolean |
representsCollectionSingleton()
|
boolean |
representsComprehension()
|
boolean |
representsConstructor()
|
boolean |
representsConstructor(java.lang.String s)
|
boolean |
representsFunction()
|
boolean |
representsFunction(java.lang.String function,
int argNum)
|
boolean |
representsGenerator()
Returns true if the Cell is the root of an ASG representing a generator |
boolean |
representsLambdaExpression()
|
boolean |
representsLet()
|
boolean |
representsList()
Returns true if the Cell is the root of an ASG representing a list |
boolean |
representsListComprehension()
|
boolean |
representsLSingleton()
|
boolean |
representsNestedComprehension()
|
boolean |
representsPair()
Returns true if tag is "Tuple2" |
boolean |
representsSet()
Returns true if the Cell is the root of an ASG representing a set |
boolean |
representsSetComprehension()
|
boolean |
representsSpecial()
|
boolean |
representsSpecial(java.lang.String function,
int argNum)
|
boolean |
representsSSingleton()
|
int |
representsTuple()
Returns the arity of the tuple, or -1 if Cell does not represent a tuple |
void |
set_l(Cell n)
Sets the reference to the left child of the Cell to n |
void |
set_r(Cell n)
Sets the reference to the left child of the Cell to n |
void |
setAnnotation(int annotation)
|
void |
setData(java.lang.Object newData)
Sets the Cell's data |
void |
setDateTime(java.lang.String s)
|
void |
setEvaluationState(int evaluation_state)
|
void |
setFloat(double f)
|
void |
setFloat(float f)
|
void |
setInt(int i)
|
void |
setOptimisationAnnotation(int optimisation_annotation)
|
void |
setTag(int i)
|
Cell |
singleton()
Returns the root of an ASG representing an empty list |
Cell |
ssingleton()
Returns the root of an ASG representing an empty set |
int |
tag()
Returns the Cell's tag |
java.lang.String |
text()
Returns the string representation of the object contained in the Cell |
java.lang.String |
textOBID()
|
java.lang.String |
toString()
|
Cell |
toStringType()
|
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient java.util.logging.Logger logger
public static final int apply
public static final int lambda
public static final int scheme
public static final int constructor
public static final int variable
public static final int function
public static final int special
public static final int sysvariable
public static final int intType
public static final int floatType
public static final int stringType
public static final int dateTimeType
public static final int sysConstructor
public static final int ANNOTATION_COMP_ROOT
public static final int ANNOTATION_COMP_ARG
public static final int ANNOTATION_OTHER
public static final int ANNOTATION_OPT_DO_NOT_UNNEST
public static final int EVALUATION_STATE_UNKNOWN
public static final int EVALUATION_STATE_WHNF
public static final int EVALUATION_STATE_EVALUATED
public static int copyGraphCalls
public static long copyOfGraphTimeSpent
Constructor Detail |
---|
public Cell(int snum, java.lang.Object lRef, java.lang.Object rRef, java.lang.Object sdata)
snum
- designates the type of the Cell. Possible values: apply, lambda, constant, scheme, constructor, variable,
function, special, sysvariablelRef
- reference to the Cell's left childrRef
- reference to the Cell's right childsdata
- value of sdata depends on snum. Possible values: apply:null, lambda:lambda, constant:(integer, String, ...),
scheme:(String), constructor:(String, for example Cons, Tuple2, ...), variable:(String, e.g. x, y, ...),
function:(function name), special:Let, sysvariable:(wrapper object)public Cell(int snum, java.lang.Object lRef, java.lang.Object rRef)
public Cell(int snum, java.lang.Object sdata)
public Cell(int snum, int i)
public Cell(int snum, double f)
public Cell(java.lang.Object lRef, java.lang.Object rRef)
public Cell(java.lang.String sdata)
Method Detail |
---|
public void finalize()
finalize
in class java.lang.Object
public java.lang.String text()
public java.lang.String textOBID()
public java.lang.Object data()
public void setInt(int i)
public void setFloat(float f)
public void setFloat(double f)
public void setDateTime(java.lang.String s)
public int getInt()
public double getFloat()
public java.lang.String getDateTime() throws TypeException
TypeException
public java.lang.String getDate() throws TypeException
TypeException
public java.lang.String getYear() throws TypeException
TypeException
public java.lang.String getMonth() throws TypeException
TypeException
public java.lang.String getDay() throws TypeException
TypeException
public java.lang.String getTime() throws TypeException
TypeException
public java.lang.String getHours() throws TypeException
TypeException
public java.lang.String getMinutes() throws TypeException
TypeException
public java.lang.String getSeconds() throws TypeException
TypeException
public boolean isNum()
public boolean isNumberType()
public int tag()
public Cell l()
public Cell r()
public void set_l(Cell n)
public void set_r(Cell n)
public void setData(java.lang.Object newData)
public void setTag(int i)
public void mimicThisCell(Cell n)
public Cell copyOfGraph()
public Cell singleton()
public Cell bsingleton()
public Cell ssingleton()
public boolean isApply()
public boolean isConstructor(java.lang.String s)
s
-
public boolean isSysConstructor(java.lang.String s)
s
-
public boolean isLambda()
public boolean isConstant()
public boolean isFloat()
public boolean isInteger()
public boolean isString()
public boolean isDateTime()
public boolean isScheme()
public boolean isConstructor()
public boolean isSysConstructor()
public boolean isConstructorOrSysConstructor()
public boolean isVariable()
public boolean isSpecial()
public boolean isSpecial(java.lang.String s)
public boolean isFunction()
public boolean isSysVariable()
public boolean isVarOrSysVar()
public boolean isCollectionNilConstructor()
public boolean isNilConstructor()
public boolean isBNilConstructor()
public boolean isSNilConstructor()
public boolean isCollectionConstructor()
public boolean isConsConstructor()
public boolean isBConsConstructor()
public boolean isSConsConstructor()
public boolean representsConstructor()
public boolean representsConstructor(java.lang.String s)
public boolean representsComprehension()
public boolean representsSetComprehension()
public boolean representsListComprehension()
public boolean representsBagComprehension()
public boolean representsLet()
public boolean representsLambdaExpression()
public boolean representsGenerator()
public boolean representsPair()
public int representsTuple()
public boolean representsCollection()
public boolean representsList()
public boolean representsBag()
public boolean representsSet()
public boolean representsCollectionSingleton()
public boolean representsLSingleton()
public boolean representsBSingleton()
public boolean representsSSingleton()
public void setAnnotation(int annotation) throws QProcException
annotation
- sets the annotation for this cell
java.lang.Exception
QProcException
public int getAnnotation()
QProcException
public void setOptimisationAnnotation(int optimisation_annotation) throws QProcException
optimisation_annotation
- sets the optimisation annotation for this cell
java.lang.Exception
QProcException
public int getOptimisationAnnotation()
QProcException
public void setEvaluationState(int evaluation_state) throws QProcException
QProcException
public int getEvaluationState()
public boolean representsSpecial()
public boolean representsSpecial(java.lang.String function, int argNum)
public boolean representsFunction(java.lang.String function, int argNum)
function
- the textual representation of a function name, such as (++), (--), "member", ect.
public boolean representsFunction()
public boolean representsNestedComprehension() throws QProcException
QProcException
- thrown if the Cell is not actually the root of a comprehensionpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public Cell toStringType() throws QProcException
QProcException
public void annotate(Cell c, boolean inComp) throws QProcException
c
- inComp
- true if we are within a comprehension, false otherwise.
QProcException
public java.lang.String getID()
public PersistentKey getKey()
getKey
in interface PersistentObject
public java.util.Map getPersistentAttributes()
getPersistentAttributes
in interface PersistentObject
public static long getCreated()
public static long getDestroyed()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |