Skip navigation links
KeY 2.7.1589_4abe0e7c170fc61dd74a695a6efcf763b0f06898

Package de.uka.ilkd.key.java

This package contains classes that cover the Java programming language.

See: Description

Package de.uka.ilkd.key.java Description

This package contains classes that cover the Java programming language. The classes in the subpackages are mainly taken from the Recoder framework and made immutable. They are transformed into this data structure from a Recoder structure by Recoder2KeY or de.uka.ilkd.key.SchemaRecoder2KeY. However, in some details both data structures might differ more. The following explanations are adapted from the documentation of the Recoder framework.
Source and Program Elements
A SourceElement is a syntactical entity and not necessary a ModelElement, such as a Comment.

A ProgramElement is a SourceElement and a de.uka.ilkd.key.ModelElement. It is aware of its parent in the syntax tree, while a pure SourceElement is not considered as a member of the AST even though it is represented in the sources.

ProgramElements are further classified into TerminalProgramElements and NonTerminalProgramElements. While TerminalProgramElement is just a tag class, NonTerminalProgramElements know their AST children (while it is possible that they do not have any). A complete source file occurs as a CompilationUnit.

JavaSourceElement and JavaProgramElement are abstract classes defining standard implementations that already know their de.uka.ilkd.key.java.JavaProgramFactory.

Expressions and Statements
Expression and Statement are self-explanatory. A LoopInitializer is a special Statement valid as initializer of For loops. LoopInitializer is subtyped by ExpressionStatement and LocalVariableDeclaration).

Concrete classes and further abstractions are bundled in the de.uka.ilkd.key.java.expression and de.uka.ilkd.key.java.statement packages.

Syntax Tree Parents
There are a couple of abstractions dealing with properties of being a parent node.

These are TypeDeclarationContainer, ExpressionContainer, StatementContainer, ParameterContainer, NamedProgramElement and TypeReferenceContainer. A An ExpressionContainer contains Expressions, a StatementContainer contains Statements, a ParameterContainer (either a MethodDeclaration or a Catch statement) contains ParameterDeclarations. A NamedProgramElement is a subtype of NamedModelElement. A TypeReferenceContainer contains one or several names, but these are names of types that are referred to explicitely by a TypeReference.

References
A Reference is an explicite use of an entity. Most of these References are NameReferences and as such NamedProgramElements, e.g. the TypeReference. Subtypes of References are bundled in the de.uka.ilkd.key.java.reference package.

Modifiers and Declarations
Modifiers are (exclusively) used in the context of Declarations. Modifiers occur explicitly, since they occur as syntactical tokens that might be indented and commented. Declarations are either declarations of types or other entities such as MemberDeclaration or VariableDeclaration. Concrete Modifiers and Declarations are bundled in the de.uka.ilkd.key.java.declaration.modifier and de.uka.ilkd.key.java.declaration packages.
Skip navigation links
KeY 2.7.1589_4abe0e7c170fc61dd74a695a6efcf763b0f06898