Java Doc for TermTranslationVisitor.java in  » Testing » KeY » de » uka » ilkd » key » proof » decproc » translation » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » KeY » de.uka.ilkd.key.proof.decproc.translation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


de.uka.ilkd.key.proof.decproc.translation.TranslationVisitor
   de.uka.ilkd.key.proof.decproc.translation.TermTranslationVisitor

TermTranslationVisitor
public class TermTranslationVisitor extends TranslationVisitor (Code)
This class implements a visitor used to translate Terms in KeY into Formulae in SMT-LIB.

This implementation is intended for KeY Terms of Sort Formula. To translate a given Term, its execPostOrder method should be called with an instance of this class as argument. The translation result can then be fetched using the getTranslationResult method of this class.

Prior to translating a Term with this class, its translatability should be checked by using the PreTranslationVisitor subclass.

This class also provides a factory method that can be used to get an instance of this class. It implements the singleton pattern and allows reusing the same visitor object for multiple successive translations
author:
   akuwertz
version:
   1.5, 12/10/2006 (Introduced new superclass 'TranslationVisitor')




Constructor Summary
public  TermTranslationVisitor(Services services, boolean useQuantifier)
     Sole constructor.

Method Summary
public  voidclearTypePreds()
    
protected  FormulacreateTypePredLv(Sort type, TermVariable termVar)
    
protected  voidcreateTypePredUif(Sort type, String funcName, int argCount)
    
public  VectorgetCreatedTypePreds()
    
protected  TermgetCurrentTerm()
    
public  VectorgetHierarchyPreds()
    
public static synchronized  TranslationVisitorgetInstance()
     A factory method returning a TermTranslationVisitor instance.

This method uses the Singleton pattern.

protected  ObjectgetResult()
    
protected  ServicesgetServices()
    
protected  Object[]getTranslatedArguments(int count)
     Returns an Object array containing the translation of the last count translated Terms.
Thereby the latest translation has the highest index.
protected  booleanisReusable()
     Returns true if this TermTranslationVisitor is ready for the next translation process.
public  voidreset()
    
public static  voidsetServices(Services services)
    
public static  voidsetTranslateQuantifers(boolean useQuantifiers)
    
protected  TermVariabletranslateLvManually(LogicVariable lv)
     Translates a given LogicVariable into its SMT-LIB representation.
public  voidvisit(Term t)
     The visit method of this TermTranslationVisitor.


Constructor Detail
TermTranslationVisitor
public TermTranslationVisitor(Services services, boolean useQuantifier)(Code)
Sole constructor.

Creates a new TermTranslationVisitor and initialises it with all known translation rules.
If useQuantifier is set to true, KeY Terms containing quantifier operators will be translated; otherwise, they are declared untranslatable
Parameters:
  services - the common Services of the KeY prover
Parameters:
  useQuantifier - boolean that determines if quantifiers will be translated or not





Method Detail
clearTypePreds
public void clearTypePreds()(Code)
Empties the type predicate storages.
All type predicates that have been created during Term translation processes since either the creation of this instance or the last call to this method will be deleted



createTypePredLv
protected Formula createTypePredLv(Sort type, TermVariable termVar)(Code)



createTypePredUif
protected void createTypePredUif(Sort type, String funcName, int argCount)(Code)



getCreatedTypePreds
public Vector getCreatedTypePreds()(Code)
Returns a Vector containing all type predicates created during all Term translation process since either to creation of this instance or the last call to the clearTypePreds method the Vector of created type predicates
throws:
  IllegalStateException - if this method is called during an unfinished translationprocess or before any translation was initiated
See Also:   TermTranslationVisitor.clearTypePreds()
See Also:   



getCurrentTerm
protected Term getCurrentTerm()(Code)
Returns the currently translated Term the currently translated Term



getHierarchyPreds
public Vector getHierarchyPreds()(Code)
Returns a Vector containing all hierarchy predicates needed for the current translation.
The current translation thereby means all Term translation processes since either the creation of this instance or the last call to the clearTypePreds method the Vector of created hierarchy predicates
throws:
  IllegalStateException - if this method is called during an unfinished translationprocess or before any translation was initiated
See Also:   TermTranslationVisitor.clearTypePreds()
See Also:   



getInstance
public static synchronized TranslationVisitor getInstance()(Code)
A factory method returning a TermTranslationVisitor instance.

This method uses the Singleton pattern. It is intended to enable the reuse of an already created visitor object after a complete translation. Use this method to get an instance of TermTranslationVisitor if there is no need for concurrency

A translation process is considered complete after its result has been fetched by the getTranslationResult method of this class

To specify whether the returned instance should translate quantifiers or not, the setTranslateQuantifiers method must be called prior to calling this method.
To specify the Services the returned instance should use, the setServices method must be called prior to calling this method a TermTranslationVisitor instance
throws:
  NullPointerException - if no Services have been set with setServices
throws:
  IllegalStateException - if the cached TermTranslationVisitor instance is notconsidered reusable at this point of time
See Also:   TranslationVisitor.getInstance
See Also:   TermTranslationVisitor.setTranslateQuantifers(boolean)
See Also:   TermTranslationVisitor.setServices(Services)
See Also:   




getResult
protected Object getResult()(Code)
Returns the translation of a (logic) Term of Sort Formula, which was built by successive calls of the visit method through the execPostOrder method on this Term.
Also resets this TermTranslationVisitor for further reuse, so that this method can only be called once per Term translation the translation of the Term on which the execPostOrder method was called with this TermTranslationvisitor as argument



getServices
protected Services getServices()(Code)
Returns the KeY Services used for translation the KeY Services used for translation



getTranslatedArguments
protected Object[] getTranslatedArguments(int count)(Code)
Returns an Object array containing the translation of the last count translated Terms.
Thereby the latest translation has the highest index. All returned translations are removed from their internal storage
Parameters:
  count - the number of translations that should be returned an Object array containing the last count stored translations
throws:
  IndexOutOfBoundsException - if count is higher than the count of currently stored
See Also:   TermTranslationVisitor.visit(Term)



isReusable
protected boolean isReusable()(Code)
Returns true if this TermTranslationVisitor is ready for the next translation process.

This holds under the following conditions: - This instance was in reusable state and no translation has yet been initiated - The reset was called in an arbitrary state - The current translation has finish and the getTranslationResult method was called on this instance true if this TranslationVisitor is ready to be reused; otherwise false




reset
public void reset()(Code)
Resets this TermTranslationVisitor for reuse.
After execution of this method the state of this TermTranslationVisistor is equals to that of a newly created TermTranslationVisitor



setServices
public static void setServices(Services services)(Code)
Sets the Services that should be used by a TermTranslationVisitor instance retrieved by the getInstance method
Parameters:
  services - Services to be used
See Also:   TermTranslationVisitor.getInstance()



setTranslateQuantifers
public static void setTranslateQuantifers(boolean useQuantifiers)(Code)
Determines whether a TermTranslationVisitor instance retrieved by the getInstance method translated quantifiers or not
Parameters:
  useQuantifiers - specifies if quantifiers should be translated or not
See Also:   TermTranslationVisitor.getInstance()



translateLvManually
protected TermVariable translateLvManually(LogicVariable lv)(Code)
Translates a given LogicVariable into its SMT-LIB representation.

This method uses the same class to translate the given LogicVariable as the visit method but can be applied to a single LogicVariable instead of a whole Term.
Parameters:
  lv - the LogicVariable to be translated manually the SMT-LIB representation of the translated LogicVariable




visit
public void visit(Term t)(Code)
The visit method of this TermTranslationVisitor. Takes a Term and tries to translate its Operator into SMT-LIB syntax.

The translation result is stored in an internal stack for further processing
See Also:   de.uka.ilkd.key.logic.Visitor.visit(de.uka.ilkd.key.logic.Term)
See Also:   TermTranslationVisitor.getTranslationResult()




Fields inherited from de.uka.ilkd.key.proof.decproc.translation.TranslationVisitor
final protected static String NoReuseStateException(Code)(Java Doc)
final protected static Logger logger(Code)(Java Doc)
protected String loggingSubclass(Code)(Java Doc)
final protected static String translationNotFinishedException(Code)(Java Doc)
protected IOperatorTranslation[] translationRules(Code)(Java Doc)

Methods inherited from de.uka.ilkd.key.proof.decproc.translation.TranslationVisitor
public static synchronized TranslationVisitor getInstance()(Code)(Java Doc)
abstract protected Object getResult()(Code)(Java Doc)
final public Object getTranslationResult()(Code)(Java Doc)
protected boolean isReusable()(Code)(Java Doc)
final protected String logThis(String toLog)(Code)(Java Doc)
public void reset()(Code)(Java Doc)
final protected void setTranslationRules(ListOfIOperatorTranslation rules)(Code)(Java Doc)
final public void subtreeEntered(Term subtreeRoot)(Code)(Java Doc)
final public void subtreeLeft(Term subtreeRoot)(Code)(Java Doc)
abstract public void visit(Term t)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.