Raptor
Class PanSignature

java.lang.Object
  extended by Raptor.PanSignature
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class PanSignature
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

The Pandora Signature.

See Also:
Serialized Form

Constructor Summary
PanSignature()
          Constructs an empty PanSignature.
PanSignature(java.util.List<Atom> pPredicates, java.util.List<SimpleTerm> pConstants, java.util.List<Function> pFunctions, java.util.List<Var> pVariables, java.util.List<SimpleTerm> pSkolems, java.util.List<VVar> pVVars, java.util.List<PVar> pPVars, java.util.List<BVar> pBVars, java.util.List<java.lang.String> pVarDecs, java.util.List<java.lang.String> pArrayDecs, java.util.List<java.lang.String> pBoolDecs, java.util.List<AArray> pAArrays, java.util.List<PArray> pPArrays, java.util.List<LLVar> pLLVars, java.util.List<PLVar> pPLVars, java.util.List<MethodDeclaration> pMethodDecs)
          Constructs a PanSignature with the passed list of parameters
PanSignature(java.util.List<MethodDeclaration> pMethodDecs)
          Constructs an empty PanSignature except for the list of declared methods.
 
Method Summary
 void addAArrayDecsToSignature(java.util.List<AArray> pAArrays)
          Adds all the AArrays in the passed List to this PanSignature IF the signature does not already contain them.
 void addArrayDecsToSignature(java.util.List<java.lang.String> pArrayDecs)
          Adds all the ArrayDecs in the passed List to this PanSignature IF the signature does not already contain them.
 void addBoolDecsToSignature(java.util.List<java.lang.String> pBoolDecs)
          Adds all the BoolDecs in the passed List to this PanSignature IF the signature does not already contain them.
 void addConstant(java.lang.String pName)
          Add a constant to this PanSignature.
 void addConstsToSignature(java.util.List<SimpleTerm> pTerms)
          Adds all the SimpleTerms in the passed SimpleTerm List to this PanSignature's Constant list IF the signature does not already contain them.
 void addFuncsToSignature(java.util.List<Function> pFuncs)
          Adds all the Functions in the passed Function List to this PanSignature's Function list IF the signature does not already contain them
 void addFunction(java.lang.String pName, int pArity)
          Add a function to this PanSignature.
 void addLLVarsToSignature(java.util.List<LLVar> pLLVars)
          Adds all the LLVars in the passed List to this PanSignature IF the signature does not already contain them.
 void addMethodsToSignature(java.util.List<MethodDeclaration> pMethodDecs)
          Adds all the Methods in the passed List to this PanSignature IF the signature does not already contain them.
 void addPArrayDecsToSignature(java.util.List<PArray> pPArrays)
          Adds all the PArrays in the passed List to this PanSignature IF the signature does not already contain them.
 void addPLVarsToSignature(java.util.List<PLVar> pPLVars)
          Adds all the PLVars in the passed List to this PanSignature IF the signature does not already contain them.
 void addPredicate(java.lang.String pName, int pArity)
          Add a predicate to this PanSignature.
 void addPVarsToSignature(java.util.List<PVar> pPVariables)
          Adds all the PVars in the passed PVars List to this PanSignature's PVar list IF the signature does not already contain them.
 void addTermsToSignature(java.util.List<Term> pTerms)
          Adds all the Terms in the passed Term List to this PanSignature IF the signature does not already contain them.
 void addToSignature(java.util.List<Atom> pPredicates)
          Adds all the Atoms in the passed Atom List to this PanSignature's Predicate list IF the signature does not already contain them.
 void addToSignature(PanSignature pSig)
          Adds to this PanSignature the passed PanSignature's contents.
 void addVarDecsToSignature(java.util.List<java.lang.String> pVarDecs)
          Adds all the VarDecs in the passed List to this PanSignature IF the signature does not already contain them.
 void addVarsToSignature(java.util.List<Var> pVars)
          Adds all the Vars in the passed Var List to this PanSignature's Var list IF the signature does not already contain them
 void addVarToSignature(Var pVar)
          Adds the passed Var to this PanSignature's Variable list IF the signature does not already contain them
 void addVVarsToSignature(java.util.List<VVar> pVVariables)
          Adds all the VVars in the passed VVar List to this PanSignature's VVar list IF the signature does not already contain them.
 PanSignature clone()
          Returns a copy(clone) of this PanSignature.
 PanSignature compare(PanSignature pSig)
          Returns a PanSignature containing the difference of this signature and the passed signature
I.e The returned signature will contain all Predicates/Functions/SimpleTerms/Variables that the passed signaure contains and this signature doesn't.
 void display()
           
 java.util.List<AArray> getAArrays()
          Returns the AArrays list of the PanSignature.
 java.util.List<java.lang.String> getArrayDecs()
          Returns the Array Declarations list of the PanSignature.
 java.util.List<Blah> getBlahs()
           
 java.util.List<java.lang.String> getBoolDecs()
           
 java.util.List<BVar> getBVars()
           
 java.util.List<SimpleTerm> getConstants()
          Returns the Constant list of the PanSignature.
 java.util.List<Function> getFunctions()
          Returns the Function list of the PanSignature.
 java.util.List<LLVar> getLLVars()
          Returns the LLVariable list of the PanSignature.
 java.util.List<MethodDeclaration> getMethodDecs()
          Returns the Methods list of the PanSignature.
 java.util.List<PArray> getPArrays()
          Returns the PArrays list of the PanSignature.
 java.util.List<PLVar> getPLVars()
          Returns the PLVariable list of the PanSignature.
 java.util.List<Atom> getPredicates()
          Returns the Predicate list of the PanSignature.
 java.util.List<PVar> getPVars()
          Returns the PVariable list of the PanSignature.
 java.util.List<SimpleTerm> getSkolems()
          Returns the Skolem Constant list of the PanSignature.
 java.util.List<java.lang.String> getVarDecs()
          Returns the Variable Declarations list of the PanSignature.
 java.util.List<Var> getVariables()
          Returns the Variable list of the PanSignature.
 java.util.List<VVar> getVVars()
          Returns the VVariable list of the PanSignature.
 boolean isEmpty()
          Returns true if the PanSignature is empty.
A PanSignature is empty if its Predicate, Constant, VVar, PVar, AArray, PArray and the Function lists are empty.
 void setSignature(PanSignature pNewSig)
          Sets this PanSignature to the passed PanSignature by copying its lists' contents.
 java.lang.String show()
          Returns a String representation of the PanSignature.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PanSignature

public PanSignature(java.util.List<Atom> pPredicates,
                    java.util.List<SimpleTerm> pConstants,
                    java.util.List<Function> pFunctions,
                    java.util.List<Var> pVariables,
                    java.util.List<SimpleTerm> pSkolems,
                    java.util.List<VVar> pVVars,
                    java.util.List<PVar> pPVars,
                    java.util.List<BVar> pBVars,
                    java.util.List<java.lang.String> pVarDecs,
                    java.util.List<java.lang.String> pArrayDecs,
                    java.util.List<java.lang.String> pBoolDecs,
                    java.util.List<AArray> pAArrays,
                    java.util.List<PArray> pPArrays,
                    java.util.List<LLVar> pLLVars,
                    java.util.List<PLVar> pPLVars,
                    java.util.List<MethodDeclaration> pMethodDecs)
Constructs a PanSignature with the passed list of parameters

Parameters:
pPredicates - List represents the predicate list of the signature.
pConstants - List represents the constant list of the signature.
pFunctions - List represents the function list of the signature.
pVariables - List represents the variable list of the signature.
pSkolems - List represents the skolem constant list of the signature.
pVVars - List represents the vvariable list of the signature.
pPVars - List represents the pvariable list of the signature.
pVarDecs - List represents the declared variables list of the signature.
pArrayDecs - List represents the declared arrays list of the signature.
pAArrays - List represents the aarrays list of the signature.
pPArrays - List represents the parrays list of the signature.
pLLVars - List represents the llvars list of the signature.
pPLVars - List represents the plvars list of the signature.
pMethodDecs - List represents the declared methods list of the signature.

PanSignature

public PanSignature()
Constructs an empty PanSignature.


PanSignature

public PanSignature(java.util.List<MethodDeclaration> pMethodDecs)
Constructs an empty PanSignature except for the list of declared methods.

Method Detail

getPredicates

public java.util.List<Atom> getPredicates()
Returns the Predicate list of the PanSignature.


getBoolDecs

public java.util.List<java.lang.String> getBoolDecs()

getConstants

public java.util.List<SimpleTerm> getConstants()
Returns the Constant list of the PanSignature.


getFunctions

public java.util.List<Function> getFunctions()
Returns the Function list of the PanSignature.


getVariables

public java.util.List<Var> getVariables()
Returns the Variable list of the PanSignature.


getSkolems

public java.util.List<SimpleTerm> getSkolems()
Returns the Skolem Constant list of the PanSignature.


getVVars

public java.util.List<VVar> getVVars()
Returns the VVariable list of the PanSignature.


getPVars

public java.util.List<PVar> getPVars()
Returns the PVariable list of the PanSignature.


getPLVars

public java.util.List<PLVar> getPLVars()
Returns the PLVariable list of the PanSignature.


getLLVars

public java.util.List<LLVar> getLLVars()
Returns the LLVariable list of the PanSignature.


getVarDecs

public java.util.List<java.lang.String> getVarDecs()
Returns the Variable Declarations list of the PanSignature.


getArrayDecs

public java.util.List<java.lang.String> getArrayDecs()
Returns the Array Declarations list of the PanSignature.


getAArrays

public java.util.List<AArray> getAArrays()
Returns the AArrays list of the PanSignature.


getPArrays

public java.util.List<PArray> getPArrays()
Returns the PArrays list of the PanSignature.


getMethodDecs

public java.util.List<MethodDeclaration> getMethodDecs()
Returns the Methods list of the PanSignature.


setSignature

public void setSignature(PanSignature pNewSig)
Sets this PanSignature to the passed PanSignature by copying its lists' contents.

Parameters:
pNewSig - pNewSig represents the PanSignature which is to replace this PanSignature.

addToSignature

public void addToSignature(PanSignature pSig)
Adds to this PanSignature the passed PanSignature's contents.

Parameters:
pSig - pSig represents the PanSignature which is to be added to this PanSignature.

addToSignature

public void addToSignature(java.util.List<Atom> pPredicates)
Adds all the Atoms in the passed Atom List to this PanSignature's Predicate list IF the signature does not already contain them.


addConstsToSignature

public void addConstsToSignature(java.util.List<SimpleTerm> pTerms)
Adds all the SimpleTerms in the passed SimpleTerm List to this PanSignature's Constant list IF the signature does not already contain them.


addVarToSignature

public void addVarToSignature(Var pVar)
Adds the passed Var to this PanSignature's Variable list IF the signature does not already contain them


addVarsToSignature

public void addVarsToSignature(java.util.List<Var> pVars)
Adds all the Vars in the passed Var List to this PanSignature's Var list IF the signature does not already contain them


addVVarsToSignature

public void addVVarsToSignature(java.util.List<VVar> pVVariables)
Adds all the VVars in the passed VVar List to this PanSignature's VVar list IF the signature does not already contain them.


addPVarsToSignature

public void addPVarsToSignature(java.util.List<PVar> pPVariables)
Adds all the PVars in the passed PVars List to this PanSignature's PVar list IF the signature does not already contain them.


addFuncsToSignature

public void addFuncsToSignature(java.util.List<Function> pFuncs)
Adds all the Functions in the passed Function List to this PanSignature's Function list IF the signature does not already contain them


addTermsToSignature

public void addTermsToSignature(java.util.List<Term> pTerms)
Adds all the Terms in the passed Term List to this PanSignature IF the signature does not already contain them.


addVarDecsToSignature

public void addVarDecsToSignature(java.util.List<java.lang.String> pVarDecs)
Adds all the VarDecs in the passed List to this PanSignature IF the signature does not already contain them.


addArrayDecsToSignature

public void addArrayDecsToSignature(java.util.List<java.lang.String> pArrayDecs)
Adds all the ArrayDecs in the passed List to this PanSignature IF the signature does not already contain them.


addBoolDecsToSignature

public void addBoolDecsToSignature(java.util.List<java.lang.String> pBoolDecs)
Adds all the BoolDecs in the passed List to this PanSignature IF the signature does not already contain them.


addAArrayDecsToSignature

public void addAArrayDecsToSignature(java.util.List<AArray> pAArrays)
Adds all the AArrays in the passed List to this PanSignature IF the signature does not already contain them.


addPArrayDecsToSignature

public void addPArrayDecsToSignature(java.util.List<PArray> pPArrays)
Adds all the PArrays in the passed List to this PanSignature IF the signature does not already contain them.


addLLVarsToSignature

public void addLLVarsToSignature(java.util.List<LLVar> pLLVars)
Adds all the LLVars in the passed List to this PanSignature IF the signature does not already contain them.


addPLVarsToSignature

public void addPLVarsToSignature(java.util.List<PLVar> pPLVars)
Adds all the PLVars in the passed List to this PanSignature IF the signature does not already contain them.


addMethodsToSignature

public void addMethodsToSignature(java.util.List<MethodDeclaration> pMethodDecs)
Adds all the Methods in the passed List to this PanSignature IF the signature does not already contain them.


clone

public PanSignature clone()
Returns a copy(clone) of this PanSignature.

Overrides:
clone in class java.lang.Object

show

public java.lang.String show()
Returns a String representation of the PanSignature.


display

public void display()

compare

public PanSignature compare(PanSignature pSig)
Returns a PanSignature containing the difference of this signature and the passed signature
I.e The returned signature will contain all Predicates/Functions/SimpleTerms/Variables that the passed signaure contains and this signature doesn't.

Parameters:
pSig - the signature to be compared against this PanSignature.

isEmpty

public boolean isEmpty()
Returns true if the PanSignature is empty.
A PanSignature is empty if its Predicate, Constant, VVar, PVar, AArray, PArray and the Function lists are empty.


addFunction

public void addFunction(java.lang.String pName,
                        int pArity)
                 throws java.lang.Exception
Add a function to this PanSignature.

Parameters:
pName - the name of the function to be added.
pArity - the arity of the function to be added.
Throws:
java.lang.Exception

addPredicate

public void addPredicate(java.lang.String pName,
                         int pArity)
                  throws java.lang.Exception
Add a predicate to this PanSignature.

Parameters:
pName - the name of the predicate to be added.
pArity - the arity of the predicate to be added.
Throws:
java.lang.Exception

addConstant

public void addConstant(java.lang.String pName)
                 throws java.lang.Exception
Add a constant to this PanSignature.

Parameters:
pName - the name of the constant to be added.
Throws:
java.lang.Exception

getBVars

public java.util.List<BVar> getBVars()

getBlahs

public java.util.List<Blah> getBlahs()