Java AST and Program Element Facts

JTransformer represents the Abstract Syntax Tree (AST) of Java and information about projects, directories and files by Prolog facts that we call Program Element Facts (PEFs).

Representation of Java abstract syntax tree by Program Element Facts.
Representation of Java abstract syntax tree by Program Element Facts.

PEF Structure

Language independent source representation versus Java-specific elements

The PEF types ending in a capital S (sourceFolderS, projectS, fileS) represent the language-independent organisation of Source code in projects, directories and files. All other PEF types represent language-specific elements of the Java AST. Their name ends in T, which is a mnemonic for Tree.

See the Migration guide for a more detailed discussion of language-independent versus language-dependent elements.

→ Read more...

Notation

Throughout this documentation the following notational conventions are used:

→ Read more...

PEF by Example

The PEF representation of a simple Java program gives you an idea how the logic-based representation works.

→ Read more...

Java PEF Specification

For each AST node type there is a separate Program Element Fact (PEF) type. This page lists all the PEF types, which refer to JTransformer 2.9 1). The structure and semantics of each PEF type is described in detail on a separate page, linked below.

See also the Language-independent PEF Specification.

→ Read more...

Last modified: 2017/08/29 14:30
*