kodkod.engine.config
Enum Options.IntEncoding

java.lang.Object
  extended by java.lang.Enum<Options.IntEncoding>
      extended by kodkod.engine.config.Options.IntEncoding
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Options.IntEncoding>
Enclosing class:
Options

public static enum Options.IntEncoding
extends java.lang.Enum<Options.IntEncoding>

Integer encoding options for the translation of int expressions.


Enum Constant Summary
TWOSCOMPLEMENT
          Two's-complement encoding of integers supports comparisons, addition, subtraction, multiplication, division, and all low-level bit operations (shifting, and, or, not, etc.).
 
Method Summary
(package private) abstract  int maxAllowedBitwidth()
          Returns the maximum bitwidth allowed by this encoding.
(package private) abstract  kodkod.util.ints.IntRange range(int bitwidth)
          Returns the range of integers representable with this encoding using the given number of bits.
static Options.IntEncoding valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Options.IntEncoding[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TWOSCOMPLEMENT

public static final Options.IntEncoding TWOSCOMPLEMENT
Two's-complement encoding of integers supports comparisons, addition, subtraction, multiplication, division, and all low-level bit operations (shifting, and, or, not, etc.). Maximum allowed bitwidth for this encoding is 32 bits.

Method Detail

values

public static Options.IntEncoding[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Options.IntEncoding c : Options.IntEncoding.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Options.IntEncoding valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

maxAllowedBitwidth

abstract int maxAllowedBitwidth()
Returns the maximum bitwidth allowed by this encoding.

Returns:
maximum bitwidth allowed by this encoding.

range

abstract kodkod.util.ints.IntRange range(int bitwidth)
Returns the range of integers representable with this encoding using the given number of bits.

Returns:
range of integers representable with this encoding using the given number of bits.