|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkodkod.engine.bool.Int
public abstract class Int
An integer represented using boolean values
and unary
or
binary
encoding.
factory: BooleanFactory |
bits: [0..factory.bitwidth) -> one factory.components |
encoding: factory.intEncoding |
Method Summary | |
---|---|
abstract Int |
abs()
Returns an Int that represents the absolute value of this integer. |
abstract Int |
and(Int other)
Returns an Int that represents the bitwise conjunction of this and the given Int. |
abstract BooleanValue |
bit(int i)
Returns the BooleanValue at the specified index. |
abstract Int |
choice(BooleanValue condition,
Int other)
Returns an Int that evaluates to this if the condition is true, otherwise it evaluates to the given Int. |
abstract Int |
divide(Int other)
Returns an Int that represents the quotient of the division between this and the given Int. |
BooleanValue |
eq(Int other)
Returns a BooleanValue encoding the comparator circuit that checks whether the integer represented by this Int is equal to the integer represented by the specified Int. |
BooleanFactory |
factory()
Returns this.factory |
BooleanValue |
gt(Int other)
Returns a BooleanValue encoding the comparator circuit that checks whether the integer represented by this Int is greater than the integer represented by the specified Int. |
BooleanValue |
gte(Int other)
Returns a BooleanValue encoding the comparator circuit that checks whether the integer represented by this Int is greater than or equal to the integer represented by the specified Int. |
boolean |
isConstant()
Returns true if all the bits representing this Int are BooleanConstants. |
BooleanValue |
lt(Int other)
Returns a BooleanValue encoding the comparator circuit that checks whether the integer represented by this Int is less than the integer represented by the specified Int. |
abstract BooleanValue |
lte(Int other)
Returns a BooleanValue encoding the comparator circuit that checks whether the integer represented by this Int is less than or equal to the integer represented by the specified Int |
abstract Int |
minus(Int other)
Returns an Int that represents the difference between this and the given Int. |
abstract Int |
modulo(Int other)
Returns an Int that represents the remainder of the division between this and the given Int. |
abstract Int |
multiply(Int other)
Returns an Int that represents the product between this and the given Int. |
abstract Int |
negate()
Returns an Int that represents the negation of this integer. |
abstract Int |
not()
Returns an Int that represents bitwise negation of this integer. |
abstract Int |
or(Int other)
Returns an Int that represents the bitwise disjunction of this and the given Int. |
abstract Int |
plus(Int other)
Returns an Int that represents the sum of this and the given Int. |
abstract Int |
sgn()
Returns an Int that represents the signum of this integer. |
abstract Int |
sha(Int other)
Returns an Int that represents this shifted to the right by the given Int, with sign extension. |
abstract Int |
shl(Int other)
Returns an Int that represents this shifted to the left by the given Int. |
abstract Int |
shr(Int other)
Returns an Int that represents this shifted to the right by the given Int, with zero extension. |
abstract int |
value()
If this Int is constant, returns its value. |
abstract int |
width()
Returns the number of bits in the representation of this Int, including sign bits (if any). |
abstract Int |
xor(Int other)
Returns an Int that represents the bitwise XOR of this and the given Int. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final BooleanFactory factory()
public abstract int width()
public abstract BooleanValue bit(int i)
0 <= i < this.factory.bitwidth |
public final boolean isConstant()
public abstract int value()
java.lang.IllegalStateException
- - !this.isConstant()public final BooleanValue eq(Int other)
java.lang.IllegalArgumentException
- - this.factory != other.factorythis.factory = other.factory |
public abstract BooleanValue lte(Int other)
java.lang.IllegalArgumentException
- - this.factory != other.factorythis.factory = other.factory |
public BooleanValue lt(Int other)
java.lang.IllegalArgumentException
- - this.factory != other.factorythis.factory = other.factory |
public BooleanValue gte(Int other)
java.lang.IllegalArgumentException
- - this.factory != other.factorythis.factory = other.factory |
public BooleanValue gt(Int other)
java.lang.IllegalArgumentException
- - this.factory != other.factorythis.factory = other.factory |
public abstract Int plus(Int other)
java.lang.IllegalArgumentException
- - this.factory != other.factorythis.factory = other.factory |
public abstract Int minus(Int other)
java.lang.UnsupportedOperationException
- - this.encoding does not support subtractionthis.factory = other.factory |
public abstract Int multiply(Int other)
java.lang.UnsupportedOperationException
- - this.encoding does not support multiplicationthis.factory = other.factory |
public abstract Int divide(Int other)
java.lang.UnsupportedOperationException
- - this.encoding does not support divisionthis.factory = other.factory |
public abstract Int modulo(Int other)
java.lang.UnsupportedOperationException
- - this.encoding does not support divisionthis.factory = other.factory |
public abstract Int choice(BooleanValue condition, Int other)
other + condition in this.factory.components |
public abstract Int and(Int other)
this.factory = other.factory |
public abstract Int or(Int other)
this.factory = other.factory |
public abstract Int xor(Int other)
java.lang.UnsupportedOperationException
- - this.encoding does not support XORthis.factory = other.factory |
public abstract Int shl(Int other)
java.lang.UnsupportedOperationException
- - this.encoding does not support SHLthis.factory = other.factory |
public abstract Int shr(Int other)
java.lang.UnsupportedOperationException
- - this.encoding does not support SHRthis.factory = other.factory |
public abstract Int sha(Int other)
java.lang.UnsupportedOperationException
- - this.encoding does not support SHAthis.factory = other.factory |
public abstract Int negate()
java.lang.UnsupportedOperationException
- - this.encoding does not support negationpublic abstract Int not()
java.lang.UnsupportedOperationException
- - this.encoding does not support bitwise negationpublic abstract Int abs()
public abstract Int sgn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |