|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectescjava.vcGeneration.ProverType
The interface to be implemented when adding a new prover to ESC/Java.
Any implementing class should be placed in an appropriately named subpackage of the escjava.vcGeneration package. In addition, the implementing classes name should be be a capitilized version of the subpackages name with all dots removed:
With this interface, even Simplify is treated as just another prover.
The following terminology is used consistently throughout the vcGenerator package:
| Constructor Summary | |
ProverType()
|
|
| Method Summary | |
abstract Expr |
addTypeInfo(InitialState initState,
Expr tree)
This method is used by untyped prover logics to add typing predicates to the supplied VC term. |
protected abstract void |
generateDeclarations(java.io.Writer out,
java.util.HashMap variablesName)
This methods generates the declarations for a specified prover. |
void |
generateDeclarations(java.io.Writer out,
TNode term)
This convenience method generates the declarations for a given term. |
void |
generateTerm(java.io.Writer out,
TNode term)
This convenience method uses the visitor pattern to generate a prover specific term. |
abstract void |
getProof(java.io.Writer out,
java.lang.String name,
TNode term)
This method allows a VC term (generated by using the visitor pattern), for example, to: be wrapped up as a prover assertion (eg. a lemma or theorem for the prover) universally quantify all free variables in the VC term |
abstract java.lang.String |
getTypeInfo(TypeInfo caller)
TypeInfo represents a single translation/mapping between an old
type name and the targeted prover type name.
|
abstract java.lang.String |
getVariableInfo(VariableInfo caller)
VariableInfo represents a single translation/mapping between an old
variable name and the targeted prover variable name.
|
abstract void |
init()
Used to initialise the variable and type maps. |
abstract java.lang.String |
labelRename(java.lang.String label)
This method is used to provide prover based renaming of the VC file name. |
abstract TNode |
rewrite(TNode tree)
This method allows an ESC/Java VC term to be simplified before it is translated to the target prover. |
protected abstract TVisitor |
visitor(java.io.Writer out)
The visitor pattern is used to map an ESC/Java VC term to a prover term. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ProverType()
| Method Detail |
public abstract java.lang.String labelRename(java.lang.String label)
label - The method based label that needs to be renamed.
protected abstract TVisitor visitor(java.io.Writer out)
throws java.io.IOException
vcGenerator uses this method to perform the mapping.
A typical implementation of this method will also need to extend the TVisitor class.
out - The stream to which we should write our visitor trail
java.io.IOException
public abstract void getProof(java.io.Writer out,
java.lang.String name,
TNode term)
throws java.io.IOException
name - name to be given to the proof assertion (eg. lemma or theorem)
java.io.IOExceptionpublic abstract java.lang.String getVariableInfo(VariableInfo caller)
VariableInfo represents a single translation/mapping between an old
variable name and the targeted prover variable name.
This method returns the target prover's variable name given one of these translations/mapplets.
caller - The specific variable name translation/mapplet we are to use.
public abstract java.lang.String getTypeInfo(TypeInfo caller)
TypeInfo represents a single translation/mapping between an old
type name and the targeted prover type name.
This method returns the target prover's type name given one of these translations/mapplets.
caller - The specific type name translation/mapplet we are to use.
public abstract void init()
public abstract Expr addTypeInfo(InitialState initState,
Expr tree)
Typed prover logics do not need to do anything here.
tree - the VC term to which typing predicates may need to be added.
public abstract TNode rewrite(TNode tree)
tree - a VC term to be simplified
protected abstract void generateDeclarations(java.io.Writer out,
java.util.HashMap variablesName)
throws java.io.IOException
out - The buffer to which we want to generate the declarations to.variablesName - The hashmap containing all the variables, usually TNode.variablesName.
java.io.IOException
public final void generateDeclarations(java.io.Writer out,
TNode term)
throws java.io.IOException
out - the stream to which the generated declarations are writtenterm - the term from which the declarations are to be obtained
java.io.IOException
public final void generateTerm(java.io.Writer out,
TNode term)
throws java.io.IOException
VcGenerator.getProof(Writer, String).
out - the stream to which the generated term is to be writtenterm - the term we wish to convert
java.io.IOException
|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||