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


java.lang.Object
   de.uka.ilkd.key.pp.NotationInfo

NotationInfo
public class NotationInfo (Code)

Stores the mapping from operators to Notation s. Each Notation represents the concrete syntax for some de.uka.ilkd.key.logic.op.Operator . The LogicPrinter asks the NotationInfo to find out which Notation to use for a given term.

The Notation associated with an operator might change. New Notations can be added. Support for infix notations in case of function symbols like +, -, *, /, <, >, etc. is added by class de.uka.ilkd.key.pp.PresentationFeatures (that has historical reasons)

The next lines describe a general rule how to determine priorities and associativities: One thing we need to know from the pretty printer: Given a term t containg s as proper subterm. Then s is printed in parentheses when the priority of the top level symbol of s is strict less than the associativity of the position where s occurs. For example:

Let the priority of AND be 30 and the associativities for each of its subterms be 40; ORs priority is 20 and the associativites are both 30 then

  • formula (p & q) | r is pretty printed as p & q | r as the priority of & is 30 which is (greater or) equal than the associativity of ORs left subterm which is 30.
  • In contrast the formula p & (q | r) is pretty printed as p & (q | r) as the priority of OR is 20 which is less than the associativity of ANDs left subterm, which is 40.
A general rule to determine the correct priority and associativity is to use: Grammar rules whose derivation delivers a syntactical correct logic term should follow a standard numbering scheme, which is used as indicator for priorities and associativites, e.g. by simply reading the grammar rule
term60 ::= term70 (IMP term70)?
we get the priority of IMP, which is 60. The associativities of IMPs subterms are not much more difficult to determine, namely the left subterm has associativity 70 and in this case its the same for the right subterm (70).

There are exceptional cases for

  • infix function symbols that are left associative e.g. -, +
    term90 ::= term100 (PLUS term100)*
    then the associative for the right subterm is increased by 1, i.e. here we have a priority of 90 for PLUS as infix operator, a left associativity of 100 and a right associativity of 101
  • update and substituition terms: for them their associativity is determined dynamically by the pretty printer depending if it is applied on a formula or term. In principal there should be two different rules in the parser as then we could reuse the general rule from above, but there are technical reasons which causes this exception.
  • some very few rules do not follow the usual parser design e.g. like
    R_PRIO ::= SubRule_ASS1 | SubRule_ASS2
    where
    SubRule_ASS2 ::= OP SubRule_ASS1
    Most of these few rules could in general be rewritten to fit the usual scheme e.g. as
    R_PRIO ::= (OP)? SubRule_ASS1
    using the priorities and associativities of the so rewritten rules (instead of rewriting them actually) is a way to cope with them.



Constructor Summary
public  NotationInfo()
     Create a new NotationInfo.

Method Summary
public  voidcreateCharLitNotation(Operator op)
     Registers a character literal notation for a given operator.
public  voidcreateConstantNotation(String internalName, String token)
     Used for OCL Simplification.
public  voidcreateInfixNotation(Operator op, String token)
    
public  voidcreateInfixNotation(Operator op, String token, int prio, int lass, int rass)
    
final public static  NotationInfocreateInstance()
     Factory method: creates a new NotationInfo instance.
public  voidcreateNumLitNotation(Operator op)
     Registers a number literal notation for a given operator.
public  voidcreateOCLCollOpBoundVarNotation(String token)
     Used for OCL Simplification.
public  voidcreateOCLCollOpNotation(String token)
     Used for OCL Simplification.
public  voidcreateOCLCollectionNotation(String internalName, String token)
     Used for OCL Simplification.
public  voidcreateOCLDotOpNotation(String token)
     Used for OCL Simplification.
public  voidcreateOCLIfNotation(String token)
     Used for OCL Simplification.
public  voidcreateOCLInfixNotation(String internalName, String token, int prio, int assLeft, int assRight)
     Used for OCL Simplification.
public  voidcreateOCLInvariantNotation(String token)
     Used for OCL Simplification.
public  voidcreateOCLIterateNotation(String token)
     Used for OCL Simplification.
public  voidcreateOCLListOfInvariantsNotation(String token)
     Used for OCL Simplification.
public  voidcreateOCLPrefixNotation(String internalName, String token, int prio, int ass)
     Used for OCL Simplification.
public  voidcreateOCLWrapperNotation(String token)
     Used for OCL Simplification.
public  voidcreatePrefixNotation(Operator op, String token)
    
public  voidcreateStringLitNotation(Operator op, Operator eps)
    
public  AbbrevMapgetAbbrevMap()
    
public  NotationgetNotation(Operator op, Services services)
     Get the Notation for a given Operator.
public  voidsetAbbrevMap(AbbrevMap am)
    
public  voidsetBackToDefault()
     Set all notations back to default.


Constructor Detail
NotationInfo
public NotationInfo()(Code)
Create a new NotationInfo. Do not call this constructor directly. Use the factory method createInstance instead.




Method Detail
createCharLitNotation
public void createCharLitNotation(Operator op)(Code)
Registers a character literal notation for a given operator. This is done for the `C' operator which marks character literals. A term C(3(2(#))) gets printed simply as the character corresponding to the unicode value 23 (really 23 and not 32, see integer literals)
Parameters:
  op - the operator



createConstantNotation
public void createConstantNotation(String internalName, String token)(Code)
Used for OCL Simplification. Syntax for self, true, false, Set{}, etc.



createInfixNotation
public void createInfixNotation(Operator op, String token)(Code)
Registers an infix notation for a given operator
Parameters:
  op - the operator
Parameters:
  token - the string representing the operator



createInfixNotation
public void createInfixNotation(Operator op, String token, int prio, int lass, int rass)(Code)
Registers an infix notation for a given operator with given priority and associativity
Parameters:
  op - the operator
Parameters:
  token - the string representing the operator



createInstance
final public static NotationInfo createInstance()(Code)
Factory method: creates a new NotationInfo instance. The actual implementation depends on system properties or service entries.



createNumLitNotation
public void createNumLitNotation(Operator op)(Code)
Registers a number literal notation for a given operator. This is done for the `Z' operator which marks number literals. A term Z(3(2(#))) gets printed simply as 23.
Parameters:
  op - the operator



createOCLCollOpBoundVarNotation
public void createOCLCollOpBoundVarNotation(String token)(Code)
Used for OCL Simplification. Syntax for forAll(), exists(), etc.



createOCLCollOpNotation
public void createOCLCollOpNotation(String token)(Code)
Used for OCL Simplification. Syntax for size(), includes(), etc.



createOCLCollectionNotation
public void createOCLCollectionNotation(String internalName, String token)(Code)
Used for OCL Simplification. Syntax for Set{...}, Bag{...}, and Sequence{...}.



createOCLDotOpNotation
public void createOCLDotOpNotation(String token)(Code)
Used for OCL Simplification. Syntax for supertypes(), oclIsNew(), etc.



createOCLIfNotation
public void createOCLIfNotation(String token)(Code)
Used for OCL Simplification. Syntax for if-then-else-endif.



createOCLInfixNotation
public void createOCLInfixNotation(String internalName, String token, int prio, int assLeft, int assRight)(Code)
Used for OCL Simplification. Syntax for "and", "or", "+", "<", etc.



createOCLInvariantNotation
public void createOCLInvariantNotation(String token)(Code)
Used for OCL Simplification.



createOCLIterateNotation
public void createOCLIterateNotation(String token)(Code)
Used for OCL Simplification. Syntax for iterate().



createOCLListOfInvariantsNotation
public void createOCLListOfInvariantsNotation(String token)(Code)
Used for OCL Simplification.



createOCLPrefixNotation
public void createOCLPrefixNotation(String internalName, String token, int prio, int ass)(Code)
Used for OCL Simplification. Syntax for "not" and "-".



createOCLWrapperNotation
public void createOCLWrapperNotation(String token)(Code)
Used for OCL Simplification.



createPrefixNotation
public void createPrefixNotation(Operator op, String token)(Code)
Registers a prefix notation for a given operator
Parameters:
  op - the operator
Parameters:
  token - the string representing the operator



createStringLitNotation
public void createStringLitNotation(Operator op, Operator eps)(Code)



getAbbrevMap
public AbbrevMap getAbbrevMap()(Code)



getNotation
public Notation getNotation(Operator op, Services services)(Code)
Get the Notation for a given Operator. If no notation is registered, a Function notation is returned.



setAbbrevMap
public void setAbbrevMap(AbbrevMap am)(Code)



setBackToDefault
public void setBackToDefault()(Code)
Set all notations back to default.



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.