|
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
escjava.vcGeneration.coq.CoqProver
This class is an implementations of the interface ProverType.
In order to handle the Coq theorem prover.
| Constructor Summary | |
CoqProver()
|
|
| Method Summary | |
Expr |
addTypeInfo(InitialState initState,
Expr tree)
This method is used by untyped prover logics to add typing predicates to the supplied VC term. |
private void |
coqRename(TypeInfo t)
Rename the type, ie. the name TypeInfo.old to
a proper Coq name in the variable TypeInfo.def |
private void |
coqRename(VariableInfo vi)
Rename the variable, ie. the name VariableInfo.old to
a proper Coq name in the variable VariableInfo.def.
|
void |
generateDeclarations(java.io.Writer s,
java.util.HashMap variablesNames)
Generates the declarations for the forall construct in the Coq Fashion, i.e. |
private void |
generatePureMethodsDeclarations(java.io.Writer s)
Generates the pure methods declarations |
void |
getProof(java.io.Writer out,
java.lang.String proofName,
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 |
java.lang.String |
getTypeInfo(TypeInfo caller)
TypeInfo represents a single translation/mapping between an old
type name and the targeted prover type name.
|
java.lang.String |
getVariableInfo(VariableInfo vi)
Returns a valid Coq name corresponding to the given VariableInfo. |
void |
init()
Defines predefined Coq types, and some predefined variables (ecReturn, ecThrow and XRES). |
java.lang.String |
labelRename(java.lang.String label)
This method is used to provide prover based renaming of the VC file name. |
java.lang.String |
removeInvalidChar(java.lang.String name)
Removes the invalid characters in Coq for a given String. |
TNode |
rewrite(TNode tree)
Tries to simplify the given tree using the class TProofTyperVisitor. |
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 escjava.vcGeneration.ProverType |
generateDeclarations, generateTerm |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CoqProver()
| Method Detail |
public java.lang.String labelRename(java.lang.String label)
ProverType
labelRename in class ProverTypelabel - The method based label that needs to be renamed.
public TVisitor visitor(java.io.Writer out)
throws java.io.IOException
ProverTypevcGenerator uses this method to perform the mapping.
A typical implementation of this method will also need to extend the TVisitor class.
visitor in class ProverTypeout - The stream to which we should write our visitor trail
TCoqVisitor.
java.io.IOException
public void getProof(java.io.Writer out,
java.lang.String proofName,
TNode term)
throws java.io.IOException
ProverType
getProof in class ProverTypeproofName - name to be given to the proof assertion (eg. lemma or theorem)
java.io.IOException
private void generatePureMethodsDeclarations(java.io.Writer s)
throws java.io.IOException
s - The output for the declarations.
java.io.IOExceptionpublic java.lang.String getTypeInfo(TypeInfo caller)
ProverTypeTypeInfo 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.
getTypeInfo in class ProverTypecaller - the type to translate to Coq.
public void init()
init in class ProverType
public Expr addTypeInfo(InitialState initState,
Expr tree)
ProverTypeTyped prover logics do not need to do anything here.
addTypeInfo in class ProverTypetree - the VC term to which typing predicates may need to be added.
public TNode rewrite(TNode tree)
TProofTyperVisitor.
rewrite in class ProverTypetree - the tree to simplify.private void coqRename(TypeInfo t)
TypeInfo.old to
a proper Coq name in the variable TypeInfo.def
t - the type name to rename.public java.lang.String getVariableInfo(VariableInfo vi)
getVariableInfo in class ProverTypevi - the variable info to analyse.
private void coqRename(VariableInfo vi)
VariableInfo.old to
a proper Coq name in the variable VariableInfo.def.
Stolen from the PVS plugin...
vi - the variable to rename.public java.lang.String removeInvalidChar(java.lang.String name)
name - The name where some invalid characters appear.
public void generateDeclarations(java.io.Writer s,
java.util.HashMap variablesNames)
throws java.io.IOException
generateDeclarations in class ProverTypes - The outputvariablesNames - the variables' names.
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 | ||||||||||