|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectInvariant
TernaryInvariant
ThreeScalar
FunctionBinary
public abstract class FunctionBinary
Base class for each of the FunctionBinary functions and permutatons. Most of the work is done here. The subclasses basically define the function and return information describing the function and permutation to these methods
| Nested Class Summary | |
|---|---|
static class |
FunctionBinary.BitwiseAndLong_xyz
Represents the invariant x = BitwiseAnd (y, z) over three long scalars. |
static class |
FunctionBinary.BitwiseAndLong_yxz
Represents the invariant y = BitwiseAnd (x, z) over three long scalars. |
static class |
FunctionBinary.BitwiseAndLong_zxy
Represents the invariant z = BitwiseAnd (x, y) over three long scalars. |
static class |
FunctionBinary.BitwiseOrLong_xyz
Represents the invariant x = BitwiseOr (y, z) over three long scalars. |
static class |
FunctionBinary.BitwiseOrLong_yxz
Represents the invariant y = BitwiseOr (x, z) over three long scalars. |
static class |
FunctionBinary.BitwiseOrLong_zxy
Represents the invariant z = BitwiseOr (x, y) over three long scalars. |
static class |
FunctionBinary.BitwiseXorLong_xyz
Represents the invariant x = BitwiseXor (y, z) over three long scalars. |
static class |
FunctionBinary.BitwiseXorLong_yxz
Represents the invariant y = BitwiseXor (x, z) over three long scalars. |
static class |
FunctionBinary.BitwiseXorLong_zxy
Represents the invariant z = BitwiseXor (x, y) over three long scalars. |
static class |
FunctionBinary.DivisionLong_xyz
Represents the invariant x = Division (y, z) over three long scalars. |
static class |
FunctionBinary.DivisionLong_xzy
Represents the invariant x = Division (z, y) over three long scalars. |
static class |
FunctionBinary.DivisionLong_yxz
Represents the invariant y = Division (x, z) over three long scalars. |
static class |
FunctionBinary.DivisionLong_yzx
Represents the invariant y = Division (z, x) over three long scalars. |
static class |
FunctionBinary.DivisionLong_zxy
Represents the invariant z = Division (x, y) over three long scalars. |
static class |
FunctionBinary.DivisionLong_zyx
Represents the invariant z = Division (y, x) over three long scalars. |
static class |
FunctionBinary.GcdLong_xyz
Represents the invariant x = Gcd (y, z) over three long scalars. |
static class |
FunctionBinary.GcdLong_yxz
Represents the invariant y = Gcd (x, z) over three long scalars. |
static class |
FunctionBinary.GcdLong_zxy
Represents the invariant z = Gcd (x, y) over three long scalars. |
static class |
FunctionBinary.LogicalAndLong_xyz
Represents the invariant x = LogicalAnd (y, z) over three long scalars. |
static class |
FunctionBinary.LogicalAndLong_yxz
Represents the invariant y = LogicalAnd (x, z) over three long scalars. |
static class |
FunctionBinary.LogicalAndLong_zxy
Represents the invariant z = LogicalAnd (x, y) over three long scalars. |
static class |
FunctionBinary.LogicalOrLong_xyz
Represents the invariant x = LogicalOr (y, z) over three long scalars. |
static class |
FunctionBinary.LogicalOrLong_yxz
Represents the invariant y = LogicalOr (x, z) over three long scalars. |
static class |
FunctionBinary.LogicalOrLong_zxy
Represents the invariant z = LogicalOr (x, y) over three long scalars. |
static class |
FunctionBinary.LogicalXorLong_xyz
Represents the invariant x = LogicalXor (y, z) over three long scalars. |
static class |
FunctionBinary.LogicalXorLong_yxz
Represents the invariant y = LogicalXor (x, z) over three long scalars. |
static class |
FunctionBinary.LogicalXorLong_zxy
Represents the invariant z = LogicalXor (x, y) over three long scalars. |
static class |
FunctionBinary.LshiftLong_xyz
Represents the invariant x = Lshift (y, z) over three long scalars. |
static class |
FunctionBinary.LshiftLong_xzy
Represents the invariant x = Lshift (z, y) over three long scalars. |
static class |
FunctionBinary.LshiftLong_yxz
Represents the invariant y = Lshift (x, z) over three long scalars. |
static class |
FunctionBinary.LshiftLong_yzx
Represents the invariant y = Lshift (z, x) over three long scalars. |
static class |
FunctionBinary.LshiftLong_zxy
Represents the invariant z = Lshift (x, y) over three long scalars. |
static class |
FunctionBinary.LshiftLong_zyx
Represents the invariant z = Lshift (y, x) over three long scalars. |
static class |
FunctionBinary.MaximumLong_xyz
Represents the invariant x = Maximum (y, z) over three long scalars. |
static class |
FunctionBinary.MaximumLong_yxz
Represents the invariant y = Maximum (x, z) over three long scalars. |
static class |
FunctionBinary.MaximumLong_zxy
Represents the invariant z = Maximum (x, y) over three long scalars. |
static class |
FunctionBinary.MinimumLong_xyz
Represents the invariant x = Minimum (y, z) over three long scalars. |
static class |
FunctionBinary.MinimumLong_yxz
Represents the invariant y = Minimum (x, z) over three long scalars. |
static class |
FunctionBinary.MinimumLong_zxy
Represents the invariant z = Minimum (x, y) over three long scalars. |
static class |
FunctionBinary.ModLong_xyz
Represents the invariant x = Mod (y, z) over three long scalars. |
static class |
FunctionBinary.ModLong_xzy
Represents the invariant x = Mod (z, y) over three long scalars. |
static class |
FunctionBinary.ModLong_yxz
Represents the invariant y = Mod (x, z) over three long scalars. |
static class |
FunctionBinary.ModLong_yzx
Represents the invariant y = Mod (z, x) over three long scalars. |
static class |
FunctionBinary.ModLong_zxy
Represents the invariant z = Mod (x, y) over three long scalars. |
static class |
FunctionBinary.ModLong_zyx
Represents the invariant z = Mod (y, x) over three long scalars. |
static class |
FunctionBinary.MultiplyLong_xyz
Represents the invariant x = Multiply (y, z) over three long scalars. |
static class |
FunctionBinary.MultiplyLong_yxz
Represents the invariant y = Multiply (x, z) over three long scalars. |
static class |
FunctionBinary.MultiplyLong_zxy
Represents the invariant z = Multiply (x, y) over three long scalars. |
static class |
FunctionBinary.PowerLong_xyz
Represents the invariant x = Power (y, z) over three long scalars. |
static class |
FunctionBinary.PowerLong_xzy
Represents the invariant x = Power (z, y) over three long scalars. |
static class |
FunctionBinary.PowerLong_yxz
Represents the invariant y = Power (x, z) over three long scalars. |
static class |
FunctionBinary.PowerLong_yzx
Represents the invariant y = Power (z, x) over three long scalars. |
static class |
FunctionBinary.PowerLong_zxy
Represents the invariant z = Power (x, y) over three long scalars. |
static class |
FunctionBinary.PowerLong_zyx
Represents the invariant z = Power (y, x) over three long scalars. |
static class |
FunctionBinary.RshiftSignedLong_xyz
Represents the invariant x = RshiftSigned (y, z) over three long scalars. |
static class |
FunctionBinary.RshiftSignedLong_xzy
Represents the invariant x = RshiftSigned (z, y) over three long scalars. |
static class |
FunctionBinary.RshiftSignedLong_yxz
Represents the invariant y = RshiftSigned (x, z) over three long scalars. |
static class |
FunctionBinary.RshiftSignedLong_yzx
Represents the invariant y = RshiftSigned (z, x) over three long scalars. |
static class |
FunctionBinary.RshiftSignedLong_zxy
Represents the invariant z = RshiftSigned (x, y) over three long scalars. |
static class |
FunctionBinary.RshiftSignedLong_zyx
Represents the invariant z = RshiftSigned (y, x) over three long scalars. |
static class |
FunctionBinary.RshiftUnsignedLong_xyz
Represents the invariant x = RshiftUnsigned (y, z) over three long scalars. |
static class |
FunctionBinary.RshiftUnsignedLong_xzy
Represents the invariant x = RshiftUnsigned (z, y) over three long scalars. |
static class |
FunctionBinary.RshiftUnsignedLong_yxz
Represents the invariant y = RshiftUnsigned (x, z) over three long scalars. |
static class |
FunctionBinary.RshiftUnsignedLong_yzx
Represents the invariant y = RshiftUnsigned (z, x) over three long scalars. |
static class |
FunctionBinary.RshiftUnsignedLong_zxy
Represents the invariant z = RshiftUnsigned (x, y) over three long scalars. |
static class |
FunctionBinary.RshiftUnsignedLong_zyx
Represents the invariant z = RshiftUnsigned (y, x) over three long scalars. |
| Nested classes/interfaces inherited from class Invariant |
|---|
Invariant.ClassVarnameComparator, Invariant.ClassVarnameFormulaComparator, Invariant.InvariantComparatorForPrinting, Invariant.Match |
| Field Summary | |
|---|---|
static Logger |
debug
|
static boolean |
dkconfig_enabled
Boolean. |
| Constructor Summary | |
|---|---|
protected |
FunctionBinary()
|
protected |
FunctionBinary(PptSlice ppt)
|
| Method Summary | |
|---|---|
InvariantStatus |
add_ordered(long result,
long arg1,
long arg2,
int count)
Apply the specified sample to the function, returning the result The caller is responsible for permuting the arguments. |
VarInfo |
argVar1()
Permuted arg1 var. |
VarInfo |
argVar2()
Permuted arg2 var. |
InvariantStatus |
check_ordered(long result,
long arg1,
long arg2,
int count)
Apply the specified sample to the function, returning the result The caller is responsible for permuting the arguments. |
double |
computeConfidence()
This method computes the confidence that this invariant occurred by chance. |
boolean |
enabled()
returns whether or not this invariant is enabled |
String |
format_simplify()
|
String |
format_using(OutputFormat format)
|
static List<Invariant> |
get_proto_all()
Returns a list of all of the FunctionBinary prototype invariants |
boolean |
instantiate_ok(VarInfo[] vis)
FunctionBinary is only valid on isIntegral() types |
boolean |
isBitwiseAnd()
|
boolean |
isBitwiseOr()
|
boolean |
isBitwiseXor()
|
boolean |
isDivision()
|
boolean |
isGcd()
|
boolean |
isLogicalAnd()
|
boolean |
isLogicalOr()
|
boolean |
isLogicalXor()
|
boolean |
isLshift()
|
boolean |
isMaximum()
|
boolean |
isMinimum()
|
boolean |
isMod()
|
boolean |
isMultiply()
|
DiscardInfo |
isObviousDynamically(VarInfo[] vis)
Return non-null if this invariant is necessarily true from a fact that can be determined dynamically (after checking data) -- for the given varInfos rather than the varInfos of this. |
boolean |
isPower()
|
boolean |
isRshiftSigned()
|
boolean |
isRshiftUnsigned()
|
boolean |
isSameFormula(Invariant other)
|
String |
repr()
For printing invariants, there are two interfaces: repr gives a low-level representation (repr_prop also prints the confidence), and format gives a high-level representation for user output. |
VarInfo |
resultVar()
Permuted result var. |
protected Invariant |
resurrect_done(int[] permutation)
Reorganize our already-seen state as if the variables had shifted order underneath us (re-arrangement given by the permutation). |
| Methods inherited from class ThreeScalar |
|---|
add_modified, add_unmodified, add, check_modified, check_unmodified, check, valid_types, var1, var2, var3 |
| Methods inherited from class Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static boolean dkconfig_enabled
public static Logger debug
| Constructor Detail |
|---|
protected FunctionBinary(PptSlice ppt)
protected FunctionBinary()
| Method Detail |
|---|
public boolean enabled()
enabled in class Invariantpublic boolean instantiate_ok(VarInfo[] vis)
instantiate_ok in class InvariantInvariant.valid_types(VarInfo[])public static List<Invariant> get_proto_all()
public VarInfo resultVar()
public VarInfo argVar1()
public VarInfo argVar2()
public InvariantStatus check_ordered(long result,
long arg1,
long arg2,
int count)
public InvariantStatus add_ordered(long result,
long arg1,
long arg2,
int count)
protected Invariant resurrect_done(int[] permutation)
resurrect_done in class TernaryInvariantpublic String repr()
Invariant
repr in class Invariantpublic String format_using(OutputFormat format)
format_using in class Invariantpublic String format_simplify()
public boolean isSameFormula(Invariant other)
isSameFormula in class Invariantpublic double computeConfidence()
Invariant
computeConfidence in class InvariantInvariant.getConfidence()public DiscardInfo isObviousDynamically(VarInfo[] vis)
Invariant
isObviousDynamically in class Invariantpublic boolean isMultiply()
public boolean isMinimum()
public boolean isMaximum()
public boolean isDivision()
public boolean isPower()
public boolean isBitwiseAnd()
public boolean isLogicalAnd()
public boolean isBitwiseXor()
public boolean isLogicalXor()
public boolean isBitwiseOr()
public boolean isLogicalOr()
public boolean isGcd()
public boolean isMod()
public boolean isLshift()
public boolean isRshiftSigned()
public boolean isRshiftUnsigned()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||