forge.program
Class InstanceDomain

java.lang.Object
  extended by forge.program.ForgeDomain
      extended by forge.program.InstanceDomain
All Implemented Interfaces:
ForgeExpression, ForgeExpression.Leaf, ForgeExpression.Modifiable, ForgeType, ForgeType.Tuple, ForgeType.Unary, ProgramElement

public final class InstanceDomain
extends ForgeDomain
implements ForgeExpression.Modifiable

A class of instance (non-primitive) atoms.

Author:
Greg Dennis (gdennis@mit.edu)

Nested Class Summary
 
Nested classes/interfaces inherited from class forge.program.ForgeDomain
ForgeDomain.Kind
 
Nested classes/interfaces inherited from interface forge.program.ForgeExpression
ForgeExpression.Leaf, ForgeExpression.Modifiable
 
Nested classes/interfaces inherited from interface forge.program.ForgeType
ForgeType.Tuple, ForgeType.Unary
 
Method Summary
 ForgeExpression and(ForgeExpression expr)
           
 ForgeExpression apply(UnaryExpression.Op op)
           
 ForgeExpression bitAnd(ForgeExpression expr)
           
 ForgeExpression bitNot()
           
 ForgeExpression bitOr(ForgeExpression expr)
           
 ForgeExpression bitXor(ForgeExpression expr)
           
 ForgeExpression bool()
           
 ForgeExpression closure()
           
 ForgeExpression compose(BinaryExpression.Op op, ForgeExpression expr)
           
 ForgeExpression comprehension(LocalDecls decls)
           
 ForgeExpression difference(ForgeExpression expr)
           
 ForgeType.Unary difference(ForgeType type)
           
 ForgeExpression divide(ForgeExpression expr)
           
 ForgeDomain domain()
           
 java.util.List<ForgeDomain> domains()
           
 ForgeExpression eq(ForgeExpression expr)
           
 ForgeExpression forAll(LocalDecls decls)
           
 ForgeExpression forSome(LocalDecls decls)
           
 ForgeExpression gt(ForgeExpression expr)
           
 ForgeExpression gte(ForgeExpression expr)
           
 ForgeExpression iden()
           
 ForgeExpression iff(ForgeExpression expr)
           
 ForgeExpression implies(ForgeExpression expr)
           
 ForgeExpression in(ForgeExpression expr)
           
 ForgeExpression intersection(ForgeExpression expr)
           
 ForgeType.Unary intersection(ForgeType type)
           
 boolean isDomain()
           
 boolean isGlobal()
          True if instanceof InstanceDomain or GlobalVariable, false if LocalVariable.
 boolean isUnary()
          Returns true if the arity is one.
 boolean isVariable()
          True if instanceof ForgeVariable, false if InstanceDomain.
 ForgeExpression join(ForgeExpression expr)
           
 ForgeExpression lone()
           
 ForgeExpression lt(ForgeExpression expr)
           
 ForgeExpression lte(ForgeExpression expr)
           
 ForgeExpression minus(ForgeExpression expr)
           
 ForgeExpression modulo(ForgeExpression expr)
           
 ForgeExpression neg()
           
 ForgeExpression no()
           
 ForgeExpression not()
           
 ForgeExpression one()
           
 ForgeExpression or(ForgeExpression expr)
           
 ForgeExpression override(ForgeExpression expr)
           
 ForgeExpression plus(ForgeExpression expr)
           
 ForgeExpression product(ForgeExpression expr)
           
 ForgeType.Tuple product(ForgeType.Tuple tupleType)
           
 ForgeProgram program()
          Returns the program to which this element belongs.
 ForgeExpression projection(int... columns)
           
 ForgeType.Tuple projectType(int... columns)
           
 ForgeExpression quantify(QuantifyExpression.Op quant, LocalDecls decls)
           
 ForgeDomain range()
           
 ForgeExpression shiftLeft(ForgeExpression expr)
           
 ForgeExpression shiftRight(ForgeExpression expr)
           
 ForgeExpression size()
           
 ForgeExpression some()
           
 ForgeExpression sum()
           
 ForgeExpression summation(LocalDecls decls)
           
 ForgeExpression thenElse(ForgeExpression thenExpr, ForgeExpression elseExpr)
           
 ForgeExpression times(ForgeExpression expr)
           
 java.util.Set<ForgeDomain> tupleTypes()
           
 ForgeExpression union(ForgeExpression expr)
           
 ForgeType.Unary union(ForgeType type)
           
 ForgeExpression unsignedShiftRight(ForgeExpression expr)
           
 ForgeExpression xor(ForgeExpression expr)
           
 
Methods inherited from class forge.program.ForgeDomain
kind, name, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface forge.program.ForgeExpression.Leaf
name
 
Methods inherited from interface forge.program.ForgeExpression
accept, and, apply, arity, bitAnd, bitNot, bitOr, bitXor, bool, closure, compose, comprehension, difference, divide, domain, eq, forAll, forSome, gt, gte, iden, iff, implies, in, intersection, isUnary, join, lone, lt, lte, minus, modulo, neg, no, not, one, or, override, plus, product, projection, quantify, range, shiftLeft, shiftRight, size, some, sum, summation, thenElse, times, type, union, unsignedShiftRight, xor
 
Methods inherited from interface forge.program.ProgramElement
program
 
Methods inherited from interface forge.program.ForgeType
isEmpty, join, product, subtypeOf
 

Method Detail

isVariable

public boolean isVariable()
Description copied from interface: ForgeExpression.Modifiable
True if instanceof ForgeVariable, false if InstanceDomain.

Specified by:
isVariable in interface ForgeExpression.Modifiable

isGlobal

public boolean isGlobal()
Description copied from interface: ForgeExpression.Modifiable
True if instanceof InstanceDomain or GlobalVariable, false if LocalVariable.

Specified by:
isGlobal in interface ForgeExpression.Modifiable

tupleTypes

public final java.util.Set<ForgeDomain> tupleTypes()
Specified by:
tupleTypes in interface ForgeType
Specified by:
tupleTypes in interface ForgeType.Unary

domains

public final java.util.List<ForgeDomain> domains()
Specified by:
domains in interface ForgeType.Tuple

isDomain

public final boolean isDomain()
Specified by:
isDomain in interface ForgeType

domain

public final ForgeDomain domain()
Specified by:
domain in interface ForgeExpression
Specified by:
domain in interface ForgeType
Specified by:
domain in interface ForgeType.Tuple

range

public final ForgeDomain range()
Specified by:
range in interface ForgeExpression
Specified by:
range in interface ForgeType
Specified by:
range in interface ForgeType.Tuple

projectType

public final ForgeType.Tuple projectType(int... columns)
Specified by:
projectType in interface ForgeType
Specified by:
projectType in interface ForgeType.Tuple

product

public ForgeType.Tuple product(ForgeType.Tuple tupleType)
Specified by:
product in interface ForgeType.Tuple

union

public final ForgeType.Unary union(ForgeType type)
Specified by:
union in interface ForgeType
Specified by:
union in interface ForgeType.Unary

difference

public final ForgeType.Unary difference(ForgeType type)
Specified by:
difference in interface ForgeType
Specified by:
difference in interface ForgeType.Unary

intersection

public final ForgeType.Unary intersection(ForgeType type)
Specified by:
intersection in interface ForgeType
Specified by:
intersection in interface ForgeType.Unary

program

public final ForgeProgram program()
Description copied from interface: ProgramElement
Returns the program to which this element belongs.

Specified by:
program in interface ProgramElement

isUnary

public final boolean isUnary()
Description copied from interface: ForgeExpression
Returns true if the arity is one.

Specified by:
isUnary in interface ForgeExpression

iden

public final ForgeExpression iden()
Specified by:
iden in interface ForgeExpression

projection

public final ForgeExpression projection(int... columns)
Specified by:
projection in interface ForgeExpression

closure

public final ForgeExpression closure()
Specified by:
closure in interface ForgeExpression

no

public final ForgeExpression no()
Specified by:
no in interface ForgeExpression

lone

public final ForgeExpression lone()
Specified by:
lone in interface ForgeExpression

one

public final ForgeExpression one()
Specified by:
one in interface ForgeExpression

some

public final ForgeExpression some()
Specified by:
some in interface ForgeExpression

size

public final ForgeExpression size()
Specified by:
size in interface ForgeExpression

bool

public final ForgeExpression bool()
Specified by:
bool in interface ForgeExpression

not

public final ForgeExpression not()
Specified by:
not in interface ForgeExpression

sum

public final ForgeExpression sum()
Specified by:
sum in interface ForgeExpression

neg

public final ForgeExpression neg()
Specified by:
neg in interface ForgeExpression

bitNot

public final ForgeExpression bitNot()
Specified by:
bitNot in interface ForgeExpression

apply

public ForgeExpression apply(UnaryExpression.Op op)
Specified by:
apply in interface ForgeExpression

union

public final ForgeExpression union(ForgeExpression expr)
Specified by:
union in interface ForgeExpression

difference

public final ForgeExpression difference(ForgeExpression expr)
Specified by:
difference in interface ForgeExpression

intersection

public final ForgeExpression intersection(ForgeExpression expr)
Specified by:
intersection in interface ForgeExpression

join

public final ForgeExpression join(ForgeExpression expr)
Specified by:
join in interface ForgeExpression

product

public final ForgeExpression product(ForgeExpression expr)
Specified by:
product in interface ForgeExpression

override

public final ForgeExpression override(ForgeExpression expr)
Specified by:
override in interface ForgeExpression

and

public final ForgeExpression and(ForgeExpression expr)
Specified by:
and in interface ForgeExpression

or

public final ForgeExpression or(ForgeExpression expr)
Specified by:
or in interface ForgeExpression

xor

public final ForgeExpression xor(ForgeExpression expr)
Specified by:
xor in interface ForgeExpression

implies

public final ForgeExpression implies(ForgeExpression expr)
Specified by:
implies in interface ForgeExpression

iff

public final ForgeExpression iff(ForgeExpression expr)
Specified by:
iff in interface ForgeExpression

eq

public final ForgeExpression eq(ForgeExpression expr)
Specified by:
eq in interface ForgeExpression

in

public final ForgeExpression in(ForgeExpression expr)
Specified by:
in in interface ForgeExpression

lt

public final ForgeExpression lt(ForgeExpression expr)
Specified by:
lt in interface ForgeExpression

gt

public final ForgeExpression gt(ForgeExpression expr)
Specified by:
gt in interface ForgeExpression

lte

public final ForgeExpression lte(ForgeExpression expr)
Specified by:
lte in interface ForgeExpression

gte

public final ForgeExpression gte(ForgeExpression expr)
Specified by:
gte in interface ForgeExpression

plus

public final ForgeExpression plus(ForgeExpression expr)
Specified by:
plus in interface ForgeExpression

minus

public final ForgeExpression minus(ForgeExpression expr)
Specified by:
minus in interface ForgeExpression

times

public final ForgeExpression times(ForgeExpression expr)
Specified by:
times in interface ForgeExpression

divide

public final ForgeExpression divide(ForgeExpression expr)
Specified by:
divide in interface ForgeExpression

modulo

public final ForgeExpression modulo(ForgeExpression expr)
Specified by:
modulo in interface ForgeExpression

bitAnd

public final ForgeExpression bitAnd(ForgeExpression expr)
Specified by:
bitAnd in interface ForgeExpression

bitOr

public final ForgeExpression bitOr(ForgeExpression expr)
Specified by:
bitOr in interface ForgeExpression

bitXor

public final ForgeExpression bitXor(ForgeExpression expr)
Specified by:
bitXor in interface ForgeExpression

shiftLeft

public final ForgeExpression shiftLeft(ForgeExpression expr)
Specified by:
shiftLeft in interface ForgeExpression

shiftRight

public final ForgeExpression shiftRight(ForgeExpression expr)
Specified by:
shiftRight in interface ForgeExpression

unsignedShiftRight

public final ForgeExpression unsignedShiftRight(ForgeExpression expr)
Specified by:
unsignedShiftRight in interface ForgeExpression

compose

public final ForgeExpression compose(BinaryExpression.Op op,
                                     ForgeExpression expr)
Specified by:
compose in interface ForgeExpression

thenElse

public final ForgeExpression thenElse(ForgeExpression thenExpr,
                                      ForgeExpression elseExpr)
Specified by:
thenElse in interface ForgeExpression

forAll

public final ForgeExpression forAll(LocalDecls decls)
Specified by:
forAll in interface ForgeExpression

forSome

public final ForgeExpression forSome(LocalDecls decls)
Specified by:
forSome in interface ForgeExpression

comprehension

public final ForgeExpression comprehension(LocalDecls decls)
Specified by:
comprehension in interface ForgeExpression

summation

public final ForgeExpression summation(LocalDecls decls)
Specified by:
summation in interface ForgeExpression

quantify

public final ForgeExpression quantify(QuantifyExpression.Op quant,
                                      LocalDecls decls)
Specified by:
quantify in interface ForgeExpression