|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.score.dependence.omega.omegaLib.Formula scale.score.dependence.omega.omegaLib.RelBody
public final class RelBody
RelBody.
$Id: RelBody.java,v 1.22 2007-10-31 04:28:28 asmith Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
This version of the Omega Libray is a translation from C++ to Java of the Omega Library developed at the University of Maryland.
Copyright (C) 1994-1996 by the Omega ProjectAll rights reserved.
NOTICE: This software is provided ``as is'', without any warranty, including any implied warranty for merchantability or fitness for a particular purpose. Under no circumstances shall the Omega Project or its agents be liable for any use of, misuse of, or inability to use this software, including incidental and consequential damages.
License is hereby given to use, modify, and redistribute this software, in whole or in part, for any purpose, commercial or non-commercial, provided that the user agrees to the terms of this copyright notice, including disclaimer of warranty, and provided that this copyright notice, including disclaimer of warranty, is preserved in the source code and documentation of anything derived from this software. Any redistributor of this software or anything derived from this software assumes responsibility for ensuring that any parties to whom such a redistribution is made are fully aware of the terms of this license and disclaimer.
The Omega project can be contacted at omega@cs.umd.edu or http://www.cs.umd.edu/projects/omega
Field Summary |
---|
Fields inherited from class scale.score.dependence.omega.omegaLib.Formula |
---|
myChildren, myParent, myRelation, omegaLib, OP_AND, OP_CONJUNCT, OP_EXISTS, OP_FORALL, OP_NOT, OP_OR, OP_RELATION |
Constructor Summary | |
---|---|
RelBody(OmegaLib omegaLib,
int number_input,
int number_output)
|
|
RelBody(RelBody r)
|
|
RelBody(RelBody r,
Conjunct c)
|
Method Summary | |
---|---|
void |
addInputVar(java.lang.String name)
|
void |
addOutputVar(java.lang.String name)
|
void |
addSetVar(java.lang.String name)
|
RelBody |
affineHull()
|
RelBody |
after(int carried_by,
int new_output,
int dir)
|
boolean |
align(RelBody newr,
FExists fe,
Formula f,
Mapping mapping)
Build lists of variables that need to be replaced in the given Formula. |
FAnd |
andWithAnd()
|
EQHandle |
andWithEQ()
|
EQHandle |
andWithEQ(Conjunct c,
Equation eq)
|
GEQHandle |
andWithGEQ()
|
GEQHandle |
andWithGEQ(Conjunct c,
Equation eq)
|
RelBody |
approximate(boolean strides_allowed)
|
void |
beautify()
|
void |
calculateDimensions(Conjunct c,
int[] dims)
|
boolean |
canAddChild()
|
RelBody |
checkForConvexPairs()
|
RelBody |
checkForConvexRepresentation()
|
void |
clearGlobalDecls()
|
RelBody |
complement()
complement. |
RelBody |
composition(RelBody r2)
Composition(F, G) = F o G, where F o G (x) = F(G(x)) That is, if F = { [i] . |
RelBody |
conicClosure()
|
RelBody |
conicHull()
|
RelBody |
convexHull()
|
Formula |
copy(Formula f,
RelBody b)
|
Vector<CName> |
copyCNames(Vector<CName> vars)
|
void |
copyNames(RelBody r)
|
Vector<VarDecl> |
copyVars(Vector<VarDecl> vars)
|
static int |
created()
|
RelBody |
crossProduct(RelBody r2)
Cross Product. |
RelBody |
decoupledConvexHull()
|
void |
decrementRefCount()
|
void |
delete()
|
RelBody |
deltas()
Deltas(F) Return a set such that the ith variable is old Out_i - In_i Delta variables are created as input variables. |
RelBody |
deltas(int eq_no)
|
RelBody |
deltasToRelation(int n_inputs,
int n_outputs)
|
RelBody |
difference(RelBody r2)
F minus G. |
DNF |
DNFize()
|
void |
DNFtoFormula()
|
RelBody |
domain()
Domain and Range. |
boolean |
doSubsetCheck(RelBody r2)
|
RelBody |
emptyRelation()
|
void |
enforceLeadingInfo(int guaranteed,
int possible,
int dir)
|
boolean |
equal(RelBody r2)
|
RelBody |
extractDNFByCarriedLevel(int level,
int direction)
If direction==0, move all conjuncts with >= level leading 0's to return else move all conjuncts with level-1 0's followed by the appropriate signed difference to returned Relation. |
RelBody |
falseRelation()
|
static RelBody |
falseRelation(OmegaLib omegaLib,
int setvars)
|
static RelBody |
falseRelation(OmegaLib omegaLib,
int in,
int out)
|
Conjunct |
findAvailableConjunct()
|
Vector<VarDecl> |
getGlobalDecls()
|
VarDecl |
getLocal(GlobalVarDecl G)
|
VarDecl |
getLocal(GlobalVarDecl G,
int of)
|
VarDecl |
getLocal(VarDecl v)
|
int |
getRefCount()
|
Conjunct |
getSingleConjunct()
|
RelBody |
gist(RelBody R2,
int effort)
Compute gist(r1) given r2. |
RelBody |
gistSingleConjunct(RelBody R2,
int effort)
Compute (gist r1 given r2). |
boolean |
hasLocal(GlobalVarDecl G)
|
boolean |
hasLocal(GlobalVarDecl G,
int of)
|
boolean |
hasSingleConjunct()
|
RelBody |
hull(boolean stridesAllowed,
int effort,
RelBody knownHull)
|
RelBody |
identity()
|
static RelBody |
identity(OmegaLib omegaLib,
int numberInputp)
Identity. |
void |
incrementRefCount()
|
VarDecl |
inputVar(int nth)
|
void |
interpretUnknownAsFalse()
|
void |
interpretUnknownAsTrue()
|
RelBody |
intersection(RelBody r2)
F intersection G. |
void |
invalidateLeadingInfo(int changed)
|
RelBody |
inverse()
Inverse F -reverse the input and output tuples. |
boolean |
isDOK(RelBody D,
RelBody AxA)
Check if we can use D instead of R. |
boolean |
isExact()
|
boolean |
isFinalized()
|
boolean |
isLowerBoundSatisfiable()
Check if there exist any exact conjuncts in the solution. |
boolean |
isNotSatisfiable()
|
boolean |
isObviousTautology()
Check if we can easily determine if the formula evaluates to true. |
boolean |
isSatisfiable()
|
boolean |
isSet()
|
boolean |
isShared()
|
boolean |
isSimplified()
|
boolean |
isUnknown()
|
boolean |
isUpperBoundDefinitelyNotSatisfiable()
Check if the formula simplifies to FALSE. |
boolean |
isUpperBoundSatisfiable()
Check if the formula simplifies to FALSE, since the library will never say that if the *known* constraints are unsatisfiable by themselves. |
RelBody |
join(RelBody G)
|
RelBody |
linearHull()
|
RelBody |
makeLevelCarriedTo(int level)
|
void |
nameInputVar(int nth,
java.lang.String s)
|
void |
nameOutputVar(int nth,
java.lang.String s)
|
void |
nameSetVar(int nth,
java.lang.String s)
|
int |
nodeType()
|
int |
numberInput()
|
int |
numberOfConjuncts()
|
int |
numberOutput()
|
int |
numberSet()
|
VarDecl |
outputVar(int nth)
|
void |
prefixPrint()
|
void |
prefixPrint(boolean debug)
|
void |
print()
|
java.lang.String |
printFormulaToString()
|
java.lang.String |
printOutputsWithSubsToString()
|
java.lang.String |
printOutputsWithSubsToString(int i)
|
java.lang.String |
printSubsToString(Conjunct conj,
boolean printSym)
|
void |
printWithSubs()
|
void |
printWithSubs(boolean printSym,
boolean newline)
|
java.lang.String |
printWithSubsToString(boolean printSym,
boolean newline)
|
RelBody |
project(GlobalVarDecl g)
Project out global variable g from RelBody r. |
RelBody |
project(int pos,
int vkind)
Project an input, output or set variable, leaving a variable in that position with no constraints. |
RelBody |
project(Vector<VarDecl> s)
|
RelBody |
projectOnSym(RelBody input_context)
Project away all input and output variables. |
RelBody |
projectOntoJust(VarDecl v)
|
RelBody |
projectSym()
Project all symbolic variables from RelBody r. |
boolean |
queryDifference(VarDecl v1,
VarDecl v2,
int[] bounds)
|
DNF |
queryDNF()
|
DNF |
queryDNF(int rdt_conjs,
int rdt_constrs)
|
int |
queryGuaranteedLeadingZeros()
Return x such that for all conjuncts c, c has >= x leading 0s. |
int |
queryLeadingDir()
Return +-1 according to sign of leading dir, or 0 if we don't know. |
int |
queryPossibleLeadingZeros()
Return x such that for all conjuncts c, c has <= x leading 0s. |
void |
queryVariableBounds(VarDecl v,
int[] bounds)
|
RelBody |
range()
|
void |
rearrange()
|
void |
remapDNFVars(RelBody ref_rel)
Variables in DNF of map_rel reference declarations of map_rel (or not). |
Conjunct |
removeFirstConjunct()
|
boolean |
removeGlobalDecl(VarDecl v)
Return true if the variable was removed from the list of globals. |
RelBody |
restrictDomain(RelBody r2)
F \ G (the relation F restricted to domain G). |
RelBody |
restrictRange(RelBody r2)
F / G (the relation F restricted to range G) align the output tuples for F and G match named variables in F and G formula is f & g |
void |
reverseLeadingDirInfo()
|
void |
setFinalized()
|
void |
setIsSet(boolean flg)
|
void |
setupNames()
|
VarDecl |
setVar(int nth)
|
DNF |
simplifiedDNF()
|
void |
simplify()
|
void |
simplify(int rdt_conjs,
int rdt_constrs)
|
java.lang.String |
toString()
|
RelBody |
transitiveClosure(int maxExpansion,
RelBody iterationSpace)
|
RelBody |
transitiveClosure0(int maxExpansion,
RelBody iterationSpace)
Transitive closure of the RelBody containing multiple conjuncts. |
RelBody |
trueRelation()
|
static RelBody |
trueRelation(OmegaLib omegaLib,
int setvars)
|
static RelBody |
trueRelation(OmegaLib omegaLib,
int in,
int out)
|
RelBody |
tryConjunctTransitiveClosure(RelBody iterationSpace,
RelBody rPlus)
Try to get conjunct transitive closure. |
RelBody |
union(RelBody r2)
r1 Union r2. |
RelBody |
unknownRelation()
|
static RelBody |
unknownRelation(OmegaLib omegaLib,
int setvars)
|
static RelBody |
unknownRelation(OmegaLib omegaLib,
int in,
int out)
|
int |
unknownUses()
|
RelBody |
vennDiagramForm(RelBody context)
|
Methods inherited from class scale.score.dependence.omega.omegaLib.Formula |
---|
addAnd, addChild, addConjunct, addExists, addExists, addForall, addNot, addOr, andWith, assertNotFinalized, checkAndAddChild, children, combineColumns, getChildren, getFirstChild, numberOfChildren, olAssert, olAssert, parent, printSeparator, priority, pushExists, reallyConjunct, relation, remap, removeChild, removeFirstChild, setParent, setParent, setRelation, toStringClass, verifytree |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RelBody(OmegaLib omegaLib, int number_input, int number_output)
number_input
- is the number of input variablesnumber_output
- is the number of output variablespublic RelBody(RelBody r)
public RelBody(RelBody r, Conjunct c)
Method Detail |
---|
public static int created()
public Vector<VarDecl> copyVars(Vector<VarDecl> vars)
public Vector<CName> copyCNames(Vector<CName> vars)
public void delete()
delete
in class Formula
public void incrementRefCount()
public void decrementRefCount()
public int getRefCount()
public void setFinalized()
setFinalized
in class Formula
public DNF simplifiedDNF()
public int queryGuaranteedLeadingZeros()
>= x
leading 0s.
For a set, return -1.
public int queryPossibleLeadingZeros()
<= x
leading 0s.
If no conjuncts, return min of input and output tuple sizes, or -1 if relation is a set.
public int queryLeadingDir()
public int numberOfConjuncts()
public java.lang.String toString()
toString
in class Formula
public Formula copy(Formula f, RelBody b)
copy
in class Formula
public int nodeType()
nodeType
in class Formula
public boolean isSet()
public void setIsSet(boolean flg)
public int numberInput()
public int numberOutput()
public int numberSet()
public Vector<VarDecl> getGlobalDecls()
public void clearGlobalDecls()
public boolean removeGlobalDecl(VarDecl v)
public VarDecl inputVar(int nth)
public VarDecl outputVar(int nth)
public VarDecl setVar(int nth)
public VarDecl getLocal(VarDecl v)
public VarDecl getLocal(GlobalVarDecl G)
public VarDecl getLocal(GlobalVarDecl G, int of)
public boolean hasLocal(GlobalVarDecl G)
public boolean hasLocal(GlobalVarDecl G, int of)
public void nameInputVar(int nth, java.lang.String s)
public void nameOutputVar(int nth, java.lang.String s)
public void addInputVar(java.lang.String name)
public void addSetVar(java.lang.String name)
public void addOutputVar(java.lang.String name)
public void nameSetVar(int nth, java.lang.String s)
public FAnd andWithAnd()
public EQHandle andWithEQ()
public EQHandle andWithEQ(Conjunct c, Equation eq)
public GEQHandle andWithGEQ()
public GEQHandle andWithGEQ(Conjunct c, Equation eq)
public void print()
print
in class Formula
public void printWithSubs(boolean printSym, boolean newline)
public void printWithSubs()
public java.lang.String printWithSubsToString(boolean printSym, boolean newline)
public java.lang.String printSubsToString(Conjunct conj, boolean printSym)
public java.lang.String printOutputsWithSubsToString()
public java.lang.String printOutputsWithSubsToString(int i)
public java.lang.String printFormulaToString()
public void prefixPrint()
public void prefixPrint(boolean debug)
prefixPrint
in class Formula
public boolean isSatisfiable()
public boolean isNotSatisfiable()
public boolean isLowerBoundSatisfiable()
public boolean isUpperBoundSatisfiable()
public boolean isUpperBoundDefinitelyNotSatisfiable()
public boolean isObviousTautology()
public boolean isUnknown()
public DNF queryDNF()
public DNF queryDNF(int rdt_conjs, int rdt_constrs)
public void simplify()
public void simplify(int rdt_conjs, int rdt_constrs)
public boolean isFinalized()
public boolean isShared()
public boolean queryDifference(VarDecl v1, VarDecl v2, int[] bounds)
public void queryVariableBounds(VarDecl v, int[] bounds)
public void copyNames(RelBody r)
public RelBody extractDNFByCarriedLevel(int level, int direction)
public RelBody makeLevelCarriedTo(int level)
public void setupNames()
setupNames
in class Formula
public int unknownUses()
public boolean isExact()
public boolean isSimplified()
public Conjunct removeFirstConjunct()
public Conjunct getSingleConjunct()
public boolean hasSingleConjunct()
public void beautify()
beautify
in class Formula
public void rearrange()
rearrange
in class Formula
public void interpretUnknownAsTrue()
public void interpretUnknownAsFalse()
public boolean canAddChild()
canAddChild
in class Formula
public void reverseLeadingDirInfo()
reverseLeadingDirInfo
in class Formula
public void invalidateLeadingInfo(int changed)
invalidateLeadingInfo
in class Formula
public void enforceLeadingInfo(int guaranteed, int possible, int dir)
enforceLeadingInfo
in class Formula
public DNF DNFize()
DNFize
in class Formula
public void DNFtoFormula()
public Conjunct findAvailableConjunct()
findAvailableConjunct
in class Formula
public boolean align(RelBody newr, FExists fe, Formula f, Mapping mapping)
Obnoxiously many arguments here: Relation arguments contain declarations of symbolic and in/out vars. FExists argument is where needed existentially quant. vars can be decl.
Mapping specifies how in/out vars are mapped Two lists are required to be able to map in/out variables from the first and second relations to the same existentially quantified variable.
public RelBody approximate(boolean strides_allowed)
public void remapDNFVars(RelBody ref_rel)
public RelBody after(int carried_by, int new_output, int dir)
public RelBody projectOnSym(RelBody input_context)
public RelBody domain()
public RelBody range()
public RelBody inverse()
public RelBody deltas()
public RelBody deltas(int eq_no)
public RelBody deltasToRelation(int n_inputs, int n_outputs)
public RelBody complement()
public RelBody projectOntoJust(VarDecl v)
public RelBody union(RelBody r2)
public RelBody intersection(RelBody r2)
public RelBody restrictDomain(RelBody r2)
public RelBody restrictRange(RelBody r2)
public RelBody crossProduct(RelBody r2)
public RelBody composition(RelBody r2)
public RelBody difference(RelBody r2)
public boolean doSubsetCheck(RelBody r2)
public RelBody project(GlobalVarDecl g)
public RelBody projectSym()
public RelBody project(int pos, int vkind)
public RelBody project(Vector<VarDecl> s)
public void calculateDimensions(Conjunct c, int[] dims)
public RelBody trueRelation()
public static RelBody trueRelation(OmegaLib omegaLib, int setvars)
public static RelBody trueRelation(OmegaLib omegaLib, int in, int out)
public RelBody falseRelation()
public static RelBody falseRelation(OmegaLib omegaLib, int setvars)
public static RelBody falseRelation(OmegaLib omegaLib, int in, int out)
public RelBody emptyRelation()
public RelBody unknownRelation()
public static RelBody unknownRelation(OmegaLib omegaLib, int setvars)
public static RelBody unknownRelation(OmegaLib omegaLib, int in, int out)
public RelBody hull(boolean stridesAllowed, int effort, RelBody knownHull)
public RelBody checkForConvexPairs()
public RelBody vennDiagramForm(RelBody context)
public RelBody checkForConvexRepresentation()
public RelBody gistSingleConjunct(RelBody R2, int effort)
public RelBody gist(RelBody R2, int effort)
gist(r1)
given r2.
Relation r2
can have multiple conjuncts.
public boolean isDOK(RelBody D, RelBody AxA)
public static RelBody identity(OmegaLib omegaLib, int numberInputp)
public RelBody identity()
public RelBody tryConjunctTransitiveClosure(RelBody iterationSpace, RelBody rPlus)
public boolean equal(RelBody r2)
public RelBody decoupledConvexHull()
public RelBody convexHull()
public RelBody affineHull()
public RelBody linearHull()
public RelBody conicHull()
public RelBody conicClosure()
public RelBody join(RelBody G)
public RelBody transitiveClosure0(int maxExpansion, RelBody iterationSpace)
public RelBody transitiveClosure(int maxExpansion, RelBody iterationSpace)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |