Java Doc for Formula.java in  » Testing » KeY » de » uka » ilkd » key » proof » decproc » smtlib » 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.smtlib 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.uka.ilkd.key.proof.decproc.smtlib.Formula

All known Subclasses:   de.uka.ilkd.key.proof.decproc.smtlib.UninterpretedPredFormula,  de.uka.ilkd.key.proof.decproc.smtlib.FormulaVariable,  de.uka.ilkd.key.proof.decproc.smtlib.LetFormula,  de.uka.ilkd.key.proof.decproc.smtlib.FletFormula,  de.uka.ilkd.key.proof.decproc.smtlib.PredicateFormula,  de.uka.ilkd.key.proof.decproc.smtlib.QuantifierFormula,  de.uka.ilkd.key.proof.decproc.smtlib.ConnectiveFormula,  de.uka.ilkd.key.proof.decproc.smtlib.TruthValueFormula,
Formula
abstract public class Formula (Code)
Represents a formula as defined in the SMT-Lib specification, and specialized in one of the AUFLIA sublogics. These are QF_AUFLIA and AUFLIA, whereas QF_AUFLIA is the quantifier free version of AUFLIA. Thereby a formula represents an object which can be assigned a truth value, i.e. one predicate or many logical connected predicates.

This class is abstract because it is intended as a frame for realizing subclasses which specialize in representing one class of predicates in (QF_)-AUFLIA (e.g. uninterpreted predicates).

Formulae are immutable; their attribute values cannot be changed after they are created.

This class also contains methods with protected access intended to be used by realizing subclasses for convenience, as well as methods to access the lists of all uninterpreted functions and predicates contained in this formula, which are provided for the simple integration of terms and formulae and into benchmarks.
author:
   akuwertz
version:
   1.5, 12/06/2005 (Restructuring and further commenting)
See Also:    QF_AUFLIA
See Also:    AUFLIA
See Also:    SMT-LIB




Constructor Summary
protected  Formula(String operator, Formula[] forms, Term[] terms, boolean addThisUip)
     Sole constructor.
protected  Formula(String operator, Formula[] forms, Term[] terms)
     Sole constructor; added for convenience.

Method Summary
public  booleancontainsFormula(Formula f)
     Returns true if this Formula contains f as a subformula.

This implementation tries to determine containment by first checking if f equals this Formula.

public  booleancontainsTerm(Term t)
     Returns true if this Formula contains the Term t.

This implementation tries to determine containment recursively by calling containsTerm first on the subformulae of this Formula, then on its subterms, returning true if one of these subelements contains t.

If t is a TermVariable, this method will only check for free term variables, i.e.

public  booleanequals(Object o)
     Compares this Formula to the specified Object o.

This implementation tries to determine equality by first checking if o is an instance of Formula.

final public  StringgetOp()
    
final public  Formula[]getSubformulae()
    
final public  Term[]getSubterms()
    
final public  VectorgetUIF()
    
final public  VectorgetUIPredicates()
    
public  inthashCode()
     Returns an int value representing the hash code of this Formula.
final protected static  booleanisLegalIdentifier(String identifier)
     Determines if a given identifier represents a legal identifier symbol in (QF_)AUFLIA.
abstract public  FormulareplaceFormVar(FormulaVariable formVar, Formula replacement)
     Replaces all occurrences of a specified FormulaVariable by a specified Formula in a this Formula.
abstract public  FormulareplaceTermVar(TermVariable termVar, Term replacement)
     Replaces all occurrences of a specified TermVariable by a specified Term in a this Formula.
abstract public  StringtoString()
     Returns a String representation of this Formula, containing the String representation of each of its subformulae and/or subterms.
final protected static  VectortoVector(Object[] objects)
    


Constructor Detail
Formula
protected Formula(String operator, Formula[] forms, Term[] terms, boolean addThisUip)(Code)
Sole constructor. For invocation by constructors of realizing subclasses.

This explicit constructor sets the internal fields to the specified values or rather to values computed out of the given ones. Thereby the top-level operator and the subformulae and subterms are set directly, whereby the Vector of uninterpreted predicates and functions respectively are computed out of the uninterpreted predicates and functions contained in the subformulae and subterms.
Therefor all Formulae and Terms contained as subelements are searched for uninterpreted predicates (and functions respectively) and the results are merged into a Vector, eleminating duplicate entries.
The boolean addThisUip is a flag serving as indicator to the constructor that the calling subclass instance also wishes to be added to the Vector of uninterpreted predicates. If it is set to true, the calling instance will be added to the Vector of uninterpreted predicates as its first element.

This implementation checks for null pointers in the specified arguments. If a null pointer is found in the top-level operator op, all fields will be set to null without throwing any exceptions. This is done to enable realizing subclasses to throw specific exceptions on their part. It implicates that every subclass realizing this class must check op for being a null pointer, and, if so, throw an exception. Otherwise the methods defined in this class could fail with a NullPointerException, if called on the created subclass instance.
The same holds for the Formulae and Terms contained in the subformulae and subterms arrays. If one of the specified arrays contains any null pointers, all fields of this Formula instance will become undefined, without throwing an exception. Realizing subclasses therefore have to check or ensure that forms and terms contain no null pointers; otherwise the methods defined in this class could fail with a NullPointerException.
In contrary to this, null pointers are allowed for the array objects theirselves. This is done for convenience and has to same effects as empty arrays would have.
Parameters:
  operator - the top-level operator of this Formula
Parameters:
  forms - the array of subformulae for this Formula
Parameters:
  terms - the array of subterms for this Formula
Parameters:
  addThisUip - a flag; if set to true, the calling subclass instance will beadded the to uninterpreted predicate Vector of this Formula




Formula
protected Formula(String operator, Formula[] forms, Term[] terms)(Code)
Sole constructor; added for convenience.

Represents only a shorter form of the general constructor, with addThisUip set to false by default.
Parameters:
  operator - the top-level operator of this Formula
Parameters:
  forms - the array of subformulae for this Formula
Parameters:
  terms - the array of subterms for this Formula
See Also:   de.uka.ilkd.key.proof.decproc.smtlib.Formula.Formula(StringFormula[]Term[]boolean)





Method Detail
containsFormula
public boolean containsFormula(Formula f)(Code)
Returns true if this Formula contains f as a subformula.

This implementation tries to determine containment by first checking if f equals this Formula. If not, it calls containsFormula recursively first on the subformulae of this Formula, then on its subterms, returning true if one of these subelements contains f

If this method is called on an FletFormula with the FormulaVariable which will be semantically replaced in the FletFormula as argument, it will only check the replaced Formula for occurences of f
Parameters:
  f - the Formula to be checked for containment in this Formula true if this Formula contains f
See Also:   FletFormula.containsFormula(Formula)




containsTerm
public boolean containsTerm(Term t)(Code)
Returns true if this Formula contains the Term t.

This implementation tries to determine containment recursively by calling containsTerm first on the subformulae of this Formula, then on its subterms, returning true if one of these subelements contains t.

If t is a TermVariable, this method will only check for free term variables, i.e. if this method is called on a QuantifierFormula or a LetFormula with the quantified or rather bound TermVariable as argument, it will return false
Parameters:
  t - the Term to be checked for containment in this Formula true if this Formula contains t
See Also:   QuantifierFormula.containsTerm(Term)
See Also:   LetFormula.containsTerm(Term)




equals
public boolean equals(Object o)(Code)
Compares this Formula to the specified Object o.

This implementation tries to determine equality by first checking if o is an instance of Formula. If so, it checks if the top-level operator of o is equal to that of this Formula. If true, it checks if all subformulae and subterms contained in this Formula are equal to those contained in o, and in the same order. If all these constraints are satisfied, true is returned.

Overriding methods are recommended to check for object equality in addition; this is not done in this implementation.
Parameters:
  o - the Object to compare with true if this Formula is the same as the specified Object;otherwise false.




getOp
final public String getOp()(Code)
Returns the top-level operator of this Formula the top-level operator of this Formula



getSubformulae
final public Formula[] getSubformulae()(Code)
Returns a shallow copy of the subformulae array of this Formula the array of subformulae of this Formula



getSubterms
final public Term[] getSubterms()(Code)
Returns a shallow copy of the subterms array of this Formula the array of subterms of this Formula



getUIF
final public Vector getUIF()(Code)
Returns a Vector of all uninterpreted functions contained in this Formula as a shallow copy a Vector of all uninterpreted functions contained in this Formula



getUIPredicates
final public Vector getUIPredicates()(Code)
Returns a Vector of all uninterpreted predicates contained in this Formula a Vector of all uninterpreted predicates contained in this Formula



hashCode
public int hashCode()(Code)
Returns an int value representing the hash code of this Formula.

The hash code for a Formula is calculated during its creation. This is done by combining the hash code of its operator with the hash codes of, if available, its subformulae and its subterms to a new hash code. The order of subformulae and subterms matters for this implementation the hashCode of this Term




isLegalIdentifier
final protected static boolean isLegalIdentifier(String identifier)(Code)
Determines if a given identifier represents a legal identifier symbol in (QF_)AUFLIA.

An identifier is legal if it begins with a letter and consists only of letters, digits and the characters '.' , '_' and ''' (single quotation mark)
Parameters:
  identifier - the String to be checked true if the specified String represents a legal identifier symbol; otherwise false
throws:
  NullPointerException - if identifier is null




replaceFormVar
abstract public Formula replaceFormVar(FormulaVariable formVar, Formula replacement)(Code)
Replaces all occurrences of a specified FormulaVariable by a specified Formula in a this Formula.

Thereby this Formula and the returned replaced Formula share the same objects in their fields, except for those objects which contained the specified FormulaVariable.
This implicates that if formVar is not contained in this Formula, this Formula is returned without changes.
Parameters:
  formVar - the FormulaVariable to be replaced
Parameters:
  replacement - the Formula used to replace formVar the Formula obtained by replacing every (free) occurence of formVarby replacement in this Formula




replaceTermVar
abstract public Formula replaceTermVar(TermVariable termVar, Term replacement)(Code)
Replaces all occurrences of a specified TermVariable by a specified Term in a this Formula.

Thereby this Formula and the returned replaced Formula share the same objects in their fields, except for those objects which contained the specified TermVariable.
This implicates that if termVar is not contained in this Formula, this Formula is returned without changes.
Parameters:
  termVar - the TermVariable to be replaced
Parameters:
  replacement - the Term used to replace termVar the Formula obtained by replacing every (free) occurence of termVarby replacement in this Formula




toString
abstract public String toString()(Code)
Returns a String representation of this Formula, containing the String representation of each of its subformulae and/or subterms. The returned String is formatted and can be parsed according to the SMT-Lib grammar specification (chapter seven, "Concrete Syntax").
See Also:    * The SMT-LIB Standard: Version 1.1 a String representation of this Formula



toVector
final protected static Vector toVector(Object[] objects)(Code)
Converts an array into a Vector, preserving element order
Parameters:
  objects - The array which should be converted into a Vector a Vector containing all the Objects in the specified array,in the same order



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object o)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify() throws IllegalMonitorStateException(Code)(Java Doc)
final public void notifyAll() throws IllegalMonitorStateException(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait() throws IllegalMonitorStateException, InterruptedException(Code)(Java Doc)
final public void wait(long ms) throws IllegalMonitorStateException, InterruptedException(Code)(Java Doc)
final public void wait(long ms, int ns) throws IllegalMonitorStateException, InterruptedException(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.