diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9ede322d..447c8e66 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -10,6 +10,7 @@ on: branches: - main - staging + - multi-weaver push: branches: @@ -178,7 +179,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: ['22.x'] + node-version: ['25.x', '24.x'] os: [ubuntu-26.04, windows-2022, macos-latest] runs-on: ${{ matrix.os }} diff --git a/Fortran-JS/.gitignore b/Fortran-JS/.gitignore index f561f85c..b5831c5c 100644 --- a/Fortran-JS/.gitignore +++ b/Fortran-JS/.gitignore @@ -1,122 +1,9 @@ ##### User-added ##### woven_code/ -/api -/code +node_modules/ package-lock.json java-binaries fortran_sources # Extensions ltex.dictionary.* -###################### - -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Python cache files -__pycache__/ - -# Fujitsu script results -metafor_fujitsu_results/ diff --git a/Fortran-JS/README.md b/Fortran-JS/README.md index b08e28b6..d4e9f6e2 100644 --- a/Fortran-JS/README.md +++ b/Fortran-JS/README.md @@ -2,5 +2,13 @@ A Fortran source-to-source compiler running on top of Node.js. -Current version only works on Node 20 and 22. +## Development + +Build the Java weaver first — `npm run build-interfaces` needs the `FortranWeaver.json` specification generated by the WeaverGen2 Gradle task: + +```bash +gradle -p FortranWeaver installDist +``` + +The `installDist` task synchronizes the complete FortranWeaver distribution into `./Fortran-JS/java-binaries`. The generated directory is refreshed automatically, including when `installDist` is invoked directly, so do not copy or edit its contents manually. Local `npm pack` and `npm publish` also validate that `java-binaries` is a real, populated directory before creating a package. diff --git a/Fortran-JS/src-api/FortranJavaTypes.ts b/Fortran-JS/api/FortranJavaTypes.ts similarity index 54% rename from Fortran-JS/src-api/FortranJavaTypes.ts rename to Fortran-JS/api/FortranJavaTypes.ts index bc85844a..de7d7223 100644 --- a/Fortran-JS/src-api/FortranJavaTypes.ts +++ b/Fortran-JS/api/FortranJavaTypes.ts @@ -1,10 +1,12 @@ -import JavaTypes, {JavaClasses} from "@specs-feup/lara/api/lara/util/JavaTypes.js"; +import JavaTypes, { + type JavaClasses, +} from "@specs-feup/lara/api/lara/util/JavaTypes.ts"; -// eslint-disable-next-line @typescript-eslint/no-namespace +// oxlint-disable-next-line typescript/no-namespace export namespace FortranJavaClasses { - /* eslint-disable @typescript-eslint/no-empty-object-type */ + /* oxlint-disable typescript/no-empty-object-type */ export interface AstFactory extends JavaClasses.JavaClass {} - /* eslint-enable @typescript-eslint/no-empty-object-type */ + /* oxlint-enable typescript/no-empty-object-type */ } export default class FortranJavaTypes { @@ -13,4 +15,4 @@ export default class FortranJavaTypes { "pt.up.fe.specs.fortran.weaver.importable.AstFactory" ) as FortranJavaClasses.AstFactory; } -} \ No newline at end of file +} diff --git a/Fortran-JS/src-api/FortranJoinPoints.ts b/Fortran-JS/api/FortranJoinPoints.ts similarity index 78% rename from Fortran-JS/src-api/FortranJoinPoints.ts rename to Fortran-JS/api/FortranJoinPoints.ts index ea779c03..3ec69b5d 100644 --- a/Fortran-JS/src-api/FortranJoinPoints.ts +++ b/Fortran-JS/api/FortranJoinPoints.ts @@ -1,61 +1,67 @@ -import * as Joinpoints from "./Joinpoints.js"; -import {unwrapJoinPoint, wrapJoinPoint} from "@specs-feup/lara/api/LaraJoinPoint.js"; -import FortranJavaTypes from "./FortranJavaTypes.js"; -import {flattenArgsArray} from "@specs-feup/lara/api/lara/core/LaraCore.js"; +import * as Joinpoints from "./Joinpoints.ts"; +import { unwrapJoinPoint, wrapJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.ts"; +import Weaver from "@specs-feup/lara/api/weaver/Weaver.ts"; +import FortranJavaTypes from "./FortranJavaTypes.ts"; +import { flattenArgsArray } from "@specs-feup/lara/api/lara/core/LaraCore.ts"; export default class FortranJoinPoints { static ompLoopConstruct(loop: Joinpoints.DoStatement, clauses: Joinpoints.OmpClause[]): Joinpoints.OmpLoopConstruct { return wrapJoinPoint(FortranJavaTypes.AstFactory.ompLoopConstruct( + Weaver.getWeaverEngine(), unwrapJoinPoint(loop), flattenArgsArray(clauses).map(unwrapJoinPoint) - )); + )); } static emptyOmpLoopConstruct(): Joinpoints.OmpLoopConstruct { - return wrapJoinPoint(FortranJavaTypes.AstFactory.emptyOmpLoopConstruct()); + return wrapJoinPoint(FortranJavaTypes.AstFactory.emptyOmpLoopConstruct(Weaver.getWeaverEngine())); } static ompPrivateClause(dataRefs: Joinpoints.DataRef[]): Joinpoints.OmpDataSharingClause { return wrapJoinPoint(FortranJavaTypes.AstFactory.ompPrivateClause( + Weaver.getWeaverEngine(), flattenArgsArray(dataRefs).map(unwrapJoinPoint) )); } static dataRef(name: string): Joinpoints.DataRef { - return wrapJoinPoint(FortranJavaTypes.AstFactory.dataRef(name)); + return wrapJoinPoint(FortranJavaTypes.AstFactory.dataRef(Weaver.getWeaverEngine(), name)); } static useStatement(moduleName: string): Joinpoints.UseStatement { - return wrapJoinPoint(FortranJavaTypes.AstFactory.useStatement(moduleName)); + return wrapJoinPoint(FortranJavaTypes.AstFactory.useStatement(Weaver.getWeaverEngine(), moduleName)); } static ompReductionClause(operator: string, dataRefs: Joinpoints.DataRef[]): Joinpoints.OmpReductionClause { return wrapJoinPoint(FortranJavaTypes.AstFactory.ompReductionClause( + Weaver.getWeaverEngine(), operator, flattenArgsArray(dataRefs).map(unwrapJoinPoint) )); } static emptyOmpBlockConstruct(): Joinpoints.OmpBlockConstruct { - return wrapJoinPoint(FortranJavaTypes.AstFactory.emptyOmpBlockConstruct()); + return wrapJoinPoint(FortranJavaTypes.AstFactory.emptyOmpBlockConstruct(Weaver.getWeaverEngine())); } static execution(stmts: Joinpoints.ExecutableStatement[]): Joinpoints.Execution { return wrapJoinPoint(FortranJavaTypes.AstFactory.execution( + Weaver.getWeaverEngine(), flattenArgsArray(stmts).map(unwrapJoinPoint) )); } static ompOrderedClause(value: number): Joinpoints.OmpOrderedClause { - return wrapJoinPoint(FortranJavaTypes.AstFactory.ompOrderedClause(value)); + return wrapJoinPoint(FortranJavaTypes.AstFactory.ompOrderedClause(Weaver.getWeaverEngine(), value)); } static intLiteral(value: number): Joinpoints.IntLiteral { - return wrapJoinPoint(FortranJavaTypes.AstFactory.intLiteral(value)); + return wrapJoinPoint(FortranJavaTypes.AstFactory.intLiteral(Weaver.getWeaverEngine(), value)); } static binaryOperatorAdd(lhs: Joinpoints.Expr, rhs: Joinpoints.Expr): Joinpoints.BinaryOperator { return wrapJoinPoint(FortranJavaTypes.AstFactory.binaryOperatorAdd( + Weaver.getWeaverEngine(), unwrapJoinPoint(lhs), unwrapJoinPoint(rhs) )); @@ -63,6 +69,7 @@ export default class FortranJoinPoints { static binaryOperatorSubtract(lhs: Joinpoints.Expr, rhs: Joinpoints.Expr): Joinpoints.BinaryOperator { return wrapJoinPoint(FortranJavaTypes.AstFactory.binaryOperatorSubtract( + Weaver.getWeaverEngine(), unwrapJoinPoint(lhs), unwrapJoinPoint(rhs) )); @@ -70,6 +77,7 @@ export default class FortranJoinPoints { static binaryOperatorMultiply(lhs: Joinpoints.Expr, rhs: Joinpoints.Expr): Joinpoints.BinaryOperator { return wrapJoinPoint(FortranJavaTypes.AstFactory.binaryOperatorMultiply( + Weaver.getWeaverEngine(), unwrapJoinPoint(lhs), unwrapJoinPoint(rhs) )); @@ -77,6 +85,7 @@ export default class FortranJoinPoints { static binaryOperatorDivide(lhs: Joinpoints.Expr, rhs: Joinpoints.Expr): Joinpoints.BinaryOperator { return wrapJoinPoint(FortranJavaTypes.AstFactory.binaryOperatorDivide( + Weaver.getWeaverEngine(), unwrapJoinPoint(lhs), unwrapJoinPoint(rhs) )); @@ -84,17 +93,19 @@ export default class FortranJoinPoints { static rangeLoopControl(var_: Joinpoints.DataRef, lower: Joinpoints.Expr, upper: Joinpoints.Expr): Joinpoints.RangeLoopControl { return wrapJoinPoint(FortranJavaTypes.AstFactory.rangeLoopControl( + Weaver.getWeaverEngine(), unwrapJoinPoint(var_), unwrapJoinPoint(lower), unwrapJoinPoint(upper) )); } static doStatement(control: Joinpoints.RangeLoopControl): Joinpoints.DoStatement { - return wrapJoinPoint(FortranJavaTypes.AstFactory.doStatement(unwrapJoinPoint(control))); + return wrapJoinPoint(FortranJavaTypes.AstFactory.doStatement(Weaver.getWeaverEngine(), unwrapJoinPoint(control))); } static intrinsicCall(name: string, args: Joinpoints.Expr[]): Joinpoints.Expr { return wrapJoinPoint(FortranJavaTypes.AstFactory.intrinsicCall( + Weaver.getWeaverEngine(), name, args.map(unwrapJoinPoint) )); } -} \ No newline at end of file +} diff --git a/Fortran-JS/src-api/Joinpoints.ts b/Fortran-JS/api/Joinpoints.ts similarity index 87% rename from Fortran-JS/src-api/Joinpoints.ts rename to Fortran-JS/api/Joinpoints.ts index 55783f5c..2a3b2a9f 100644 --- a/Fortran-JS/src-api/Joinpoints.ts +++ b/Fortran-JS/api/Joinpoints.ts @@ -1,5 +1,5 @@ /////////////////////////////////////////////////// -// This file is generated by build-interfaces.js // +// This file is generated by build-interfaces.ts // /////////////////////////////////////////////////// import { @@ -7,62 +7,63 @@ import { registerJoinpointMapper, wrapJoinPoint, unwrapJoinPoint, -} from "@specs-feup/lara/api/LaraJoinPoint.js"; + InsertPosition, +} from "@specs-feup/lara/api/LaraJoinPoint.ts"; type PrivateMapper = { "Joinpoint": typeof Joinpoint, - "AttributeSpecifier": typeof AttributeSpecifier, - "ElseBlock": typeof ElseBlock, - "ElseIfBlock": typeof ElseIfBlock, - "ElseIfStatement": typeof ElseIfStatement, - "Expr": typeof Expr, + "Program": typeof Program, "FileJp": typeof FileJp, - "FortranDecl": typeof FortranDecl, - "IfThenBlock": typeof IfThenBlock, - "IfThenStatement": typeof IfThenStatement, - "Initialization": typeof Initialization, - "KeywordAttributeSpecifier": typeof KeywordAttributeSpecifier, + "Statement": typeof Statement, + "Expr": typeof Expr, + "BinaryOperator": typeof BinaryOperator, + "ExecutableStatement": typeof ExecutableStatement, + "ActionStatement": typeof ActionStatement, + "AssignmentStatement": typeof AssignmentStatement, + "Designator": typeof Designator, + "DataRef": typeof DataRef, "Literal": typeof Literal, + "IntLiteral": typeof IntLiteral, + "StringLiteral": typeof StringLiteral, + "RealLiteral": typeof RealLiteral, + "DoStatement": typeof DoStatement, "LoopControl": typeof LoopControl, + "RangeLoopControl": typeof RangeLoopControl, + "StatementBlock": typeof StatementBlock, + "Execution": typeof Execution, + "Specification": typeof Specification, + "ArraySubscriptExpr": typeof ArraySubscriptExpr, + "CompilerDirective": typeof CompilerDirective, "NameValue": typeof NameValue, + "OmpConstruct": typeof OmpConstruct, + "OmpBlockConstruct": typeof OmpBlockConstruct, + "OmpLoopConstruct": typeof OmpLoopConstruct, "OmpClause": typeof OmpClause, "OmpDataSharingClause": typeof OmpDataSharingClause, - "OmpOrderedClause": typeof OmpOrderedClause, "OmpReductionClause": typeof OmpReductionClause, - "ParameterKeyword": typeof ParameterKeyword, - "Program": typeof Program, - "ProgramUnit": typeof ProgramUnit, - "RangeLoopControl": typeof RangeLoopControl, - "RealLiteral": typeof RealLiteral, - "SectionSubscript": typeof SectionSubscript, - "Statement": typeof Statement, - "StatementBlock": typeof StatementBlock, - "StringLiteral": typeof StringLiteral, - "Subroutine": typeof Subroutine, - "Subscript": typeof Subscript, + "OmpOrderedClause": typeof OmpOrderedClause, "UseStatement": typeof UseStatement, - "BinaryOperator": typeof BinaryOperator, - "Designator": typeof Designator, - "EntityDecl": typeof EntityDecl, - "ExecutableStatement": typeof ExecutableStatement, - "Execution": typeof Execution, - "ExprInitialization": typeof ExprInitialization, - "IfConstruct": typeof IfConstruct, - "IntLiteral": typeof IntLiteral, + "ProgramUnit": typeof ProgramUnit, "MainProgram": typeof MainProgram, - "OmpConstruct": typeof OmpConstruct, - "OmpLoopConstruct": typeof OmpLoopConstruct, - "Specification": typeof Specification, + "Subroutine": typeof Subroutine, "SpecificationStatement": typeof SpecificationStatement, "TypeDeclarationStatement": typeof TypeDeclarationStatement, - "ActionStatement": typeof ActionStatement, - "AssignmentStatement": typeof AssignmentStatement, - "CompilerDirective": typeof CompilerDirective, - "DataRef": typeof DataRef, - "DoStatement": typeof DoStatement, + "AttributeSpecifier": typeof AttributeSpecifier, + "KeywordAttributeSpecifier": typeof KeywordAttributeSpecifier, + "ParameterKeyword": typeof ParameterKeyword, + "FortranDecl": typeof FortranDecl, + "EntityDecl": typeof EntityDecl, + "Initialization": typeof Initialization, + "ExprInitialization": typeof ExprInitialization, "IfStatement": typeof IfStatement, - "OmpBlockConstruct": typeof OmpBlockConstruct, - "ArraySubscriptExpr": typeof ArraySubscriptExpr, + "IfConstruct": typeof IfConstruct, + "IfThenBlock": typeof IfThenBlock, + "IfThenStatement": typeof IfThenStatement, + "ElseIfBlock": typeof ElseIfBlock, + "ElseIfStatement": typeof ElseIfStatement, + "ElseBlock": typeof ElseBlock, + "SectionSubscript": typeof SectionSubscript, + "Subscript": typeof Subscript, }; type DefaultAttributeMap = { @@ -77,49 +78,45 @@ export class Joinpoint extends LaraJoinPoint { name: null, }; /** - * Returns an array with the children of the node + * The children of this join point, ignoring null nodes */ - get children(): Joinpoint[] { return wrapJoinPoint(this._javaObject.getChildren()) } + get children(): Joinpoint[] { return wrapJoinPoint(this._javaObject.children()) } /** - * String with the code represented by this node + * All descendants of this join point */ - get code(): string { return wrapJoinPoint(this._javaObject.getCode()) } - /** - * Returns an array with the descendants of the node - */ - get descendants(): Joinpoint[] { return wrapJoinPoint(this._javaObject.getDescendants()) } + get descendants(): Joinpoint[] { return wrapJoinPoint(this._javaObject.descendants()) } /** * Returns the index of this join point in relation to its parent */ - get indexOfSelf(): number { return wrapJoinPoint(this._javaObject.getIndexOfSelf()) } + get indexOfSelf(): number { return wrapJoinPoint(this._javaObject.indexOfSelf()) } /** * Returns the node that came before this node, or undefined if there is none */ - get leftJp(): Joinpoint { return wrapJoinPoint(this._javaObject.getLeftJp()) } + get leftJp(): Joinpoint { return wrapJoinPoint(this._javaObject.leftJp()) } /** * Returns the parent node in the AST, or undefined if it is the root node */ - get parent(): Joinpoint { return wrapJoinPoint(this._javaObject.getParent()) } + get parent(): Joinpoint { return wrapJoinPoint(this._javaObject.parent()) } /** * Returns the node that comes after this node, or undefined if there is none */ - get rightJp(): Joinpoint { return wrapJoinPoint(this._javaObject.getRightJp()) } + get rightJp(): Joinpoint { return wrapJoinPoint(this._javaObject.rightJp()) } /** * Returns the 'program' join point */ - get root(): Program { return wrapJoinPoint(this._javaObject.getRoot()) } + get root(): Program { return wrapJoinPoint(this._javaObject.root()) } /** - * The nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array + * The scope nodes of this join point */ - get scopeNodes(): Joinpoint[] { return wrapJoinPoint(this._javaObject.getScopeNodes()) } + get scopeNodes(): Joinpoint[] { return wrapJoinPoint(this._javaObject.scopeNodes()) } /** - * True if the given node is a descendant of this node + * Compares this join point with another join point for identity (i.e., whether they represent the same AST node) */ - contains(jp: Joinpoint): boolean { return wrapJoinPoint(this._javaObject.contains(unwrapJoinPoint(jp))); } + compareNodes(aJoinPoint: Joinpoint): boolean { return wrapJoinPoint(this._javaObject.compareNodes(unwrapJoinPoint(aJoinPoint))); } /** - * Looks for an ancestor joinpoint name, walking back on the AST + * True if the given node is a descendant of this node */ - getAncestor(type: string): Joinpoint { return wrapJoinPoint(this._javaObject.getAncestor(unwrapJoinPoint(type))); } + contains(jp: Joinpoint): boolean { return wrapJoinPoint(this._javaObject.contains(unwrapJoinPoint(jp))); } /** * Performs a copy of the node and its children, but not of the nodes in its fields */ @@ -132,6 +129,13 @@ export class Joinpoint extends LaraJoinPoint { * Removes node associated to the joinpoint from the AST */ detach(): Joinpoint { return wrapJoinPoint(this._javaObject.detach()); } + /** + * Looks for an ancestor joinpoint name, walking back on the AST + */ + getAncestor(type: string): Joinpoint { return wrapJoinPoint(this._javaObject.getAncestor(unwrapJoinPoint(type))); } + insert(position: InsertPosition, code: string): Joinpoint[]; + insert(position: InsertPosition, joinpoint: Joinpoint): Joinpoint[]; + insert(p1: InsertPosition, p2: string | Joinpoint): Joinpoint[] { return wrapJoinPoint(this._javaObject.insert(unwrapJoinPoint(p1), unwrapJoinPoint(p2))); } /** * Inserts the given join point after this join point */ @@ -161,62 +165,63 @@ export class Joinpoint extends LaraJoinPoint { */ replaceWith(node: Joinpoint): Joinpoint; /** - * Overload which accepts a list of join points + * Overload which accepts a list of nodes */ replaceWith(node: Joinpoint[]): Joinpoint; /** * Replaces this node with the given node */ replaceWith(p1: Joinpoint | Joinpoint[]): Joinpoint { return wrapJoinPoint(this._javaObject.replaceWith(unwrapJoinPoint(p1))); } -} - -export class AttributeSpecifier extends Joinpoint { /** - * @internal + * Compares this join point with another join point for identity (i.e., whether they represent the same AST node) */ - static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { - name: null, - }; + same(other: Joinpoint): boolean { return wrapJoinPoint(this._javaObject.same(unwrapJoinPoint(other))); } } /** - * Represents the optional 'else' block of an if construct + * Represents the complete program and is the top-most join point in the hierarchy */ -export class ElseBlock extends Joinpoint { +export class Program extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get body(): StatementBlock { return wrapJoinPoint(this._javaObject.getBody()) } } /** - * Represents the optional 'else if' blocks of an if construct + * Represents a source file (e.g., .f90) */ -export class ElseIfBlock extends Joinpoint { +export class FileJp extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { - name: null, + name: "name", }; - get body(): StatementBlock { return wrapJoinPoint(this._javaObject.getBody()) } - get header(): ElseIfStatement { return wrapJoinPoint(this._javaObject.getHeader()) } + /** + * The name of the folder + */ + get foldername(): string { return wrapJoinPoint(this._javaObject.foldername()) } + /** + * The name of the file + */ + get name(): string { return wrapJoinPoint(this._javaObject.name()) } } /** - * Represents the header of an 'else if' block + * Represents a Fortran statement */ -export class ElseIfStatement extends Joinpoint { +export class Statement extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get condition(): Expr { return wrapJoinPoint(this._javaObject.getCondition()) } + get isFirst(): boolean { return wrapJoinPoint(this._javaObject.isFirst()) } + get isLast(): boolean { return wrapJoinPoint(this._javaObject.isLast()) } } /** @@ -232,26 +237,34 @@ export class Expr extends Joinpoint { } /** - * Represents a source file (e.g., .f90) + * Represents a binary operation */ -export class FileJp extends Joinpoint { +export class BinaryOperator extends Expr { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { - name: "name", + name: null, }; + get kind(): BinaryOperatorKind { return wrapJoinPoint(this._javaObject.kind()) } + get left(): Expr { return wrapJoinPoint(this._javaObject.left()) } + set left(value: Expr) { this._javaObject.setLeft(unwrapJoinPoint(value)); } + get right(): Expr { return wrapJoinPoint(this._javaObject.right()) } + set right(value: Expr) { this._javaObject.setRight(unwrapJoinPoint(value)); } /** - * The name of the folder + * Sets the left-hand side of the operation */ - get foldername(): string { return wrapJoinPoint(this._javaObject.getFoldername()) } + setLeft(lhs: Expr): void { return wrapJoinPoint(this._javaObject.setLeft(unwrapJoinPoint(lhs))); } /** - * The name of the file + * Sets the right-hand side of the operation */ - get name(): string { return wrapJoinPoint(this._javaObject.getName()) } + setRight(rhs: Expr): void { return wrapJoinPoint(this._javaObject.setRight(unwrapJoinPoint(rhs))); } } -export class FortranDecl extends Joinpoint { + /** + * Represents an executable statement + */ +export class ExecutableStatement extends Statement { /** * @internal */ @@ -261,33 +274,35 @@ export class FortranDecl extends Joinpoint { } /** - * Represents the first block of an if construct + * Represents an action statement */ -export class IfThenBlock extends Joinpoint { +export class ActionStatement extends ExecutableStatement { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get body(): StatementBlock { return wrapJoinPoint(this._javaObject.getBody()) } - get header(): IfThenStatement { return wrapJoinPoint(this._javaObject.getHeader()) } } /** - * Represents the header of an 'if then' block + * Represents an assignment statement */ -export class IfThenStatement extends Joinpoint { +export class AssignmentStatement extends ActionStatement { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get condition(): Expr { return wrapJoinPoint(this._javaObject.getCondition()) } + get expr(): Expr { return wrapJoinPoint(this._javaObject.expr()) } + get variable(): DataRef { return wrapJoinPoint(this._javaObject.variable()) } } -export class Initialization extends Joinpoint { + /** + * Represents a designator + */ +export class Designator extends Expr { /** * @internal */ @@ -296,13 +311,17 @@ export class Initialization extends Joinpoint { }; } -export class KeywordAttributeSpecifier extends AttributeSpecifier { + /** + * Represents a data reference + */ +export class DataRef extends Designator { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + get name(): string { return wrapJoinPoint(this._javaObject.name()) } } /** @@ -315,13 +334,10 @@ export class Literal extends Expr { static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get literal(): string { return wrapJoinPoint(this._javaObject.getLiteral()) } + get literal(): string { return wrapJoinPoint(this._javaObject.literal()) } } - /** - * Represents the loop control structure, with specialized subclasses for different loop kinds - */ -export class LoopControl extends Joinpoint { +export class IntLiteral extends Literal { /** * @internal */ @@ -330,23 +346,16 @@ export class LoopControl extends Joinpoint { }; } - /** - * Represents a name/value pair in a compiler directive - */ -export class NameValue extends Joinpoint { +export class StringLiteral extends Literal { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get name(): string { return wrapJoinPoint(this._javaObject.getName()) } } - /** - * Represents an OpenMP clause - */ -export class OmpClause extends Joinpoint { +export class RealLiteral extends Literal { /** * @internal */ @@ -356,18 +365,32 @@ export class OmpClause extends Joinpoint { } /** - * Represents an OpenMP datasharing clause (public, private, ...) + * Represents a do loop */ -export class OmpDataSharingClause extends OmpClause { +export class DoStatement extends ExecutableStatement { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + get body(): Execution { return wrapJoinPoint(this._javaObject.body()) } + get control(): LoopControl { return wrapJoinPoint(this._javaObject.control()) } + get kind(): DoKind { return wrapJoinPoint(this._javaObject.kind()) } + /** + * Performs a copy of the do statement, including its controls, but not the body + */ + copyScope(): DoStatement { return wrapJoinPoint(this._javaObject.copyScope()); } + /** + * Returns true if the given do statement has the same loop control as this do statement + */ + sameScope(loop: DoStatement): boolean { return wrapJoinPoint(this._javaObject.sameScope(unwrapJoinPoint(loop))); } } -export class OmpOrderedClause extends OmpClause { + /** + * Represents the loop control structure, with specialized subclasses for different loop kinds + */ +export class LoopControl extends Joinpoint { /** * @internal */ @@ -376,204 +399,211 @@ export class OmpOrderedClause extends OmpClause { }; } -export class OmpReductionClause extends OmpClause { +export class RangeLoopControl extends LoopControl { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + get lower(): Expr { return wrapJoinPoint(this._javaObject.lower()) } + get step(): Expr { return wrapJoinPoint(this._javaObject.step()) } + set step(value: Expr) { this._javaObject.setStep(unwrapJoinPoint(value)); } + get upper(): Expr { return wrapJoinPoint(this._javaObject.upper()) } + set upper(value: Expr) { this._javaObject.setUpper(unwrapJoinPoint(value)); } + get var(): DataRef { return wrapJoinPoint(this._javaObject.var()) } + setStep(step: Expr): void { return wrapJoinPoint(this._javaObject.setStep(unwrapJoinPoint(step))); } + setUpper(upper: Expr): void { return wrapJoinPoint(this._javaObject.setUpper(unwrapJoinPoint(upper))); } } -export class ParameterKeyword extends KeywordAttributeSpecifier { +export class StatementBlock extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + get stmts(): Statement[] { return wrapJoinPoint(this._javaObject.stmts()) } } - /** - * Represents the complete program and is the top-most join point in the hierarchy - */ -export class Program extends Joinpoint { +export class Execution extends StatementBlock { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + get executableStmts(): ExecutableStatement[] { return wrapJoinPoint(this._javaObject.executableStmts()) } + insertBegin(stmt: ExecutableStatement): void { return wrapJoinPoint(this._javaObject.insertBegin(unwrapJoinPoint(stmt))); } + insertEnd(stmt: ExecutableStatement): void { return wrapJoinPoint(this._javaObject.insertEnd(unwrapJoinPoint(stmt))); } } -export class ProgramUnit extends Joinpoint { +export class Specification extends StatementBlock { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + get specificationStmts(): SpecificationStatement[] { return wrapJoinPoint(this._javaObject.specificationStmts()) } /** - * Returns the unit's specification part + * Adds a UseStmt to a specification part. The statement is inserted at the beginning. */ - get specification(): Specification { return wrapJoinPoint(this._javaObject.getSpecification()) } + addUseStmt(stmt: UseStatement): void { return wrapJoinPoint(this._javaObject.addUseStmt(unwrapJoinPoint(stmt))); } } -export class RangeLoopControl extends LoopControl { + /** + * Represents an access to one (or several) elements of an array + */ +export class ArraySubscriptExpr extends DataRef { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get lower(): Expr { return wrapJoinPoint(this._javaObject.getLower()) } - get step(): Expr { return wrapJoinPoint(this._javaObject.getStep()) } - set step(value: Expr) { this._javaObject.setStep(unwrapJoinPoint(value)); } - get upper(): Expr { return wrapJoinPoint(this._javaObject.getUpper()) } - set upper(value: Expr) { this._javaObject.setUpper(unwrapJoinPoint(value)); } - get var(): DataRef { return wrapJoinPoint(this._javaObject.getVar()) } - setStep(step: Expr): void { return wrapJoinPoint(this._javaObject.setStep(unwrapJoinPoint(step))); } - setUpper(upper: Expr): void { return wrapJoinPoint(this._javaObject.setUpper(unwrapJoinPoint(upper))); } + get subscripts(): SectionSubscript[] { return wrapJoinPoint(this._javaObject.subscripts()) } + get var(): DataRef { return wrapJoinPoint(this._javaObject.var()) } } -export class RealLiteral extends Literal { +export class CompilerDirective extends ExecutableStatement { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + /** + * Returns the directive's contents as a string + */ + get directiveString(): string { return wrapJoinPoint(this._javaObject.directiveString()) } + get pairs(): NameValue[] { return wrapJoinPoint(this._javaObject.pairs()) } } /** - * Represent a generic subscript for an array + * Represents a name/value pair in a compiler directive */ -export class SectionSubscript extends Joinpoint { +export class NameValue extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + get name(): string { return wrapJoinPoint(this._javaObject.name()) } } /** - * Represents a Fortran statement + * Represents a generic OpenMP construct */ -export class Statement extends Joinpoint { +export class OmpConstruct extends ExecutableStatement { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get isFirst(): boolean { return wrapJoinPoint(this._javaObject.getIsFirst()) } - get isLast(): boolean { return wrapJoinPoint(this._javaObject.getIsLast()) } + get clauses(): OmpClause[] { return wrapJoinPoint(this._javaObject.clauses()) } + set clauses(value: OmpClause[]) { this._javaObject.setClauses(unwrapJoinPoint(value)); } + /** + * Sets the construct's clauses + */ + setClauses(clauses: OmpClause[]): void { return wrapJoinPoint(this._javaObject.setClauses(unwrapJoinPoint(clauses))); } + setDirective(directive: string): void { return wrapJoinPoint(this._javaObject.setDirective(unwrapJoinPoint(directive))); } } -export class StatementBlock extends Joinpoint { + /** + * Represents an OpenMP block construct (such as parallel or task) + */ +export class OmpBlockConstruct extends OmpConstruct { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get stmts(): Statement[] { return wrapJoinPoint(this._javaObject.getStmts()) } + setBody(body: Execution): void { return wrapJoinPoint(this._javaObject.setBody(unwrapJoinPoint(body))); } } -export class StringLiteral extends Literal { + /** + * Represents an OpenMP loop construct (such as do or do parallel) + */ +export class OmpLoopConstruct extends OmpConstruct { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + setLoop(loop: DoStatement): void { return wrapJoinPoint(this._javaObject.setLoop(unwrapJoinPoint(loop))); } } -export class Subroutine extends ProgramUnit { + /** + * Represents an OpenMP clause + */ +export class OmpClause extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get moduleName(): string { return wrapJoinPoint(this._javaObject.getModuleName()) } } /** - * Represent an integer subscript for an array + * Represents an OpenMP datasharing clause (public, private, ...) */ -export class Subscript extends SectionSubscript { +export class OmpDataSharingClause extends OmpClause { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get expr(): Expr { return wrapJoinPoint(this._javaObject.getExpr()) } } -export class UseStatement extends Statement { +export class OmpReductionClause extends OmpClause { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get moduleName(): string { return wrapJoinPoint(this._javaObject.getModuleName()) } } - /** - * Represents a binary operation - */ -export class BinaryOperator extends Expr { +export class OmpOrderedClause extends OmpClause { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get kind(): "add" | "sub" | "mul" | "div" | "gt" | "ge" | "lt" | "le" | "eq" | "ne" { return wrapJoinPoint(this._javaObject.getKind()) } - get left(): Expr { return wrapJoinPoint(this._javaObject.getLeft()) } - set left(value: Expr) { this._javaObject.setLeft(unwrapJoinPoint(value)); } - get right(): Expr { return wrapJoinPoint(this._javaObject.getRight()) } - set right(value: Expr) { this._javaObject.setRight(unwrapJoinPoint(value)); } - /** - * Sets the left-hand side of the operation - */ - setLeft(lhs: Expr): void { return wrapJoinPoint(this._javaObject.setLeft(unwrapJoinPoint(lhs))); } - /** - * Sets the right-hand side of the operation - */ - setRight(rhs: Expr): void { return wrapJoinPoint(this._javaObject.setRight(unwrapJoinPoint(rhs))); } } - /** - * Represents a designator - */ -export class Designator extends Expr { +export class UseStatement extends Statement { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + get moduleName(): string { return wrapJoinPoint(this._javaObject.moduleName()) } } -export class EntityDecl extends FortranDecl { +export class ProgramUnit extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get name(): string { return wrapJoinPoint(this._javaObject.getName()) } -} - /** - * Represents an executable statement + * Returns the unit's specification part */ -export class ExecutableStatement extends Statement { + get specification(): Specification { return wrapJoinPoint(this._javaObject.specification()) } +} + +export class MainProgram extends ProgramUnit { /** * @internal */ @@ -582,44 +612,37 @@ export class ExecutableStatement extends Statement { }; } -export class Execution extends StatementBlock { +export class Subroutine extends ProgramUnit { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get executableStmts(): ExecutableStatement[] { return wrapJoinPoint(this._javaObject.getExecutableStmts()) } - insertBegin(stmt: ExecutableStatement): void { return wrapJoinPoint(this._javaObject.insertBegin(unwrapJoinPoint(stmt))); } - insertEnd(stmt: ExecutableStatement): void { return wrapJoinPoint(this._javaObject.insertEnd(unwrapJoinPoint(stmt))); } + get moduleName(): string { return wrapJoinPoint(this._javaObject.moduleName()) } } -export class ExprInitialization extends Initialization { +export class SpecificationStatement extends Statement { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get expr(): Expr { return wrapJoinPoint(this._javaObject.getExpr()) } } - /** - * Represents the root of an if construct - */ -export class IfConstruct extends ExecutableStatement { +export class TypeDeclarationStatement extends SpecificationStatement { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get elseBlock(): ElseBlock { return wrapJoinPoint(this._javaObject.getElseBlock()) } - get elseIfBlocks(): ElseIfBlock[] { return wrapJoinPoint(this._javaObject.getElseIfBlocks()) } - get ifThenBlock(): IfThenBlock { return wrapJoinPoint(this._javaObject.getIfThenBlock()) } + get attrs(): AttributeSpecifier[] { return wrapJoinPoint(this._javaObject.attrs()) } + get decls(): EntityDecl[] { return wrapJoinPoint(this._javaObject.decls()) } } -export class IntLiteral extends Literal { +export class AttributeSpecifier extends Joinpoint { /** * @internal */ @@ -628,7 +651,7 @@ export class IntLiteral extends Literal { }; } -export class MainProgram extends ProgramUnit { +export class KeywordAttributeSpecifier extends AttributeSpecifier { /** * @internal */ @@ -637,53 +660,35 @@ export class MainProgram extends ProgramUnit { }; } - /** - * Represents a generic OpenMP construct - */ -export class OmpConstruct extends ExecutableStatement { +export class ParameterKeyword extends KeywordAttributeSpecifier { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get clauses(): OmpClause[] { return wrapJoinPoint(this._javaObject.getClauses()) } - set clauses(value: OmpClause[]) { this._javaObject.setClauses(unwrapJoinPoint(value)); } - /** - * Sets the construct's clauses - */ - setClauses(clauses: OmpClause[]): void { return wrapJoinPoint(this._javaObject.setClauses(unwrapJoinPoint(clauses))); } - setDirective(directive: string): void { return wrapJoinPoint(this._javaObject.setDirective(unwrapJoinPoint(directive))); } } - /** - * Represents an OpenMP loop construct (such as do or do parallel) - */ -export class OmpLoopConstruct extends OmpConstruct { +export class FortranDecl extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - setLoop(loop: DoStatement): void { return wrapJoinPoint(this._javaObject.setLoop(unwrapJoinPoint(loop))); } } -export class Specification extends StatementBlock { +export class EntityDecl extends FortranDecl { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get specificationStmts(): SpecificationStatement[] { return wrapJoinPoint(this._javaObject.getSpecificationStmts()) } - /** - * Adds a UseStmt to a specification part. The statement is inserted at the beginning. - */ - addUseStmt(stmt: UseStatement): void { return wrapJoinPoint(this._javaObject.addUseStmt(unwrapJoinPoint(stmt))); } + get name(): string { return wrapJoinPoint(this._javaObject.name()) } } -export class SpecificationStatement extends Statement { +export class Initialization extends Joinpoint { /** * @internal */ @@ -692,185 +697,221 @@ export class SpecificationStatement extends Statement { }; } -export class TypeDeclarationStatement extends SpecificationStatement { +export class ExprInitialization extends Initialization { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get attrs(): AttributeSpecifier[] { return wrapJoinPoint(this._javaObject.getAttrs()) } - get decls(): EntityDecl[] { return wrapJoinPoint(this._javaObject.getDecls()) } + get expr(): Expr { return wrapJoinPoint(this._javaObject.expr()) } } - /** - * Represents an action statement - */ -export class ActionStatement extends ExecutableStatement { +export class IfStatement extends ActionStatement { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; + get condition(): Expr { return wrapJoinPoint(this._javaObject.condition()) } + get statement(): ActionStatement { return wrapJoinPoint(this._javaObject.statement()) } } /** - * Represents an assignment statement + * Represents the root of an if construct */ -export class AssignmentStatement extends ActionStatement { +export class IfConstruct extends ExecutableStatement { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get expr(): Expr { return wrapJoinPoint(this._javaObject.getExpr()) } - get variable(): DataRef { return wrapJoinPoint(this._javaObject.getVariable()) } + get elseBlock(): ElseBlock { return wrapJoinPoint(this._javaObject.elseBlock()) } + get elseIfBlocks(): ElseIfBlock[] { return wrapJoinPoint(this._javaObject.elseIfBlocks()) } + get ifThenBlock(): IfThenBlock { return wrapJoinPoint(this._javaObject.ifThenBlock()) } } -export class CompilerDirective extends ExecutableStatement { + /** + * Represents the first block of an if construct + */ +export class IfThenBlock extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - /** - * Returns the directive's contents as a string - */ - get directiveString(): string { return wrapJoinPoint(this._javaObject.getDirectiveString()) } - get pairs(): NameValue[] { return wrapJoinPoint(this._javaObject.getPairs()) } + get body(): StatementBlock { return wrapJoinPoint(this._javaObject.body()) } + get header(): IfThenStatement { return wrapJoinPoint(this._javaObject.header()) } } /** - * Represents a data reference + * Represents the header of an 'if then' block */ -export class DataRef extends Designator { +export class IfThenStatement extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get name(): string { return wrapJoinPoint(this._javaObject.getName()) } + get condition(): Expr { return wrapJoinPoint(this._javaObject.condition()) } } /** - * Represents a do loop + * Represents the optional 'else if' blocks of an if construct */ -export class DoStatement extends ExecutableStatement { +export class ElseIfBlock extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get body(): Execution { return wrapJoinPoint(this._javaObject.getBody()) } - get control(): LoopControl { return wrapJoinPoint(this._javaObject.getControl()) } - get kind(): "while" | "range" | "concurrent" { return wrapJoinPoint(this._javaObject.getKind()) } + get body(): StatementBlock { return wrapJoinPoint(this._javaObject.body()) } + get header(): ElseIfStatement { return wrapJoinPoint(this._javaObject.header()) } +} + /** - * Performs a copy of the do statement, including its controls, but not the body + * Represents the header of an 'else if' block */ - copyScope(): DoStatement { return wrapJoinPoint(this._javaObject.copyScope()); } +export class ElseIfStatement extends Joinpoint { /** - * Returns true if the given do statement has the same loop control as this do statement + * @internal */ - sameScope(loop: DoStatement): boolean { return wrapJoinPoint(this._javaObject.sameScope(unwrapJoinPoint(loop))); } + static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { + name: null, + }; + get condition(): Expr { return wrapJoinPoint(this._javaObject.condition()) } } -export class IfStatement extends ActionStatement { + /** + * Represents the optional 'else' block of an if construct + */ +export class ElseBlock extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get condition(): Expr { return wrapJoinPoint(this._javaObject.getCondition()) } - get statement(): ActionStatement { return wrapJoinPoint(this._javaObject.getStatement()) } + get body(): StatementBlock { return wrapJoinPoint(this._javaObject.body()) } } /** - * Represents an OpenMP block construct (such as parallel or task) + * Represent a generic subscript for an array */ -export class OmpBlockConstruct extends OmpConstruct { +export class SectionSubscript extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - setBody(body: Execution): void { return wrapJoinPoint(this._javaObject.setBody(unwrapJoinPoint(body))); } } /** - * Represents an access to one (or several) elements of an array + * Represent an integer subscript for an array */ -export class ArraySubscriptExpr extends DataRef { +export class Subscript extends SectionSubscript { /** * @internal */ static readonly _defaultAttributeInfo: {readonly map?: DefaultAttributeMap, readonly name: string | null, readonly type?: PrivateMapper, readonly jpMapper?: typeof JoinpointMapper} = { name: null, }; - get subscripts(): SectionSubscript[] { return wrapJoinPoint(this._javaObject.getSubscripts()) } - get var(): DataRef { return wrapJoinPoint(this._javaObject.getVar()) } + get expr(): Expr { return wrapJoinPoint(this._javaObject.expr()) } } +/** + * This is supposed to be an enum, but Node.js v25 does bot support TS' enums, only erasable-syntax. + * Revert to an enum when Node.js supports it, or when we move to a different engine that supports it. + * This and the "type" declaration below. + */ +export const DoKind = { + while: "while", + range: "range", + concurrent: "concurrent", +} as const; +export type DoKind = typeof DoKind[keyof typeof DoKind]; + +/** + * This is supposed to be an enum, but Node.js v25 does bot support TS' enums, only erasable-syntax. + * Revert to an enum when Node.js supports it, or when we move to a different engine that supports it. + * This and the "type" declaration below. + */ +export const BinaryOperatorKind = { + ADD: "ADD", + SUBTRACT: "SUBTRACT", + MULTIPLY: "MULTIPLY", + DIVIDE: "DIVIDE", + POWER: "POWER", + LT: "LT", + LE: "LE", + GT: "GT", + GE: "GE", + EQ: "EQ", + NE: "NE", + AND: "AND", +} as const; +export type BinaryOperatorKind = typeof BinaryOperatorKind[keyof typeof BinaryOperatorKind]; + const JoinpointMapper = { joinpoint: Joinpoint, - attributeSpecifier: AttributeSpecifier, - elseBlock: ElseBlock, - elseIfBlock: ElseIfBlock, - elseIfStatement: ElseIfStatement, - expr: Expr, + program: Program, file: FileJp, - fortranDecl: FortranDecl, - ifThenBlock: IfThenBlock, - ifThenStatement: IfThenStatement, - initialization: Initialization, - keywordAttributeSpecifier: KeywordAttributeSpecifier, + statement: Statement, + expr: Expr, + binaryOperator: BinaryOperator, + executableStatement: ExecutableStatement, + actionStatement: ActionStatement, + assignmentStatement: AssignmentStatement, + designator: Designator, + dataRef: DataRef, literal: Literal, + intLiteral: IntLiteral, + stringLiteral: StringLiteral, + realLiteral: RealLiteral, + doStatement: DoStatement, loopControl: LoopControl, + rangeLoopControl: RangeLoopControl, + statementBlock: StatementBlock, + execution: Execution, + specification: Specification, + arraySubscriptExpr: ArraySubscriptExpr, + compilerDirective: CompilerDirective, nameValue: NameValue, + ompConstruct: OmpConstruct, + ompBlockConstruct: OmpBlockConstruct, + ompLoopConstruct: OmpLoopConstruct, ompClause: OmpClause, ompDataSharingClause: OmpDataSharingClause, - ompOrderedClause: OmpOrderedClause, ompReductionClause: OmpReductionClause, - parameterKeyword: ParameterKeyword, - program: Program, - programUnit: ProgramUnit, - rangeLoopControl: RangeLoopControl, - realLiteral: RealLiteral, - sectionSubscript: SectionSubscript, - statement: Statement, - statementBlock: StatementBlock, - stringLiteral: StringLiteral, - subroutine: Subroutine, - subscript: Subscript, + ompOrderedClause: OmpOrderedClause, useStatement: UseStatement, - binaryOperator: BinaryOperator, - designator: Designator, - entityDecl: EntityDecl, - executableStatement: ExecutableStatement, - execution: Execution, - exprInitialization: ExprInitialization, - ifConstruct: IfConstruct, - intLiteral: IntLiteral, + programUnit: ProgramUnit, mainProgram: MainProgram, - ompConstruct: OmpConstruct, - ompLoopConstruct: OmpLoopConstruct, - specification: Specification, + subroutine: Subroutine, specificationStatement: SpecificationStatement, typeDeclarationStatement: TypeDeclarationStatement, - actionStatement: ActionStatement, - assignmentStatement: AssignmentStatement, - compilerDirective: CompilerDirective, - dataRef: DataRef, - doStatement: DoStatement, + attributeSpecifier: AttributeSpecifier, + keywordAttributeSpecifier: KeywordAttributeSpecifier, + parameterKeyword: ParameterKeyword, + fortranDecl: FortranDecl, + entityDecl: EntityDecl, + initialization: Initialization, + exprInitialization: ExprInitialization, ifStatement: IfStatement, - ompBlockConstruct: OmpBlockConstruct, - arraySubscriptExpr: ArraySubscriptExpr, + ifConstruct: IfConstruct, + ifThenBlock: IfThenBlock, + ifThenStatement: IfThenStatement, + elseIfBlock: ElseIfBlock, + elseIfStatement: ElseIfStatement, + elseBlock: ElseBlock, + sectionSubscript: SectionSubscript, + subscript: Subscript, }; let registered = false; diff --git a/Fortran-JS/src-api/Query.test.ts b/Fortran-JS/api/Query.test.ts similarity index 98% rename from Fortran-JS/src-api/Query.test.ts rename to Fortran-JS/api/Query.test.ts index 8e6d4528..95b38256 100644 --- a/Fortran-JS/src-api/Query.test.ts +++ b/Fortran-JS/api/Query.test.ts @@ -1,6 +1,6 @@ -import { registerSourceCodes } from "@specs-feup/lara/jest/jestHelpers.js"; -import Query from "@specs-feup/lara/api/weaver/Query.js"; -import { Joinpoint, Statement } from "./Joinpoints.js"; +import { registerSourceCodes } from "@specs-feup/lara/vitest/weaverTestHelpers.ts"; +import Query from "@specs-feup/lara/api/weaver/Query.ts"; +import { Joinpoint, Statement } from "./Joinpoints.ts"; const code = `{ "nodes": [ diff --git a/Fortran-JS/src-api/code/LoopFission.ts b/Fortran-JS/api/code/LoopFission.ts similarity index 94% rename from Fortran-JS/src-api/code/LoopFission.ts rename to Fortran-JS/api/code/LoopFission.ts index 2dbf9b2a..f62afa39 100644 --- a/Fortran-JS/src-api/code/LoopFission.ts +++ b/Fortran-JS/api/code/LoopFission.ts @@ -1,4 +1,4 @@ -import { DoStatement, RangeLoopControl } from "../Joinpoints.js"; +import { DoStatement, RangeLoopControl } from "../Joinpoints.ts"; /** * Splits a do-loop with multiple body statements into one loop per statement. diff --git a/Fortran-JS/src-api/code/LoopFusion.ts b/Fortran-JS/api/code/LoopFusion.ts similarity index 96% rename from Fortran-JS/src-api/code/LoopFusion.ts rename to Fortran-JS/api/code/LoopFusion.ts index 989807f3..c582dca5 100644 --- a/Fortran-JS/src-api/code/LoopFusion.ts +++ b/Fortran-JS/api/code/LoopFusion.ts @@ -1,4 +1,4 @@ -import { DoStatement } from "../Joinpoints.js"; +import { DoStatement } from "../Joinpoints.ts"; /** * Fuses an array of do-loops with identical range controls into a single loop. diff --git a/Fortran-JS/src-api/code/LoopTiling.ts b/Fortran-JS/api/code/LoopTiling.ts similarity index 97% rename from Fortran-JS/src-api/code/LoopTiling.ts rename to Fortran-JS/api/code/LoopTiling.ts index b8763b56..82f076eb 100644 --- a/Fortran-JS/src-api/code/LoopTiling.ts +++ b/Fortran-JS/api/code/LoopTiling.ts @@ -1,5 +1,5 @@ -import FortranJoinPoints from "../FortranJoinPoints.js"; -import { DataRef, DoStatement, ExecutableStatement, RangeLoopControl } from "../Joinpoints.js"; +import FortranJoinPoints from "../FortranJoinPoints.ts"; +import { DataRef, DoStatement, ExecutableStatement, RangeLoopControl } from "../Joinpoints.ts"; /** * Tiles a perfect 2-deep loop nest by `tileSize`. diff --git a/Fortran-JS/src-api/code/LoopUnroll.ts b/Fortran-JS/api/code/LoopUnroll.ts similarity index 94% rename from Fortran-JS/src-api/code/LoopUnroll.ts rename to Fortran-JS/api/code/LoopUnroll.ts index b1fe9442..cf5e6671 100644 --- a/Fortran-JS/src-api/code/LoopUnroll.ts +++ b/Fortran-JS/api/code/LoopUnroll.ts @@ -1,6 +1,6 @@ -import Query from "@specs-feup/lara/api/weaver/Query.js"; -import FortranJoinPoints from "../FortranJoinPoints.js"; -import { DataRef, DoStatement, ExecutableStatement, RangeLoopControl } from "../Joinpoints.js"; +import Query from "@specs-feup/lara/api/weaver/Query.ts"; +import FortranJoinPoints from "../FortranJoinPoints.ts"; +import { DataRef, DoStatement, ExecutableStatement, RangeLoopControl } from "../Joinpoints.ts"; /** * Deep-copies a body statement and replaces every reference to `varName` with @@ -23,7 +23,7 @@ function substituteVar(stmt: ExecutableStatement, varName: string, offset: numbe * Two loops replace the original: * - A **main loop** that steps by `factor`, with the body replicated `factor` * times (each copy substitutes `var` with `var+offset` for offset 0..factor-1). - * - A **cleanup loop** that handles the remaining < `factor` iterations with the + * - A **cleanup loop** that handles the remaining iterations (fewer than `factor`) with the * original body. When `factor` exactly divides the trip count, the cleanup * loop's bounds produce a no-op and it generates no iterations. * diff --git a/Fortran-JS/src-api/examples/loopFission.ts b/Fortran-JS/api/examples/loopFission.ts similarity index 73% rename from Fortran-JS/src-api/examples/loopFission.ts rename to Fortran-JS/api/examples/loopFission.ts index d271c812..e2883bbe 100644 --- a/Fortran-JS/src-api/examples/loopFission.ts +++ b/Fortran-JS/api/examples/loopFission.ts @@ -1,6 +1,6 @@ -import Query from "@specs-feup/lara/api/weaver/Query.js"; -import { Subroutine } from "../Joinpoints.js"; -import LoopFissionPass from "../pass/LoopFissionPass.js"; +import Query from "@specs-feup/lara/api/weaver/Query.ts"; +import { Subroutine } from "../Joinpoints.ts"; +import LoopFissionPass from "../pass/LoopFissionPass.ts"; // Collect loops with more than one body statement before any modifications diff --git a/Fortran-JS/src-api/examples/loopFusion.ts b/Fortran-JS/api/examples/loopFusion.ts similarity index 73% rename from Fortran-JS/src-api/examples/loopFusion.ts rename to Fortran-JS/api/examples/loopFusion.ts index db4f751f..26463be5 100644 --- a/Fortran-JS/src-api/examples/loopFusion.ts +++ b/Fortran-JS/api/examples/loopFusion.ts @@ -1,6 +1,6 @@ -import Query from "@specs-feup/lara/api/weaver/Query.js"; -import LoopFusionPass from "../pass/LoopFusionPass.js"; -import { Subroutine } from "../Joinpoints.js"; +import Query from "@specs-feup/lara/api/weaver/Query.ts"; +import LoopFusionPass from "../pass/LoopFusionPass.ts"; +import { Subroutine } from "../Joinpoints.ts"; diff --git a/Fortran-JS/src-api/examples/loopInterchange.ts b/Fortran-JS/api/examples/loopInterchange.ts similarity index 95% rename from Fortran-JS/src-api/examples/loopInterchange.ts rename to Fortran-JS/api/examples/loopInterchange.ts index 6d9d5037..09a4b764 100644 --- a/Fortran-JS/src-api/examples/loopInterchange.ts +++ b/Fortran-JS/api/examples/loopInterchange.ts @@ -1,5 +1,5 @@ -import Query from "@specs-feup/lara/api/weaver/Query.js"; -import { DoStatement, RangeLoopControl, Joinpoint } from "../Joinpoints.js"; +import Query from "@specs-feup/lara/api/weaver/Query.ts"; +import { DoStatement, RangeLoopControl, Joinpoint } from "../Joinpoints.ts"; function isInKernel3mm(loop: DoStatement): boolean { const sub = loop.getAncestor("programUnit"); diff --git a/Fortran-JS/src-api/examples/loopTiling.ts b/Fortran-JS/api/examples/loopTiling.ts similarity index 68% rename from Fortran-JS/src-api/examples/loopTiling.ts rename to Fortran-JS/api/examples/loopTiling.ts index b45df60b..8d8d3855 100644 --- a/Fortran-JS/src-api/examples/loopTiling.ts +++ b/Fortran-JS/api/examples/loopTiling.ts @@ -1,6 +1,6 @@ -import Query from "@specs-feup/lara/api/weaver/Query.js"; -import LoopTilingPass from "../pass/LoopTilingPass.js"; -import { Subroutine } from "../Joinpoints.js"; +import Query from "@specs-feup/lara/api/weaver/Query.ts"; +import LoopTilingPass from "../pass/LoopTilingPass.ts"; +import { Subroutine } from "../Joinpoints.ts"; const TILE_SIZE = 32; diff --git a/Fortran-JS/src-api/examples/unrollInnermost.ts b/Fortran-JS/api/examples/unrollInnermost.ts similarity index 71% rename from Fortran-JS/src-api/examples/unrollInnermost.ts rename to Fortran-JS/api/examples/unrollInnermost.ts index ead1a3a2..1def4c55 100644 --- a/Fortran-JS/src-api/examples/unrollInnermost.ts +++ b/Fortran-JS/api/examples/unrollInnermost.ts @@ -1,6 +1,6 @@ -import Query from "@specs-feup/lara/api/weaver/Query.js"; -import LoopUnrollPass from "../pass/LoopUnrollPass.js"; -import { Subroutine } from "../Joinpoints.js"; +import Query from "@specs-feup/lara/api/weaver/Query.ts"; +import LoopUnrollPass from "../pass/LoopUnrollPass.ts"; +import { Subroutine } from "../Joinpoints.ts"; const FACTOR = 4; diff --git a/Fortran-JS/src-api/pass/LoopFissionPass.ts b/Fortran-JS/api/pass/LoopFissionPass.ts similarity index 86% rename from Fortran-JS/src-api/pass/LoopFissionPass.ts rename to Fortran-JS/api/pass/LoopFissionPass.ts index 8b5d4cca..f1704647 100644 --- a/Fortran-JS/src-api/pass/LoopFissionPass.ts +++ b/Fortran-JS/api/pass/LoopFissionPass.ts @@ -1,7 +1,7 @@ -import Pass from "@specs-feup/lara/api/lara/pass/Pass.js" -import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; -import { DoStatement, Joinpoint } from "../Joinpoints.js"; -import loopFission, { canFission } from "../code/LoopFission.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.ts" +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.ts"; +import { DoStatement, Joinpoint } from "../Joinpoints.ts"; +import loopFission, { canFission } from "../code/LoopFission.ts"; /** * Pass that splits every range do-loop with more than one body statement into diff --git a/Fortran-JS/src-api/pass/LoopFusionPass.ts b/Fortran-JS/api/pass/LoopFusionPass.ts similarity index 87% rename from Fortran-JS/src-api/pass/LoopFusionPass.ts rename to Fortran-JS/api/pass/LoopFusionPass.ts index be5e568c..2829e9df 100644 --- a/Fortran-JS/src-api/pass/LoopFusionPass.ts +++ b/Fortran-JS/api/pass/LoopFusionPass.ts @@ -1,7 +1,7 @@ -import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; -import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; -import { DoStatement, Joinpoint, RangeLoopControl } from "../Joinpoints.js"; -import loopFusion from "../code/LoopFusion.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.ts"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.ts"; +import { DoStatement, Joinpoint } from "../Joinpoints.ts"; +import loopFusion from "../code/LoopFusion.ts"; /** * Pass that fuses consecutive range do-loops with identical boundaries into a @@ -18,7 +18,7 @@ export default class LoopFusionPass extends Pass { protected _name = "LoopFusionPass"; protected _apply_impl($jp: Joinpoint): PassResult { - const allSets = [...this._findAllFusableSets($jp)]; + const allSets = Array.from(this._findAllFusableSets($jp)); let appliedPass = false; for (const set of allSets) { loopFusion(set); @@ -32,7 +32,7 @@ export default class LoopFusionPass extends Pass { * inner loops are fused before their containing scope is inspected. */ protected *_findAllFusableSets($jp: Joinpoint): Generator { - for (const child of [...$jp.children]) { + for (const child of $jp.children) { yield* this._findAllFusableSets(child); } for (const set of this._findFusableSets($jp)) { diff --git a/Fortran-JS/src-api/pass/LoopTilingPass.ts b/Fortran-JS/api/pass/LoopTilingPass.ts similarity index 81% rename from Fortran-JS/src-api/pass/LoopTilingPass.ts rename to Fortran-JS/api/pass/LoopTilingPass.ts index 64218655..a0180541 100644 --- a/Fortran-JS/src-api/pass/LoopTilingPass.ts +++ b/Fortran-JS/api/pass/LoopTilingPass.ts @@ -1,8 +1,8 @@ -import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; -import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; -import Query from "@specs-feup/lara/api/weaver/Query.js"; -import { DoStatement, Joinpoint } from "../Joinpoints.js"; -import loopTile, { canTile } from "../code/LoopTiling.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.ts"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.ts"; +import Query from "@specs-feup/lara/api/weaver/Query.ts"; +import { DoStatement, Joinpoint } from "../Joinpoints.ts"; +import loopTile, { canTile } from "../code/LoopTiling.ts"; /** * Pass that tiles every top-level 2-deep perfect loop nest in the subtree. @@ -19,8 +19,11 @@ import loopTile, { canTile } from "../code/LoopTiling.js"; export default class LoopTilingPass extends Pass { protected _name = "LoopTilingPass"; - constructor(private readonly tileSize: number = 32) { + private readonly tileSize: number; + + constructor(tileSize: number = 32) { super(); + this.tileSize = tileSize; } protected _apply_impl($jp: Joinpoint): PassResult { diff --git a/Fortran-JS/src-api/pass/LoopUnrollPass.ts b/Fortran-JS/api/pass/LoopUnrollPass.ts similarity index 78% rename from Fortran-JS/src-api/pass/LoopUnrollPass.ts rename to Fortran-JS/api/pass/LoopUnrollPass.ts index 5d5333a8..e64ac333 100644 --- a/Fortran-JS/src-api/pass/LoopUnrollPass.ts +++ b/Fortran-JS/api/pass/LoopUnrollPass.ts @@ -1,7 +1,7 @@ -import Pass from "@specs-feup/lara/api/lara/pass/Pass.js"; -import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.js"; -import { DoStatement, Joinpoint } from "../Joinpoints.js"; -import loopUnroll, { canUnroll } from "../code/LoopUnroll.js"; +import Pass from "@specs-feup/lara/api/lara/pass/Pass.ts"; +import PassResult from "@specs-feup/lara/api/lara/pass/results/PassResult.ts"; +import { DoStatement, Joinpoint } from "../Joinpoints.ts"; +import loopUnroll, { canUnroll } from "../code/LoopUnroll.ts"; /** * Pass that unrolls every innermost range do-loop in the subtree by a given @@ -18,12 +18,15 @@ import loopUnroll, { canUnroll } from "../code/LoopUnroll.js"; export default class LoopUnrollPass extends Pass { protected _name = "LoopUnrollPass"; - constructor(private readonly factor: number = 4) { + private readonly factor: number; + + constructor(factor: number = 4) { super(); + this.factor = factor; } protected _apply_impl($jp: Joinpoint): PassResult { - const loops = [...this._findInnermostLoops($jp)]; + const loops = this._findInnermostLoops($jp); let appliedPass = false; for (const $loop of loops) { loopUnroll($loop, this.factor); @@ -46,7 +49,7 @@ export default class LoopUnrollPass extends Pass { return; } } - for (const child of [...$jp.children]) { + for (const child of $jp.children) { yield* this._findInnermostLoops(child); } } diff --git a/Fortran-JS/code/WeaverConfiguration.ts b/Fortran-JS/code/WeaverConfiguration.ts new file mode 100644 index 00000000..8012ac94 --- /dev/null +++ b/Fortran-JS/code/WeaverConfiguration.ts @@ -0,0 +1,15 @@ +import type WeaverConfiguration from "@specs-feup/lara/code/WeaverConfiguration.ts"; +import path from "path"; +import { fileURLToPath } from "url"; + +export const weaverConfig: WeaverConfiguration = { + weaverName: "metafor", + weaverPrettyName: "Fortran Transpiler", + weaverFileName: "@specs-feup/lara/code/Weaver.ts", + jarPath: path.join( + path.dirname(path.dirname(fileURLToPath(import.meta.url))), + "./java-binaries/" + ), + javaWeaverQualifiedName: "pt.up.fe.specs.fortran.weaver.FortranWeaver", + importForSideEffects: ["@specs-feup/metafor/api/Joinpoints.ts"], +}; diff --git a/Fortran-JS/src-code/index.ts b/Fortran-JS/code/index.ts old mode 100644 new mode 100755 similarity index 73% rename from Fortran-JS/src-code/index.ts rename to Fortran-JS/code/index.ts index c9782c28..bdf002b8 --- a/Fortran-JS/src-code/index.ts +++ b/Fortran-JS/code/index.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import WeaverLauncher from "@specs-feup/lara/code/WeaverLauncher.js"; -import { weaverConfig } from "./WeaverConfiguration.js"; +import WeaverLauncher from "@specs-feup/lara/code/WeaverLauncher.ts"; +import { weaverConfig } from "./WeaverConfiguration.ts"; const weaverLauncher = new WeaverLauncher(weaverConfig); diff --git a/Fortran-JS/eslint.config.js b/Fortran-JS/eslint.config.js deleted file mode 100644 index 2273574c..00000000 --- a/Fortran-JS/eslint.config.js +++ /dev/null @@ -1,58 +0,0 @@ -import { fileURLToPath } from "url"; -import { dirname } from "path"; -import typescriptEslint from "typescript-eslint"; -import tsdoc from "eslint-plugin-tsdoc"; -import jest from "eslint-plugin-jest"; -import js from "@eslint/js"; -import eslintConfigPrettier from "eslint-config-prettier"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -export default [ - js.configs.recommended, - eslintConfigPrettier, - ...typescriptEslint.configs.recommended, - { - ignores: ["**/*.d.ts", "**/*.config.js"], - }, - { - plugins: { - "@typescript-eslint": typescriptEslint.plugin, - tsdoc, - }, - - languageOptions: { - parser: typescriptEslint.parser, - ecmaVersion: 5, - sourceType: "script", - - parserOptions: { - project: ["./*/tsconfig.json", "./tsconfig.*.json"], - tsconfigRootDir: __dirname, - }, - }, - - rules: { - "tsdoc/syntax": "warn", - }, - }, - { - ...typescriptEslint.configs.disableTypeChecked, - files: ["scripts/**/*.js"], - }, - { - ...jest.configs["flat/recommended"], - files: ["**/*.spec.ts", "**/*.test.ts"], - - plugins: { - jest, - }, - - languageOptions: { - globals: { - ...jest.environments.globals.globals, - }, - }, - }, -]; diff --git a/Fortran-JS/jest.config.js b/Fortran-JS/jest.config.js deleted file mode 100644 index ea4524bf..00000000 --- a/Fortran-JS/jest.config.js +++ /dev/null @@ -1,18 +0,0 @@ -const config = { - preset: "ts-jest/presets/default-esm", - testEnvironment: "node", - notify: true, - notifyMode: "always", - //verbose: true, - collectCoverage: false, - coverageDirectory: "coverage", - coverageReporters: ["text", "lcov"], - collectCoverageFrom: ["**/*[^.d].(t|j)s"], - coverageProvider: "v8", - moduleNameMapper: { - "(.+)\\.js": "$1", - }, - projects: ["src-api", "src-code"], -}; - -export default config; diff --git a/Fortran-JS/oxlint.config.ts b/Fortran-JS/oxlint.config.ts new file mode 100644 index 00000000..48ee8f17 --- /dev/null +++ b/Fortran-JS/oxlint.config.ts @@ -0,0 +1,15 @@ +import config from "@specs-feup/lara/oxlint.config.ts"; +import { defineConfig } from "oxlint"; + +export default defineConfig({ + extends: [config], + overrides: [ + { + // Generated file: enum constants are declared together with a same-named + // type alias (const objects are used instead of enums, which are not + // erasable syntax). + files: ["api/Joinpoints.ts"], + rules: { "eslint/no-redeclare": "off" }, + }, + ], +}); diff --git a/Fortran-JS/package.json b/Fortran-JS/package.json index c6832179..b42919b1 100644 --- a/Fortran-JS/package.json +++ b/Fortran-JS/package.json @@ -1,40 +1,50 @@ { "name": "@specs-feup/metafor", - "version": "22.2.1", + "version": "4.0.0", "description": "A Fortran source-to-source compiler written in Typescript", "type": "module", + "bin": { + "metafor": "./code/index.ts" + }, + "exports": { + "./api/*.test.ts": null, + "./api/*.config.ts": null, + "./api/*.js": "./api/*.ts", + "./api/*": "./api/*.ts", + "./api/*.ts": "./api/*.ts", + "./code/*.test.ts": null, + "./code/*.config.ts": null, + "./code/*.js": "./code/*.ts", + "./code/*": "./code/*.ts", + "./code/*.ts": "./code/*.ts" + }, "files": [ "api", "code", - "src-api", - "src-code", "java-binaries", ".gitignore", - "eslint.config.js", - "jest.config.js", "LICENSE", + "oxlint.config.ts", "package.json", "README.md", - "tsconfig.jest.json", "tsconfig.json", - "typedoc.config.js" + "typedoc.config.js", + "vitest.config.ts" ], - "bin": { - "metafor": "./code/index.js" - }, "scripts": { - "run": "node ./code/index.js", - "build": "tsc -b src-api src-code", - "build:api": "tsc -b src-api", - "build:code": "tsc -b src-code", + "run": "node ./code/index.ts", + "build": "tsc", "build:watch": "npm run build -- --watch", - "lint": "eslint .", - "test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --detectOpenHandles --forceExit", - "test:api": "npm run test -- src-api", - "test:code": "npm run test -- src-code", + "lint": "oxlint .", + "format": "oxfmt .", + "format:check": "oxfmt --check .", + "prepack": "node --input-type=module --eval \"import { validateJavaBinaries } from '@specs-feup/lara/scripts/validateJavaBinaries.js'; validateJavaBinaries();\"", + "test": "vitest run", + "test:api": "npm run test -- api", + "test:code": "npm run test -- code", "test:cov": "npm run test -- --coverage", "test:watch": "npm run test -- --watch", - "build-interfaces": "npx lara-build-interfaces --input ../FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranWeaver.json --lara @specs-feup/lara/LaraJoinPointSpecification.json --output src-api/Joinpoints.ts" + "build-interfaces": "lara-build-interfaces --input ../FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranWeaver.json --lara @specs-feup/lara/LaraJoinPointSpecification.json --output api/Joinpoints.ts" }, "repository": { "type": "git", @@ -54,24 +64,18 @@ }, "homepage": "https://github.com/specs-feup/fortran-transpiler#readme", "dependencies": { - "@specs-feup/lara": "~3.5.0" + "@specs-feup/lara": "^4.0.0" }, "devDependencies": { - "@jest/globals": "^30.2.0", "@types/debug": "^4.1.12", "@types/java": "^0.9.6", - "@types/jest": "^30.0.0", - "@types/node": "^20.19.41", + "@types/node": "^24.0.0", "@types/yargs": "^17.0.35", - "cross-env": "^10.1.0", - "eslint": "^9.39.2", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-jest": "^29.12.1", - "eslint-plugin-tsdoc": "^0.5.0", - "jest": "^30.2.0", - "node-notifier": "^10.0.1", - "ts-jest": "^29.4.6", - "typescript": "^5.9.3", - "typescript-eslint": "^8.52.0" + "@vitest/coverage-v8": "^4.1.10", + "oxfmt": "^0.59.0", + "oxlint": "^1.74.0", + "oxlint-tsgolint": "^7.0.2001", + "typescript": "^7.0.2", + "vitest": "^4.1.10" } } diff --git a/Fortran-JS/src-api/jest.config.js b/Fortran-JS/src-api/jest.config.js deleted file mode 100644 index 677eb937..00000000 --- a/Fortran-JS/src-api/jest.config.js +++ /dev/null @@ -1,22 +0,0 @@ -import { weaverConfig } from "../code/WeaverConfiguration.js"; - -const config = { - preset: "ts-jest/presets/default-esm", - testEnvironment: "@specs-feup/lara/jest/jestEnvironment.js", - globalSetup: "@specs-feup/lara/jest/jestGlobalSetup.js", - globalTeardown: "@specs-feup/lara/jest/jestGlobalTeardown.js", - setupFiles: ["@specs-feup/lara/jest/setupFiles/sharedJavaModule.js"], - setupFilesAfterEnv: ["@specs-feup/lara/jest/setupFiles/importSideEffects.js"], - transformIgnorePatterns: [ - "/node_modules/(?!(@specs-feup/lara|@specs-feup/metafor)/)", - ], - moduleNameMapper: { - "@specs-feup/metafor/api/(.+).js": "@specs-feup/metafor/src-api/$1", - "(.+)\\.js": "$1", - }, - testEnvironmentOptions: { - weaverConfig, - }, -}; - -export default config; diff --git a/Fortran-JS/src-api/tsconfig.json b/Fortran-JS/src-api/tsconfig.json deleted file mode 100644 index b03a6a89..00000000 --- a/Fortran-JS/src-api/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../api" - }, - "exclude": ["node_modules", "**/*.spec.ts", "**/*.test.ts"], - "references": [{ "path": "../src-code" }] -} diff --git a/Fortran-JS/src-code/WeaverConfiguration.ts b/Fortran-JS/src-code/WeaverConfiguration.ts deleted file mode 100644 index 1672db3e..00000000 --- a/Fortran-JS/src-code/WeaverConfiguration.ts +++ /dev/null @@ -1,17 +0,0 @@ -import WeaverConfiguration from "@specs-feup/lara/code/WeaverConfiguration.js"; -import path from "path"; -import { fileURLToPath, pathToFileURL } from "url"; - -const packageRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url))); - -export const weaverConfig: WeaverConfiguration = { - weaverName: "metafor", - weaverPrettyName: "Fortran Transpiler", - weaverFileName: "@specs-feup/lara/code/Weaver.js", - jarPath: path.join(packageRoot, "./java-binaries/"), - javaWeaverQualifiedName: "pt.up.fe.specs.fortran.weaver.FortranWeaver", - importForSideEffects: [ - pathToFileURL(path.join(packageRoot, "api/Joinpoints.js")).href, - pathToFileURL(path.join(packageRoot, "code/sideEffects.js")).href, - ], -}; diff --git a/Fortran-JS/src-code/jest.config.js b/Fortran-JS/src-code/jest.config.js deleted file mode 100644 index f8502043..00000000 --- a/Fortran-JS/src-code/jest.config.js +++ /dev/null @@ -1,9 +0,0 @@ -const config = { - preset: "ts-jest/presets/default-esm", - testEnvironment: "node", - moduleNameMapper: { - "(.+)\\.js": "$1", - }, -}; - -export default config; diff --git a/Fortran-JS/src-code/sideEffects.ts b/Fortran-JS/src-code/sideEffects.ts deleted file mode 100644 index 1da5e05e..00000000 --- a/Fortran-JS/src-code/sideEffects.ts +++ /dev/null @@ -1,12 +0,0 @@ -import JavaTypes from "@specs-feup/lara/api/lara/util/JavaTypes.js"; -import Weaver from "@specs-feup/lara/api/weaver/Weaver.js"; -/* -const CxxWeaverOptions = JavaTypes.getType( - "pt.up.fe.specs.clava.weaver.options.CxxWeaverOption" -); - -const datastore = Weaver.getWeaverEngine().getData().get(); - -datastore.set(CxxWeaverOptions.PARSE_INCLUDES, true); -datastore.set(CxxWeaverOptions.DISABLE_CLAVA_INFO, true); -*/ diff --git a/Fortran-JS/src-code/tsconfig.json b/Fortran-JS/src-code/tsconfig.json deleted file mode 100644 index 8061f3ca..00000000 --- a/Fortran-JS/src-code/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../code", - "composite": true - }, - "exclude": ["node_modules", "**/*.spec.ts", "**/*.test.ts"] -} diff --git a/Fortran-JS/tsconfig.jest.json b/Fortran-JS/tsconfig.jest.json deleted file mode 100644 index dd7eedda..00000000 --- a/Fortran-JS/tsconfig.jest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": ["**/*.spec.ts", "**/*.test.ts"], - "exclude": ["node_modules"] -} diff --git a/Fortran-JS/tsconfig.json b/Fortran-JS/tsconfig.json index c9ed3e71..416c1093 100644 --- a/Fortran-JS/tsconfig.json +++ b/Fortran-JS/tsconfig.json @@ -1,16 +1,14 @@ { "compilerOptions": { - "target": "ES2022", + "noEmit": true, "module": "NodeNext", "declaration": true, "strict": true, - //"allowJs": true, - //"checkJs": true, - "moduleResolution": "NodeNext", - "sourceMap": true, - "declarationMap": true, + "isolatedModules": true, "allowSyntheticDefaultImports": true, - "types": ["node", "jest"] - //"esModuleInterop": true, + "types": ["node", "vitest/globals"], + "rewriteRelativeImportExtensions": true, + "erasableSyntaxOnly": true, + "verbatimModuleSyntax": true } } diff --git a/Fortran-JS/typedoc.config.js b/Fortran-JS/typedoc.config.js index b000de54..357b6153 100644 --- a/Fortran-JS/typedoc.config.js +++ b/Fortran-JS/typedoc.config.js @@ -4,6 +4,6 @@ export default { extends: [ fileURLToPath(import.meta.resolve("@specs-feup/lara/typedoc.base.json")), ], - entryPoints: ["src-api/"], - tsconfig: "src-api/tsconfig.json", + entryPoints: ["api/"], + tsconfig: "tsconfig.json", }; diff --git a/Fortran-JS/vitest.config.ts b/Fortran-JS/vitest.config.ts new file mode 100644 index 00000000..8a6562ca --- /dev/null +++ b/Fortran-JS/vitest.config.ts @@ -0,0 +1,4 @@ +import { createWeaverVitestConfig } from "@specs-feup/lara/vitest/weaverVitestConfig.ts"; +import { weaverConfig } from "./code/WeaverConfiguration.ts"; + +export default createWeaverVitestConfig(weaverConfig); diff --git a/FortranWeaver/.gitignore b/FortranWeaver/.gitignore index 90c4faf5..0e2f4ccd 100644 --- a/FortranWeaver/.gitignore +++ b/FortranWeaver/.gitignore @@ -1,6 +1,4 @@ -src/**/abstracts/* -!src/**/abstracts/AFortranWeaverJoinPoint.java -src/**/exceptions/FortranWeaverException.java +src/**/abstracts/ src/**/enums/ *.dotty FortranWeaver.json diff --git a/FortranWeaver/build.gradle b/FortranWeaver/build.gradle index ebce122d..f83f874b 100644 --- a/FortranWeaver/build.gradle +++ b/FortranWeaver/build.gradle @@ -20,27 +20,15 @@ configurations { weaverGeneratorRuntime } -dependencies { - testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.0' - - implementation ":jOptions" - implementation ":SpecsUtils" - implementation ":GsonPlus" - - implementation ":LanguageSpecification" - implementation ":LARAI" - implementation ":LaraUtils" - implementation ":WeaverInterface" - - implementation ":FortranAst" - implementation ":FortranParser" - - weaverGeneratorRuntime ":WeaverGenerator" -} - // Project sources sourceSets { + // Spec source set: compiled independently to avoid circular dependency + spec { + java { + srcDir 'src-spec' + } + } + main { java { srcDir 'src' @@ -60,25 +48,78 @@ sourceSets { } } +dependencies { + testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.0' + + implementation ":jOptions" + implementation ":SpecsUtils" + implementation ":GsonPlus" + + implementation ":LangSpec2" + implementation ":LARAI" + implementation ":LaraUtils" + implementation ":WeaverInterface" + + implementation ":FortranAst" + implementation ":FortranParser" + + weaverGeneratorRuntime ":WeaverGen2" + + // Spec source set: only needs LangSpec2 and WeaverInterface (for BaseJoinPointSpec) + specImplementation ":LangSpec2" + specImplementation ":WeaverInterface" +} + test { useJUnitPlatform() } -// Run the weaver generator +// Generate weaver abstracts using WeaverGen2 (Java DSL-based) tasks.register('generateWeaver', JavaExec) { group = "Execution" - description = "Generates the Weaver Abstracts" - classpath = configurations.weaverGeneratorRuntime - mainClass = 'org.lara.interpreter.weaver.generator.commandline.WeaverGenerator' + description = "Generates the Weaver Abstracts using WeaverGen2" + classpath = configurations.weaverGeneratorRuntime + sourceSets.spec.runtimeClasspath + mainClass = 'org.lara.weavergen2.cli.WeaverGen2Cli' args = [ - "-w", "FortranWeaver", - "-x", "./resources/fortran/weaverspecs", - "-o", "./src", - "-p", "pt.up.fe.specs.fortran.weaver", - "-n", "pt.up.fe.specs.fortran.ast.nodes.FortranNode", - "-e", - "-j" + "pt.up.fe.specs.fortran.weaver.FortranSpec", + "${projectDir}/src", + "--base", "org.lara.interpreter.weaver.interf.BaseJoinPointSpec", + "--node", "pt.up.fe.specs.fortran.ast.nodes.FortranNode" ] } compileJava.dependsOn generateWeaver + +def fortranWeaverInstallDir = layout.buildDirectory.dir('install/FortranWeaver') +def fortJsJavaBinaries = layout.projectDirectory.dir('../Fortran-JS/java-binaries') + +def syncFortranJsJavaBinaries = tasks.register('syncFortranJsJavaBinaries', Sync) { + group = 'distribution' + description = 'Synchronizes the FortranWeaver installDist output used by Fortran-JS.' + dependsOn tasks.named('installDist') + from fortranWeaverInstallDir + into fortJsJavaBinaries + + // The destination is also used by npm packaging and must not retain files + // that are no longer part of installDist. + outputs.upToDateWhen { false } + + doFirst { + def installLib = fortranWeaverInstallDir.get().dir('lib').asFile + if (!installLib.isDirectory()) { + throw new GradleException("FortranWeaver installDist output is missing: ${installLib}") + } + + def destination = fortJsJavaBinaries.asFile.toPath() + if (java.nio.file.Files.isSymbolicLink(destination)) { + java.nio.file.Files.delete(destination) + } else if (java.nio.file.Files.exists(destination) && !java.nio.file.Files.isDirectory(destination)) { + throw new GradleException("Fortran-JS java-binaries is not a directory: ${destination}") + } + } +} + +tasks.named('installDist') { + finalizedBy syncFortranJsJavaBinaries +} diff --git a/FortranWeaver/resources/fortran/weaverspecs/actionModel.xml b/FortranWeaver/resources/fortran/weaverspecs/actionModel.xml deleted file mode 100644 index 4691e0c4..00000000 --- a/FortranWeaver/resources/fortran/weaverspecs/actionModel.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/FortranWeaver/resources/fortran/weaverspecs/artifacts.xml b/FortranWeaver/resources/fortran/weaverspecs/artifacts.xml deleted file mode 100644 index 7ce76a0d..00000000 --- a/FortranWeaver/resources/fortran/weaverspecs/artifacts.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/FortranWeaver/resources/fortran/weaverspecs/joinPointModel.xml b/FortranWeaver/resources/fortran/weaverspecs/joinPointModel.xml deleted file mode 100644 index c4de9e3c..00000000 --- a/FortranWeaver/resources/fortran/weaverspecs/joinPointModel.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/FortranWeaver/settings.gradle b/FortranWeaver/settings.gradle index 35664a97..6f37cde7 100644 --- a/FortranWeaver/settings.gradle +++ b/FortranWeaver/settings.gradle @@ -7,10 +7,10 @@ includeBuild("${specsJavaLibsRoot}/jOptions") includeBuild("${specsJavaLibsRoot}/SpecsUtils") includeBuild("${specsJavaLibsRoot}/GsonPlus") -includeBuild("${laraFrameworkRoot}/LanguageSpecification") +includeBuild("${laraFrameworkRoot}/LangSpec2") includeBuild("${laraFrameworkRoot}/LARAI") includeBuild("${laraFrameworkRoot}/LaraUtils") -includeBuild("${laraFrameworkRoot}/WeaverGenerator") +includeBuild("${laraFrameworkRoot}/WeaverGen2") includeBuild("${laraFrameworkRoot}/WeaverInterface") includeBuild("../FortranAst") diff --git a/FortranWeaver/src-spec/pt/up/fe/specs/fortran/weaver/FortranSpec.java b/FortranWeaver/src-spec/pt/up/fe/specs/fortran/weaver/FortranSpec.java new file mode 100644 index 00000000..d96755e9 --- /dev/null +++ b/FortranWeaver/src-spec/pt/up/fe/specs/fortran/weaver/FortranSpec.java @@ -0,0 +1,365 @@ +package pt.up.fe.specs.fortran.weaver; + +import org.lara.langspec2.dsl.WeaverSpec; + +/** + * Weaver specification for the FortranWeaver (Metafor), translated from the XML + * specification files (joinPointModel.xml, artifacts.xml and actionModel.xml) + * into the Java DSL. + *

+ * The weaver prefix is {@code Fortran}, so concrete join point classes follow + * the {@code Fortran} naming convention (e.g., {@code FortranProgram} + * for the {@code program} join point). The previous concrete classes used the + * {@code F} prefix and were renamed accordingly, except for + * {@code FDoConstruct} (the {@code doStatement} join point), which became + * {@code FortranDoStatement}. The join point names visible to LARA are exactly + * the ones declared in the old XML files. + */ +public class FortranSpec extends WeaverSpec { + + @Override + public void define() { + weaverPrefix("Fortran"); + packageName("pt.up.fe.specs.fortran.weaver"); + rootJoinPoint("program"); + + enumDef("DoKind") + .value("while") + .value("range") + .value("concurrent") + .end(); + + enumDef("BinaryOperatorKind") + .value("ADD") + .value("SUBTRACT") + .value("MULTIPLY") + .value("DIVIDE") + .value("POWER") + .value("LT") + .value("LE") + .value("GT") + .value("GE") + .value("EQ") + .value("NE") + .value("AND") + .end(); + + // ===================================================================== + // Global attributes and actions (weaver-specific, not in BaseJoinPointSpec) + // Excludes base contract: dump, joinPointType, node, self, children, + // descendants, scopeNodes, parent, code, line, column, toString, equals, + // compareNodes, same, instanceOf, insert + // ===================================================================== + + global() + .attribute("root", jpRef("program"), "Returns the 'program' join point") + .attribute("leftJp", jpRef("joinpoint"), + "Returns the node that came before this node, or undefined if there is none") + .attribute("rightJp", jpRef("joinpoint"), + "Returns the node that comes after this node, or undefined if there is none") + .attribute("getAncestor") + .tooltip("Looks for an ancestor joinpoint name, walking back on the AST") + .param("type", STRING) + .returns(jpRef("joinpoint")) + .attribute("contains") + .tooltip("true if the given node is a descendant of this node") + .param("jp", jpRef("joinpoint")) + .returns(BOOLEAN) + .attribute("indexOfSelf", INT, "Returns the index of this join point in relation to its parent") + .action("replaceWith") + .tooltip("Replaces this node with the given node") + .param("node", jpRef("joinpoint")) + .returns(jpRef("joinpoint")) + .action("replaceWith") + .tooltip("Overload which accepts a list of nodes") + .param("node", array(jpRef("joinpoint"))) + .returns(jpRef("joinpoint")) + .action("detach") + .tooltip("Removes node associated to the joinpoint from the AST") + .returns(jpRef("joinpoint")) + .action("insertBefore") + .tooltip("Inserts the given join point before this join point") + .param("node", jpRef("joinpoint")) + .returns(jpRef("joinpoint")) + .action("insertBefore") + .tooltip("Overload which accepts a string") + .param("node", STRING) + .returns(jpRef("joinpoint")) + .action("insertAfter") + .tooltip("Inserts the given join point after this join point") + .param("node", jpRef("joinpoint")) + .returns(jpRef("joinpoint")) + .action("insertAfter") + .tooltip("Overload which accepts a string") + .param("code", STRING) + .returns(jpRef("joinpoint")) + .action("copy") + .tooltip("Performs a copy of the node and its children, but not of the nodes in its fields") + .returns(jpRef("joinpoint")) + .action("deepCopy") + .tooltip("Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)") + .returns(jpRef("joinpoint")); + + // ===================================================================== + // Join point definitions + // ===================================================================== + + joinPoint("program") + .tooltip("Represents the complete program and is the top-most join point in the hierarchy"); + + joinPoint("file") + .tooltip("Represents a source file (e.g., .f90)") + .attribute("name", STRING, "the name of the file") + .attribute("foldername", STRING, "the name of the folder") + .defaultAttribute("name"); + + joinPoint("statement") + .tooltip("Represents a Fortran statement") + .attribute("isFirst", BOOLEAN) + .attribute("isLast", BOOLEAN); + + joinPoint("expr") + .tooltip("Represents an expression"); + + joinPoint("binaryOperator") + .extending("expr") + .tooltip("Represents a binary operation") + .attribute("left", jpRef("expr")) + .attribute("right", jpRef("expr")) + .attribute("kind", enumRef("BinaryOperatorKind")) + .action("setLeft") + .tooltip("Sets the left-hand side of the operation") + .param("lhs", jpRef("expr")) + .returns(VOID) + .action("setRight") + .tooltip("Sets the right-hand side of the operation") + .param("rhs", jpRef("expr")) + .returns(VOID); + + joinPoint("executableStatement") + .extending("statement") + .tooltip("Represents an executable statement"); + + joinPoint("actionStatement") + .extending("executableStatement") + .tooltip("Represents an action statement"); + + joinPoint("assignmentStatement") + .extending("actionStatement") + .tooltip("Represents an assignment statement") + .attribute("variable", jpRef("dataRef")) + .attribute("expr", jpRef("expr")); + + joinPoint("designator") + .extending("expr") + .tooltip("Represents a designator"); + + joinPoint("dataRef") + .extending("designator") + .tooltip("Represents a data reference") + .attribute("name", STRING); + + joinPoint("literal") + .extending("expr") + .tooltip("Represents a literal") + .attribute("literal", STRING); + + joinPoint("intLiteral") + .extending("literal"); + + joinPoint("stringLiteral") + .extending("literal"); + + joinPoint("realLiteral") + .extending("literal"); + + joinPoint("doStatement") + .extending("executableStatement") + .tooltip("Represents a do loop") + .attribute("control", jpRef("loopControl")) + .attribute("body", jpRef("execution")) + .attribute("kind", enumRef("DoKind")) + .action("copyScope") + .tooltip("Performs a copy of the do statement, including its controls, but not the body") + .returns(jpRef("doStatement")) + .action("sameScope") + .tooltip("Returns true if the given do statement has the same loop control as this do statement") + .param("loop", jpRef("doStatement")) + .returns(BOOLEAN); + + joinPoint("loopControl") + .tooltip("Represents the loop control structure, with specialized subclasses for different loop kinds"); + + joinPoint("rangeLoopControl") + .extending("loopControl") + .attribute("var", jpRef("dataRef")) + .attribute("lower", jpRef("expr")) + .attribute("upper", jpRef("expr")) + .attribute("step", jpRef("expr")) + .action("setUpper") + .param("upper", jpRef("expr")) + .returns(VOID) + .action("setStep") + .param("step", jpRef("expr")) + .returns(VOID); + + joinPoint("statementBlock") + .attribute("stmts", array(jpRef("statement"))); + + joinPoint("execution") + .extending("statementBlock") + .attribute("executableStmts", array(jpRef("executableStatement"))) + .action("insertBegin") + .param("stmt", jpRef("executableStatement")) + .returns(VOID) + .action("insertEnd") + .param("stmt", jpRef("executableStatement")) + .returns(VOID); + + joinPoint("specification") + .extending("statementBlock") + .attribute("specificationStmts", array(jpRef("specificationStatement"))) + .action("addUseStmt") + .tooltip("Adds a UseStmt to a specification part. The statement is inserted at the beginning.") + .param("stmt", jpRef("useStatement")) + .returns(VOID); + + joinPoint("arraySubscriptExpr") + .extending("dataRef") + .tooltip("Represents an access to one (or several) elements of an array") + .attribute("var", jpRef("dataRef")) + .attribute("subscripts", array(jpRef("sectionSubscript"))); + + joinPoint("compilerDirective") + .extending("executableStatement") + .attribute("pairs", array(jpRef("nameValue"))) + .attribute("directiveString", STRING, "Returns the directive's contents as a string"); + + joinPoint("nameValue") + .tooltip("Represents a name/value pair in a compiler directive") + .attribute("name", STRING); + + joinPoint("ompConstruct") + .extending("executableStatement") + .tooltip("Represents a generic OpenMP construct") + .attribute("clauses", array(jpRef("ompClause"))) + .action("setClauses") + .tooltip("Sets the construct's clauses") + .param("clauses", array(jpRef("ompClause"))) + .returns(VOID) + .action("setDirective") + .param("directive", STRING) + .returns(VOID); + + joinPoint("ompBlockConstruct") + .extending("ompConstruct") + .tooltip("Represents an OpenMP block construct (such as parallel or task)") + .action("setBody") + .param("body", jpRef("execution")) + .returns(VOID); + + joinPoint("ompLoopConstruct") + .extending("ompConstruct") + .tooltip("Represents an OpenMP loop construct (such as do or do parallel)") + .action("setLoop") + .param("loop", jpRef("doStatement")) + .returns(VOID); + + joinPoint("ompClause") + .tooltip("Represents an OpenMP clause"); + + joinPoint("ompDataSharingClause") + .extending("ompClause") + .tooltip("Represents an OpenMP datasharing clause (public, private, ...)"); + + joinPoint("ompReductionClause") + .extending("ompClause"); + + joinPoint("ompOrderedClause") + .extending("ompClause"); + + joinPoint("useStatement") + .extending("statement") + .attribute("moduleName", STRING); + + joinPoint("programUnit") + .attribute("specification", jpRef("specification"), "Returns the unit's specification part"); + + joinPoint("mainProgram") + .extending("programUnit"); + + joinPoint("subroutine") + .extending("programUnit") + .attribute("moduleName", STRING); + + joinPoint("specificationStatement") + .extending("statement"); + + joinPoint("typeDeclarationStatement") + .extending("specificationStatement") + .attribute("decls", array(jpRef("entityDecl"))) + .attribute("attrs", array(jpRef("attributeSpecifier"))); + + joinPoint("attributeSpecifier"); + + joinPoint("keywordAttributeSpecifier") + .extending("attributeSpecifier"); + + joinPoint("parameterKeyword") + .extending("keywordAttributeSpecifier"); + + joinPoint("fortranDecl"); + + joinPoint("entityDecl") + .extending("fortranDecl") + .attribute("name", STRING); + + joinPoint("initialization"); + + joinPoint("exprInitialization") + .extending("initialization") + .attribute("expr", jpRef("expr")); + + joinPoint("ifStatement") + .extending("actionStatement") + .attribute("condition", jpRef("expr")) + .attribute("statement", jpRef("actionStatement")); + + joinPoint("ifConstruct") + .extending("executableStatement") + .tooltip("Represents the root of an if construct") + .attribute("ifThenBlock", jpRef("ifThenBlock")) + .attribute("elseIfBlocks", array(jpRef("elseIfBlock"))) + .attribute("elseBlock", jpRef("elseBlock")); + + joinPoint("ifThenBlock") + .tooltip("Represents the first block of an if construct") + .attribute("header", jpRef("ifThenStatement")) + .attribute("body", jpRef("statementBlock")); + + joinPoint("ifThenStatement") + .tooltip("Represents the header of an 'if then' block") + .attribute("condition", jpRef("expr")); + + joinPoint("elseIfBlock") + .tooltip("Represents the optional 'else if' blocks of an if construct") + .attribute("header", jpRef("elseIfStatement")) + .attribute("body", jpRef("statementBlock")); + + joinPoint("elseIfStatement") + .tooltip("Represents the header of an 'else if' block") + .attribute("condition", jpRef("expr")); + + joinPoint("elseBlock") + .tooltip("Represents the optional 'else' block of an if construct") + .attribute("body", jpRef("statementBlock")); + + joinPoint("sectionSubscript") + .tooltip("Represent a generic subscript for an array"); + + joinPoint("subscript") + .extending("sectionSubscript") + .tooltip("Represent an integer subscript for an array") + .attribute("expr", jpRef("expr")); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranAstMethods.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranAstMethods.java new file mode 100644 index 00000000..c0dd1c96 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranAstMethods.java @@ -0,0 +1,50 @@ +package pt.up.fe.specs.fortran.weaver; + +import org.lara.interpreter.weaver.ast.AAstMethods; + +import pt.up.fe.specs.fortran.ast.nodes.FortranNode; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AJoinpoint; + +/** + * Bridge between the Fortran AST and the interpreter, used for generic + * traversal from the LARA side. + */ +public class FortranAstMethods extends AAstMethods { + + private final FortranWeaver weaver; + + public FortranAstMethods(FortranWeaver weaver) { + super(weaver); + this.weaver = weaver; + } + + @Override + public Class getNodeClass() { + return FortranNode.class; + } + + @Override + protected AJoinpoint toJavaJoinPointImpl(FortranNode node) { + return FortranJoinpoints.create(node, weaver); + } + + @Override + protected String getJoinPointNameImpl(FortranNode node) { + return toJavaJoinPointImpl(node).getJoinPointTypeImpl(); + } + + @Override + protected Object[] getChildrenImpl(FortranNode node) { + return node.getChildren().toArray(); + } + + @Override + protected Object[] getScopeChildrenImpl(FortranNode node) { + return getChildrenImpl(node); + } + + @Override + protected Object getParentImpl(FortranNode node) { + return node.getParent(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranJoinpoints.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranJoinpoints.java index 9553173f..48ff49f3 100644 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranJoinpoints.java +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranJoinpoints.java @@ -13,12 +13,24 @@ package pt.up.fe.specs.fortran.weaver; +import java.util.List; + import pt.up.fe.specs.fortran.ast.nodes.FortranNode; import pt.up.fe.specs.fortran.ast.nodes.decl.EntityDecl; import pt.up.fe.specs.fortran.ast.nodes.decl.ExprInitialization; import pt.up.fe.specs.fortran.ast.nodes.decl.FortranDecl; import pt.up.fe.specs.fortran.ast.nodes.decl.Initialization; -import pt.up.fe.specs.fortran.ast.nodes.expr.*; +import pt.up.fe.specs.fortran.ast.nodes.expr.ArraySubscriptExpr; +import pt.up.fe.specs.fortran.ast.nodes.expr.BinaryOperator; +import pt.up.fe.specs.fortran.ast.nodes.expr.DataRef; +import pt.up.fe.specs.fortran.ast.nodes.expr.Designator; +import pt.up.fe.specs.fortran.ast.nodes.expr.Expr; +import pt.up.fe.specs.fortran.ast.nodes.expr.IntLiteral; +import pt.up.fe.specs.fortran.ast.nodes.expr.Literal; +import pt.up.fe.specs.fortran.ast.nodes.expr.RealLiteral; +import pt.up.fe.specs.fortran.ast.nodes.expr.SectionSubscript; +import pt.up.fe.specs.fortran.ast.nodes.expr.StringLiteral; +import pt.up.fe.specs.fortran.ast.nodes.expr.Subscript; import pt.up.fe.specs.fortran.ast.nodes.loops.LoopControl; import pt.up.fe.specs.fortran.ast.nodes.loops.RangeLoopControl; import pt.up.fe.specs.fortran.ast.nodes.omp.OmpBlockConstruct; @@ -28,101 +40,168 @@ import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpDataSharingClause; import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpOrderedClause; import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpReductionClause; -import pt.up.fe.specs.fortran.ast.nodes.program.*; -import pt.up.fe.specs.fortran.ast.nodes.stmt.*; -import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.*; +import pt.up.fe.specs.fortran.ast.nodes.program.Application; +import pt.up.fe.specs.fortran.ast.nodes.program.Execution; +import pt.up.fe.specs.fortran.ast.nodes.program.MainProgram; +import pt.up.fe.specs.fortran.ast.nodes.program.ProgramUnit; +import pt.up.fe.specs.fortran.ast.nodes.program.Specification; +import pt.up.fe.specs.fortran.ast.nodes.program.StmtBlock; +import pt.up.fe.specs.fortran.ast.nodes.program.Subroutine; +import pt.up.fe.specs.fortran.ast.nodes.stmt.ActionStmt; +import pt.up.fe.specs.fortran.ast.nodes.stmt.AssignmentStmt; +import pt.up.fe.specs.fortran.ast.nodes.stmt.CompilerDirective; +import pt.up.fe.specs.fortran.ast.nodes.stmt.ExecutableStmt; +import pt.up.fe.specs.fortran.ast.nodes.stmt.SpecificationStmt; +import pt.up.fe.specs.fortran.ast.nodes.stmt.Stmt; +import pt.up.fe.specs.fortran.ast.nodes.stmt.TypeDeclarationStmt; +import pt.up.fe.specs.fortran.ast.nodes.stmt.UseStmt; +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.ElseBlock; +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.ElseIfBlock; +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.ElseIfStmt; +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfConstruct; +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfStmt; +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfThenBlock; +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfThenStmt; import pt.up.fe.specs.fortran.ast.nodes.stmt.loop.DoConstruct; import pt.up.fe.specs.fortran.ast.nodes.type.attributes.AttributeSpecifier; import pt.up.fe.specs.fortran.ast.nodes.type.attributes.KeywordAttributeSpecifier; import pt.up.fe.specs.fortran.ast.nodes.type.attributes.ParameterKeyword; import pt.up.fe.specs.fortran.ast.nodes.utils.NameValue; -import pt.up.fe.specs.fortran.weaver.abstracts.AFortranWeaverJoinPoint; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AJoinPoint; -import pt.up.fe.specs.fortran.weaver.joinpoints.*; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AJoinpoint; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranActionStatement; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranArraySubscriptExpr; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranAssignmentStatement; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranAttributeSpecifier; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranBinaryOperator; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranCompilerDirective; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranDataRef; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranDesignator; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranDoStatement; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranElseBlock; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranElseIfBlock; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranElseIfStatement; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranEntityDecl; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranExecutableStatement; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranExecution; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranExpr; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranExprInitialization; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranFile; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranFortranDecl; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranIfConstruct; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranIfStatement; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranIfThenBlock; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranIfThenStatement; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranInitialization; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranIntLiteral; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranJoinpoint; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranKeywordAttributeSpecifier; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranLiteral; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranLoopControl; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranMainProgram; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranNameValue; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranOmpBlockConstruct; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranOmpClause; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranOmpConstruct; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranOmpDataSharingClause; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranOmpLoopConstruct; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranOmpOrderedClause; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranOmpReductionClause; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranParameterKeyword; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranProgram; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranProgramUnit; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranRangeLoopControl; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranRealLiteral; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranSectionSubscript; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranSpecification; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranSpecificationStatement; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranStatement; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranStatementBlock; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranStringLiteral; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranSubroutine; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranSubscript; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranTypeDeclarationStatement; +import pt.up.fe.specs.fortran.weaver.joinpoints.FortranUseStatement; import pt.up.fe.specs.util.SpecsCollections; import pt.up.fe.specs.util.SpecsLogs; import pt.up.fe.specs.util.classmap.BiFunctionClassMap; -import java.util.List; - public class FortranJoinpoints { - private static final BiFunctionClassMap JOINPOINT_FACTORY; + private static final BiFunctionClassMap> JOINPOINT_FACTORY; static { JOINPOINT_FACTORY = new BiFunctionClassMap<>(); - JOINPOINT_FACTORY.put(Application.class, FProgram::new); - JOINPOINT_FACTORY.put(FortranFile.class, FFile::new); - JOINPOINT_FACTORY.put(Stmt.class, FStatement::new); - JOINPOINT_FACTORY.put(ActionStmt.class, FActionStatement::new); - JOINPOINT_FACTORY.put(ArraySubscriptExpr.class, FArraySubscriptExpr::new); - JOINPOINT_FACTORY.put(AssignmentStmt.class, FAssignmentStatement::new); - JOINPOINT_FACTORY.put(BinaryOperator.class, FBinaryOperator::new); - JOINPOINT_FACTORY.put(CompilerDirective.class, FCompilerDirective::new); - JOINPOINT_FACTORY.put(DataRef.class, FDataRef::new); - JOINPOINT_FACTORY.put(Designator.class, FDesignator::new); - JOINPOINT_FACTORY.put(DoConstruct.class, FDoConstruct::new); - JOINPOINT_FACTORY.put(ExecutableStmt.class, FExecutableStatement::new); - JOINPOINT_FACTORY.put(Execution.class, FExecution::new); - JOINPOINT_FACTORY.put(Expr.class, FExpr::new); - JOINPOINT_FACTORY.put(IntLiteral.class, FIntLiteral::new); - JOINPOINT_FACTORY.put(Literal.class, FLiteral::new); - JOINPOINT_FACTORY.put(LoopControl.class, FLoopControl::new); - JOINPOINT_FACTORY.put(NameValue.class, FNameValue::new); - JOINPOINT_FACTORY.put(RangeLoopControl.class, FRangeLoopControl::new); - JOINPOINT_FACTORY.put(RealLiteral.class, FRealLiteral::new); - JOINPOINT_FACTORY.put(StmtBlock.class, FStatementBlock::new); - JOINPOINT_FACTORY.put(StringLiteral.class, FStringLiteral::new); - JOINPOINT_FACTORY.put(Specification.class, FSpecification::new); - JOINPOINT_FACTORY.put(OmpConstruct.class, FOmpConstruct::new); - JOINPOINT_FACTORY.put(OmpClause.class, FOmpClause::new); - JOINPOINT_FACTORY.put(OmpLoopConstruct.class, FOmpLoopConstruct::new); - JOINPOINT_FACTORY.put(OmpBlockConstruct.class, FOmpBlockConstruct::new); - JOINPOINT_FACTORY.put(OmpDataSharingClause.class, FOmpDataSharingClause::new); - JOINPOINT_FACTORY.put(UseStmt.class, FUseStatement::new); - JOINPOINT_FACTORY.put(ProgramUnit.class, FProgramUnit::new); - JOINPOINT_FACTORY.put(Subroutine.class, FSubroutine::new); - JOINPOINT_FACTORY.put(OmpReductionClause.class, FOmpReductionClause::new); - JOINPOINT_FACTORY.put(OmpOrderedClause.class, FOmpOrderedClause::new); - JOINPOINT_FACTORY.put(IfStmt.class, FIfStatement::new); - JOINPOINT_FACTORY.put(IfConstruct.class, FIfConstruct::new); - JOINPOINT_FACTORY.put(IfThenBlock.class, FIfThenBlock::new); - JOINPOINT_FACTORY.put(IfThenStmt.class, FIfThenStatement::new); - JOINPOINT_FACTORY.put(ElseIfBlock.class, FElseIfBlock::new); - JOINPOINT_FACTORY.put(ElseIfStmt.class, FElseIfStatement::new); - JOINPOINT_FACTORY.put(ElseBlock.class, FElseBlock::new); - JOINPOINT_FACTORY.put(Subroutine.class, FSubroutine::new); - JOINPOINT_FACTORY.put(SpecificationStmt.class, FSpecificationStatement::new); - JOINPOINT_FACTORY.put(TypeDeclarationStmt.class, FTypeDeclarationStatement::new); - JOINPOINT_FACTORY.put(AttributeSpecifier.class, FAttributeSpecifier::new); - JOINPOINT_FACTORY.put(KeywordAttributeSpecifier.class, FKeywordAttributeSpecifier::new); - JOINPOINT_FACTORY.put(ParameterKeyword.class, FParameterKeyword::new); - JOINPOINT_FACTORY.put(FortranDecl.class, FFortranDecl::new); - JOINPOINT_FACTORY.put(EntityDecl.class, FEntityDecl::new); - JOINPOINT_FACTORY.put(Initialization.class, FInitialization::new); - JOINPOINT_FACTORY.put(ExprInitialization.class, FExprInitialization::new); - JOINPOINT_FACTORY.put(Subscript.class, FSubscript::new); - JOINPOINT_FACTORY.put(SectionSubscript.class, FSectionSubscript::new); + JOINPOINT_FACTORY.put(Application.class, FortranProgram::new); + JOINPOINT_FACTORY.put(pt.up.fe.specs.fortran.ast.nodes.program.FortranFile.class, FortranFile::new); + JOINPOINT_FACTORY.put(Stmt.class, FortranStatement::new); + JOINPOINT_FACTORY.put(ActionStmt.class, FortranActionStatement::new); + JOINPOINT_FACTORY.put(ArraySubscriptExpr.class, FortranArraySubscriptExpr::new); + JOINPOINT_FACTORY.put(AssignmentStmt.class, FortranAssignmentStatement::new); + JOINPOINT_FACTORY.put(BinaryOperator.class, FortranBinaryOperator::new); + JOINPOINT_FACTORY.put(CompilerDirective.class, FortranCompilerDirective::new); + JOINPOINT_FACTORY.put(DataRef.class, FortranDataRef::new); + JOINPOINT_FACTORY.put(Designator.class, FortranDesignator::new); + JOINPOINT_FACTORY.put(DoConstruct.class, FortranDoStatement::new); + JOINPOINT_FACTORY.put(ExecutableStmt.class, FortranExecutableStatement::new); + JOINPOINT_FACTORY.put(Execution.class, FortranExecution::new); + JOINPOINT_FACTORY.put(Expr.class, FortranExpr::new); + JOINPOINT_FACTORY.put(IntLiteral.class, FortranIntLiteral::new); + JOINPOINT_FACTORY.put(Literal.class, FortranLiteral::new); + JOINPOINT_FACTORY.put(LoopControl.class, FortranLoopControl::new); + JOINPOINT_FACTORY.put(NameValue.class, FortranNameValue::new); + JOINPOINT_FACTORY.put(RangeLoopControl.class, FortranRangeLoopControl::new); + JOINPOINT_FACTORY.put(RealLiteral.class, FortranRealLiteral::new); + JOINPOINT_FACTORY.put(StmtBlock.class, FortranStatementBlock::new); + JOINPOINT_FACTORY.put(StringLiteral.class, FortranStringLiteral::new); + JOINPOINT_FACTORY.put(Specification.class, FortranSpecification::new); + JOINPOINT_FACTORY.put(OmpConstruct.class, FortranOmpConstruct::new); + JOINPOINT_FACTORY.put(OmpClause.class, FortranOmpClause::new); + JOINPOINT_FACTORY.put(OmpLoopConstruct.class, FortranOmpLoopConstruct::new); + JOINPOINT_FACTORY.put(OmpBlockConstruct.class, FortranOmpBlockConstruct::new); + JOINPOINT_FACTORY.put(OmpDataSharingClause.class, FortranOmpDataSharingClause::new); + JOINPOINT_FACTORY.put(UseStmt.class, FortranUseStatement::new); + JOINPOINT_FACTORY.put(ProgramUnit.class, FortranProgramUnit::new); + JOINPOINT_FACTORY.put(Subroutine.class, FortranSubroutine::new); + JOINPOINT_FACTORY.put(OmpReductionClause.class, FortranOmpReductionClause::new); + JOINPOINT_FACTORY.put(OmpOrderedClause.class, FortranOmpOrderedClause::new); + JOINPOINT_FACTORY.put(IfStmt.class, FortranIfStatement::new); + JOINPOINT_FACTORY.put(IfConstruct.class, FortranIfConstruct::new); + JOINPOINT_FACTORY.put(IfThenBlock.class, FortranIfThenBlock::new); + JOINPOINT_FACTORY.put(IfThenStmt.class, FortranIfThenStatement::new); + JOINPOINT_FACTORY.put(ElseIfBlock.class, FortranElseIfBlock::new); + JOINPOINT_FACTORY.put(ElseIfStmt.class, FortranElseIfStatement::new); + JOINPOINT_FACTORY.put(ElseBlock.class, FortranElseBlock::new); + JOINPOINT_FACTORY.put(MainProgram.class, FortranMainProgram::new); + JOINPOINT_FACTORY.put(SpecificationStmt.class, FortranSpecificationStatement::new); + JOINPOINT_FACTORY.put(TypeDeclarationStmt.class, FortranTypeDeclarationStatement::new); + JOINPOINT_FACTORY.put(AttributeSpecifier.class, FortranAttributeSpecifier::new); + JOINPOINT_FACTORY.put(KeywordAttributeSpecifier.class, FortranKeywordAttributeSpecifier::new); + JOINPOINT_FACTORY.put(ParameterKeyword.class, FortranParameterKeyword::new); + JOINPOINT_FACTORY.put(FortranDecl.class, FortranFortranDecl::new); + JOINPOINT_FACTORY.put(EntityDecl.class, FortranEntityDecl::new); + JOINPOINT_FACTORY.put(Initialization.class, FortranInitialization::new); + JOINPOINT_FACTORY.put(ExprInitialization.class, FortranExprInitialization::new); + JOINPOINT_FACTORY.put(Subscript.class, FortranSubscript::new); + JOINPOINT_FACTORY.put(SectionSubscript.class, FortranSectionSubscript::new); JOINPOINT_FACTORY.put(FortranNode.class, FortranJoinpoints::defaultFactory); } - - private static AFortranWeaverJoinPoint defaultFactory(FortranNode node, FortranWeaver weaver) { + private static AJoinpoint defaultFactory(FortranNode node, FortranWeaver weaver) { SpecsLogs.debug(() -> "Factory not defined for nodes of class '" + node.getClass().getSimpleName() + "'"); - return new GenericFortranJoinpoint(node, weaver); + return new FortranJoinpoint<>(node, weaver); } - public static AFortranWeaverJoinPoint create(FortranNode node, FortranWeaver weaver) { + public static AJoinpoint create(FortranNode node, FortranWeaver weaver) { if (node == null) { - SpecsLogs.debug("CxxJoinpoints: tried to create join point from null node, returning undefined"); + SpecsLogs.debug("FortranJoinpoints: tried to create join point from null node, returning undefined"); return null; } return JOINPOINT_FACTORY.apply(node, weaver); } - public static T create(FortranNode node, FortranWeaver weaver, Class targetClass) { + public static > T create(FortranNode node, FortranWeaver weaver, Class targetClass) { if (targetClass == null) { throw new RuntimeException("Check if you meant to call 'create' with a single argument"); } @@ -130,7 +209,8 @@ public static T create(FortranNode node, FortranWeaver we return targetClass.cast(create(node, weaver)); } - public static T[] create(List nodes, FortranWeaver weaver, Class targetClass) { + public static > T[] create(List nodes, FortranWeaver weaver, + Class targetClass) { return nodes.stream() .map(node -> create(node, weaver, targetClass)) .toArray(size -> SpecsCollections.newArray(targetClass, size)); diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranWeaver.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranWeaver.java index 93ced03e..869a3c4c 100644 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranWeaver.java +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranWeaver.java @@ -1,14 +1,18 @@ package pt.up.fe.specs.fortran.weaver; +import java.io.File; +import java.util.Collections; +import java.util.List; +import java.util.Map; + import org.lara.interpreter.joptions.config.interpreter.LaraiKeys; +import org.lara.interpreter.weaver.ast.AstMethods; import org.lara.interpreter.weaver.interf.AGear; -import org.lara.interpreter.weaver.interf.JoinPoint; import org.lara.interpreter.weaver.options.WeaverOption; import org.lara.interpreter.weaver.options.WeaverOptionUtils; import org.lara.interpreter.weaver.utils.SourcesGatherer; -import org.lara.language.specification.dsl.LanguageSpecification; -import org.suikasoft.jOptions.DataStore.SimpleDataStore; import org.suikasoft.jOptions.Interfaces.DataStore; + import pt.up.fe.specs.fortran.ast.FortranAstOptions; import pt.up.fe.specs.fortran.ast.FortranContext; import pt.up.fe.specs.fortran.ast.FortranNodeFactory; @@ -16,19 +20,18 @@ import pt.up.fe.specs.fortran.ast.nodes.program.Application; import pt.up.fe.specs.fortran.ast.nodes.program.FortranFile; import pt.up.fe.specs.fortran.parser.ApplicationParser; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AJoinpoint; import pt.up.fe.specs.fortran.weaver.abstracts.weaver.AFortranWeaver; import pt.up.fe.specs.util.SpecsIo; import pt.up.fe.specs.util.SpecsLogs; -import java.io.File; -import java.util.Collections; -import java.util.List; -import java.util.Map; - /** * Weaver Implementation for FortranWeaver
- * Since the generated abstract classes are always overwritten, their implementation should be done by extending those abstract classes with user-defined classes.
- * The abstract class {@link pt.up.fe.specs.fortran.weaver.abstracts.AFortranWeaverJoinPoint} contains attributes and actions common to all join points. + * Since the generated abstract classes are always overwritten, their implementation should be done by extending those + * abstract classes with user-defined classes.
+ * The abstract class {@link pt.up.fe.specs.fortran.weaver.joinpoints.FortranJoinpoint} can be used to add + * user-defined methods and fields which the user intends to add for all join points and are not intended to be used in + * LARA aspects. * * @author Lara Weaver Generator */ @@ -37,15 +40,11 @@ public class FortranWeaver extends AFortranWeaver { private final static String WOVEN_CODE_DIR = "woven_code"; private List currentSources; - private DataStore currentArgs; - private Map allSourceFiles; private Application currentRoot; public FortranWeaver() { this.currentSources = Collections.emptyList(); - this.currentArgs = new SimpleDataStore(getStoreDefinition()); - this.allSourceFiles = Collections.emptyMap(); this.currentRoot = null; } @@ -59,14 +58,12 @@ public FortranWeaver() { * @return true if initialization occurred without problems, false otherwise */ @Override - public boolean begin(List sources, File outputDir, DataStore args) { + protected boolean begin(List sources, File outputDir, DataStore args) { + setData(args); // Set fields this.currentSources = sources; - //this.currentOutputDir = outputDir; - this.currentArgs = args; - this.allSourceFiles = SourcesGatherer.build(sources, List.of("json", "f90", "f", "for")).getSourceFiles(); var fortranOptions = args; @@ -84,7 +81,7 @@ public boolean begin(List sources, File outputDir, DataStore args) { * @return an instance of the join point root/program */ @Override - public JoinPoint getRootJp() { + public AJoinpoint getRootJp() { return FortranJoinpoints.create(currentRoot, this); } @@ -94,9 +91,9 @@ public JoinPoint getRootJp() { * @return if close was successful */ @Override - public boolean close() { + protected boolean close() { - var baseOutputFolder = currentArgs.hasValue(LaraiKeys.OUTPUT_FOLDER) ? currentArgs.get(LaraiKeys.OUTPUT_FOLDER) : + var baseOutputFolder = dataStore.hasValue(LaraiKeys.OUTPUT_FOLDER) ? dataStore.get(LaraiKeys.OUTPUT_FOLDER) : new File("./"); var outputFolder = new File(baseOutputFolder, WOVEN_CODE_DIR); @@ -145,25 +142,13 @@ public List getOptions() { return WeaverOptionUtils.toWeaverOption(FortranAstOptions.STORE_DEFINITION); } - /** - * Builds the language specification, based on the input XML files. - * - * @return a new {@link LanguageSpecification} instance for this weaver - */ - public static LanguageSpecification buildLanguageSpecification() { - return LanguageSpecification.newInstance(() -> "fortran/weaverspecs/" + LanguageSpecification.getJoinPointsFilename(), - () -> "fortran/weaverspecs/" + LanguageSpecification.getAttributesFilename(), - () -> "fortran/weaverspecs/" + LanguageSpecification.getActionsFilename()); + @Override + public String getName() { + return "FortranWeaver"; } - /** - * Builds the language specification, based on the input XML files. - * - * @return a new {@link LanguageSpecification} instance for this weaver - */ - @Override - protected LanguageSpecification buildLangSpecs() { - return buildLanguageSpecification(); + public Application getRootNode() { + return currentRoot; } public FortranNodeFactory getFactory() { @@ -173,4 +158,9 @@ public FortranNodeFactory getFactory() { public FortranContext getContext() { return currentRoot.get(FortranNode.CONTEXT); } + + @Override + public AstMethods getAstMethods() { + return new FortranAstMethods(this); + } } diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranWeaver.json b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranWeaver.json deleted file mode 100644 index 94364748..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/FortranWeaver.json +++ /dev/null @@ -1,12906 +0,0 @@ -{ - "root": "program", - "rootAlias": "program", - "children": [ - { - "type": "joinpoint", - "name": "joinpoint", - "extends": "" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "actionStatement", - "extends": "executableStatement" , - "tooltip": "Represents an action statement", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "arraySubscriptExpr", - "extends": "dataRef" , - "tooltip": "Represents an access to one (or several) elements of an array", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "sectionSubscript[]", - "name": "subscripts" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "dataRef", - "name": "var" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "String", - "name": "name" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "assignmentStatement", - "extends": "actionStatement" , - "tooltip": "Represents an assignment statement", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "expr" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "dataRef", - "name": "variable" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "attributeSpecifier", - "extends": "joinpoint" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "binaryOperator", - "extends": "expr" , - "tooltip": "Represents a binary operation", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "[add| sub| mul| div| gt| ge| lt| le| eq| ne]", - "name": "kind" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "left" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "right" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Sets the left-hand side of the operation", - "children": [ - { - "type": "void", - "name": "setLeft" - }, - { - "type": "expr", - "name": "lhs", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Sets the right-hand side of the operation", - "children": [ - { - "type": "void", - "name": "setRight" - }, - { - "type": "expr", - "name": "rhs", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "compilerDirective", - "extends": "executableStatement" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns the directive's contents as a string", - "children": [ - { - "type": "String", - "name": "directiveString" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "nameValue[]", - "name": "pairs" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "dataRef", - "extends": "designator" , - "tooltip": "Represents a data reference", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "String", - "name": "name" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "designator", - "extends": "expr" , - "tooltip": "Represents a designator", - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "doStatement", - "extends": "executableStatement" , - "tooltip": "Represents a do loop", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "execution", - "name": "body" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "loopControl", - "name": "control" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "[while| range| concurrent]", - "name": "kind" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the do statement, including its controls, but not the body", - "children": [ - { - "type": "doStatement", - "name": "copyScope" - }] - }, - { - "type": "action", - "tooltip": "Returns true if the given do statement has the same loop control as this do statement", - "children": [ - { - "type": "boolean", - "name": "sameScope" - }, - { - "type": "doStatement", - "name": "loop", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "elseBlock", - "extends": "joinpoint" , - "tooltip": "Represents the optional 'else' block of an if construct", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "statementBlock", - "name": "body" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "elseIfBlock", - "extends": "joinpoint" , - "tooltip": "Represents the optional 'else if' blocks of an if construct", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "statementBlock", - "name": "body" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "elseIfStatement", - "name": "header" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "elseIfStatement", - "extends": "joinpoint" , - "tooltip": "Represents the header of an 'else if' block", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "condition" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "entityDecl", - "extends": "fortranDecl" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "String", - "name": "name" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "executableStatement", - "extends": "statement" , - "tooltip": "Represents an executable statement", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "execution", - "extends": "statementBlock" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "executableStatement[]", - "name": "executableStmts" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "statement[]", - "name": "stmts" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "children": [ - { - "type": "void", - "name": "insertBegin" - }, - { - "type": "executableStatement", - "name": "stmt", - "defaultValue": "" - }] - }, - { - "type": "action", - "children": [ - { - "type": "void", - "name": "insertEnd" - }, - { - "type": "executableStatement", - "name": "stmt", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "expr", - "extends": "joinpoint" , - "tooltip": "Represents an expression", - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "exprInitialization", - "extends": "initialization" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "expr" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "file", - "defaultAttr": "name", - "extends": "joinpoint" , - "tooltip": "Represents a source file (e.g., .f90)", - "children": [ - { - "type": "attribute", - "tooltip": "the name of the folder", - "children": [ - { - "type": "String", - "name": "foldername" - }] - }, - { - "type": "attribute", - "tooltip": "the name of the file", - "children": [ - { - "type": "String", - "name": "name" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "fortranDecl", - "extends": "joinpoint" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ifConstruct", - "extends": "executableStatement" , - "tooltip": "Represents the root of an if construct", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "elseBlock", - "name": "elseBlock" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "elseIfBlock[]", - "name": "elseIfBlocks" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "ifThenBlock", - "name": "ifThenBlock" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ifStatement", - "extends": "actionStatement" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "condition" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "actionStatement", - "name": "statement" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ifThenBlock", - "extends": "joinpoint" , - "tooltip": "Represents the first block of an if construct", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "statementBlock", - "name": "body" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "ifThenStatement", - "name": "header" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ifThenStatement", - "extends": "joinpoint" , - "tooltip": "Represents the header of an 'if then' block", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "condition" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "initialization", - "extends": "joinpoint" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "intLiteral", - "extends": "literal" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "String", - "name": "literal" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "keywordAttributeSpecifier", - "extends": "attributeSpecifier" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "literal", - "extends": "expr" , - "tooltip": "Represents a literal", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "String", - "name": "literal" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "loopControl", - "extends": "joinpoint" , - "tooltip": "Represents the loop control structure, with specialized subclasses for different loop kinds", - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "mainProgram", - "extends": "programUnit" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns the unit's specification part", - "children": [ - { - "type": "specification", - "name": "specification" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "nameValue", - "extends": "joinpoint" , - "tooltip": "Represents a name/value pair in a compiler directive", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "String", - "name": "name" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ompBlockConstruct", - "extends": "ompConstruct" , - "tooltip": "Represents an OpenMP block construct (such as parallel or task)", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "ompClause[]", - "name": "clauses" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "children": [ - { - "type": "void", - "name": "setBody" - }, - { - "type": "execution", - "name": "body", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Sets the construct's clauses", - "children": [ - { - "type": "void", - "name": "setClauses" - }, - { - "type": "ompClause[]", - "name": "clauses", - "defaultValue": "" - }] - }, - { - "type": "action", - "children": [ - { - "type": "void", - "name": "setDirective" - }, - { - "type": "String", - "name": "directive", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ompClause", - "extends": "joinpoint" , - "tooltip": "Represents an OpenMP clause", - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ompConstruct", - "extends": "executableStatement" , - "tooltip": "Represents a generic OpenMP construct", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "ompClause[]", - "name": "clauses" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Sets the construct's clauses", - "children": [ - { - "type": "void", - "name": "setClauses" - }, - { - "type": "ompClause[]", - "name": "clauses", - "defaultValue": "" - }] - }, - { - "type": "action", - "children": [ - { - "type": "void", - "name": "setDirective" - }, - { - "type": "String", - "name": "directive", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ompDataSharingClause", - "extends": "ompClause" , - "tooltip": "Represents an OpenMP datasharing clause (public, private, ...)", - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ompLoopConstruct", - "extends": "ompConstruct" , - "tooltip": "Represents an OpenMP loop construct (such as do or do parallel)", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "ompClause[]", - "name": "clauses" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "children": [ - { - "type": "void", - "name": "setLoop" - }, - { - "type": "doStatement", - "name": "loop", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Sets the construct's clauses", - "children": [ - { - "type": "void", - "name": "setClauses" - }, - { - "type": "ompClause[]", - "name": "clauses", - "defaultValue": "" - }] - }, - { - "type": "action", - "children": [ - { - "type": "void", - "name": "setDirective" - }, - { - "type": "String", - "name": "directive", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ompOrderedClause", - "extends": "ompClause" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "ompReductionClause", - "extends": "ompClause" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "parameterKeyword", - "extends": "keywordAttributeSpecifier" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "program", - "extends": "joinpoint" , - "tooltip": "Represents the complete program and is the top-most join point in the hierarchy", - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "programUnit", - "extends": "joinpoint" , - "children": [ - { - "type": "attribute", - "tooltip": "Returns the unit's specification part", - "children": [ - { - "type": "specification", - "name": "specification" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "rangeLoopControl", - "extends": "loopControl" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "lower" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "step" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "upper" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "dataRef", - "name": "var" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "children": [ - { - "type": "void", - "name": "setStep" - }, - { - "type": "expr", - "name": "step", - "defaultValue": "" - }] - }, - { - "type": "action", - "children": [ - { - "type": "void", - "name": "setUpper" - }, - { - "type": "expr", - "name": "upper", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "realLiteral", - "extends": "literal" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "String", - "name": "literal" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "sectionSubscript", - "extends": "joinpoint" , - "tooltip": "Represent a generic subscript for an array", - "children": [ - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "specification", - "extends": "statementBlock" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "specificationStatement[]", - "name": "specificationStmts" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "statement[]", - "name": "stmts" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Adds a UseStmt to a specification part. The statement is inserted at the beginning.", - "children": [ - { - "type": "void", - "name": "addUseStmt" - }, - { - "type": "useStatement", - "name": "stmt", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "specificationStatement", - "extends": "statement" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "statement", - "extends": "joinpoint" , - "tooltip": "Represents a Fortran statement", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "statementBlock", - "extends": "joinpoint" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "statement[]", - "name": "stmts" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "stringLiteral", - "extends": "literal" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "String", - "name": "literal" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "subroutine", - "extends": "programUnit" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "String", - "name": "moduleName" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the unit's specification part", - "children": [ - { - "type": "specification", - "name": "specification" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "subscript", - "extends": "sectionSubscript" , - "tooltip": "Represent an integer subscript for an array", - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "expr", - "name": "expr" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "typeDeclarationStatement", - "extends": "specificationStatement" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "attributeSpecifier[]", - "name": "attrs" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "entityDecl[]", - "name": "decls" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }, - { - "type": "joinpoint", - "name": "useStatement", - "extends": "statement" , - "children": [ - { - "type": "attribute", - "children": [ - { - "type": "String", - "name": "moduleName" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isFirst" - }] - }, - { - "type": "attribute", - "children": [ - { - "type": "Boolean", - "name": "isLast" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the children of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "children" - }] - }, - { - "type": "attribute", - "tooltip": "String with the code represented by this node", - "children": [ - { - "type": "String", - "name": "code" - }] - }, - { - "type": "attribute", - "tooltip": "true if the given node is a descendant of this node", - "children": [ - { - "type": "Boolean", - "name": "contains" - }, - { - "type": "joinpoint", - "name": "jp", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns an array with the descendants of the node", - "children": [ - { - "type": "joinpoint[]", - "name": "descendants" - }] - }, - { - "type": "attribute", - "tooltip": "Looks for an ancestor joinpoint name, walking back on the AST", - "children": [ - { - "type": "joinpoint", - "name": "getAncestor" - }, - { - "type": "String", - "name": "type", - "defaultValue": "" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the index of this join point in relation to its parent", - "children": [ - { - "type": "int", - "name": "indexOfSelf" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that came before this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "leftJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the parent node in the AST, or undefined if it is the root node", - "children": [ - { - "type": "joinpoint", - "name": "parent" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the node that comes after this node, or undefined if there is none", - "children": [ - { - "type": "joinpoint", - "name": "rightJp" - }] - }, - { - "type": "attribute", - "tooltip": "Returns the 'program' join point", - "children": [ - { - "type": "program", - "name": "root" - }] - }, - { - "type": "attribute", - "tooltip": "the nodes of the scope of the current join point. If this node has a body (e.g., loop, function) corresponds to the children of the body. Otherwise, returns an empty array", - "children": [ - { - "type": "joinpoint[]", - "name": "scopeNodes" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, but not of the nodes in its fields", - "children": [ - { - "type": "joinpoint", - "name": "copy" - }] - }, - { - "type": "action", - "tooltip": "Performs a copy of the node and its children, including the nodes in their fields (only the first level of field nodes, this function is not recursive)", - "children": [ - { - "type": "joinpoint", - "name": "deepCopy" - }] - }, - { - "type": "action", - "tooltip": "Removes node associated to the joinpoint from the AST", - "children": [ - { - "type": "joinpoint", - "name": "detach" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point after this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertAfter" - }, - { - "type": "String", - "name": "code", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Inserts the given join point before this join point", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a string", - "children": [ - { - "type": "joinpoint", - "name": "insertBefore" - }, - { - "type": "String", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Replaces this node with the given node", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint", - "name": "node", - "defaultValue": "" - }] - }, - { - "type": "action", - "tooltip": "Overload which accepts a list of join points", - "children": [ - { - "type": "joinpoint", - "name": "replaceWith" - }, - { - "type": "joinpoint[]", - "name": "node", - "defaultValue": "" - }] - }] - }] -} \ No newline at end of file diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/abstracts/AFortranWeaverJoinPoint.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/abstracts/AFortranWeaverJoinPoint.java deleted file mode 100644 index 87ec7773..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/abstracts/AFortranWeaverJoinPoint.java +++ /dev/null @@ -1,233 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.abstracts; - -import org.lara.interpreter.weaver.interf.JoinPoint; -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.utils.Position; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AJoinPoint; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AProgram; -import pt.up.fe.specs.util.SpecsLogs; -import pt.up.fe.specs.util.exceptions.NotImplementedException; -import pt.up.fe.specs.util.treenode.NodeInsertUtils; - -import java.util.Arrays; -import java.util.Collections; -import java.util.Objects; -import java.util.stream.Stream; - -/** - * Abstract class which can be edited by the developer. This class will not be overwritten. - * - * @author Lara Weaver Generator - */ -public abstract class AFortranWeaverJoinPoint extends AJoinPoint { - - /** - * - */ - public AFortranWeaverJoinPoint(FortranWeaver weaver){ - super(weaver); - } - /** - * Returns the Weaving Engine this join point pertains to. - */ - @Override - public FortranWeaver getWeaverEngine() { - return (FortranWeaver) super.getWeaverEngine(); - } - - /** - * Compares the two join points based on their node reference of the used compiler/parsing tool.
- * This is the default implementation for comparing two join points.
- * Note for developers: A weaver may override this implementation in the editable abstract join point, so - * the changes are made for all join points, or override this method in specific join points. - */ - @Override - public boolean compareNodes(AJoinPoint aJoinPoint) { - return this.getNode().equals(aJoinPoint.getNode()); - } - - @Override - public String getCodeImpl() { - return getNode().getCode(); - } - - @Override - public AJoinPoint getParentImpl() { - return FortranJoinpoints.create(getNode().getParent(), getWeaverEngine()); - } - - @Override - public AProgram getRootImpl() { - return (AProgram) getWeaverEngine().getRootJp(); - } - - @Override - public AJoinPoint[] getChildrenArrayImpl() { - return FortranJoinpoints.create(getNode().getChildren(), getWeaverEngine(), AJoinPoint.class); - } - - @Override - public AJoinPoint[] getDescendantsArrayImpl() { - return FortranJoinpoints.create(getNode().getDescendants(), getWeaverEngine(), AJoinPoint.class); - } - - @Override - public AJoinPoint[] getScopeNodesArrayImpl() { - throw new NotImplementedException(this); - } - - @Override - public Stream getJpChildrenStream() { - return getNode().getChildrenStream() - .map(node -> FortranJoinpoints.create(node, getWeaverEngine(), AJoinPoint.class)); - } - - @Override - public JoinPoint getJpParent() { - return getParentImpl(); - } - - @Override - public AJoinPoint[] insertImpl(String position, JoinPoint joinPoint) { - var insertedNode = getNode().insert(Position.valueOf(position.toUpperCase()), (FortranNode) joinPoint.getNode()); - - return new AJoinPoint[]{FortranJoinpoints.create(insertedNode, getWeaverEngine(), AJoinPoint.class)}; - } - - @Override - public AJoinPoint[] insertImpl(String position, String code) { - var insertedNode = getNode().insert(Position.valueOf(position.toUpperCase()), code); - - return new AJoinPoint[]{FortranJoinpoints.create(insertedNode, getWeaverEngine(), AJoinPoint.class)}; - } - - @Override - public AJoinPoint insertAfterImpl(AJoinPoint node) { - var insertedNode = getNode().insert(Position.AFTER, node.getNode()); - - return FortranJoinpoints.create(insertedNode, getWeaverEngine()); - } - - @Override - public AJoinPoint insertBeforeImpl(AJoinPoint node) { - var insertedNode = getNode().insert(Position.AFTER, node.getNode()); - - return FortranJoinpoints.create(insertedNode, getWeaverEngine()); - } - - - public static FortranNode replace(FortranNode target, FortranNode newNode) { - return NodeInsertUtils.replace(target, newNode); - } - - @Override - public AJoinPoint replaceWithImpl(AJoinPoint node) { - return FortranJoinpoints.create(replace(getNode(), node.getNode()), getWeaverEngine()); - } - - @Override - public AJoinPoint replaceWithImpl(AJoinPoint[] node) { - // Insert nodes after in reverse order, to preserve order of comments and pragmas - var reverseNodes = Arrays.asList(node); - Collections.reverse(reverseNodes); - - AJoinPoint topInserted = null; - for (var nodeToInsert : reverseNodes) { - topInserted = insertAfterImpl(nodeToInsert); - } - - // Remove current node from the tree - detach(); - - // Return the first inserted element - return topInserted; - } - - @Override - public AJoinPoint detachImpl() { - FortranNode node = getNode(); - - if (!node.hasParent()) { - SpecsLogs.msgInfo( - "action detach: could not find a parent in joinpoint of type '" + getJoinPointType() + "'"); - return this; - } - - node.detach(); - return this; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof AJoinPoint)) { - return false; - } - - return getNode().equals(((AJoinPoint) obj).getNode()); - } - - @Override - public int hashCode() { - return getNode().hashCode(); - } - - @Override - public AJoinPoint getAncestorImpl(String type) { - Objects.requireNonNull(type, () -> "Missing type of ancestor in attribute 'ancestor'"); - - if (type.equals("program")) { - SpecsLogs.warn("Consider using attribute .root, instead of .ancestor('program')"); - } - - FortranNode currentNode = getNode(); - while (currentNode.hasParent()) { - // Create join point for testing type - AFortranWeaverJoinPoint parentJp = FortranJoinpoints.create(currentNode.getParent(), getWeaverEngine()); - - if (parentJp.instanceOf(type)) { - return parentJp; - } - - currentNode = parentJp.getNode(); - } - - return null; - } - - @Override - public Boolean containsImpl(AJoinPoint jp) { - FortranNode clavaNode = jp.getNode(); - - return getNode().getDescendantsStream() - .anyMatch(child -> child == clavaNode); - } - - @Override - public AJoinPoint getLeftJpImpl() { - return getNode().getLeft().map(node -> FortranJoinpoints.create(node, getWeaverEngine())).orElse(null); - } - - @Override - public AJoinPoint getRightJpImpl() { - return getNode().getRight().map(node -> FortranJoinpoints.create(node, getWeaverEngine())).orElse(null); - } - - @Override - public Integer getIndexOfSelfImpl() { - return getNode().indexOfSelf(); - } - - @Override - public AJoinPoint copyImpl() { - FortranNode copiedNode = getNode().copyShallow(); - return FortranJoinpoints.create(copiedNode, getWeaverEngine()); - } - - @Override - public AJoinPoint deepCopyImpl() { - FortranNode copiedNode = getNode().copy(); - return FortranJoinpoints.create(copiedNode, getWeaverEngine()); - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/importable/AstFactory.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/importable/AstFactory.java index 888925e6..f1f52aa1 100644 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/importable/AstFactory.java +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/importable/AstFactory.java @@ -21,10 +21,10 @@ public class AstFactory { public static AOmpLoopConstruct ompLoopConstruct(FortranWeaver weaver, ADoStatement loop, Object[] args) { List clauses = SpecsCollections.asListT(AOmpClause.class, args) .stream() - .map(clause -> (OmpClause) clause.getNode()) + .map(clause -> (OmpClause) clause.getNodeImpl()) .toList(); - var doConstruct = (DoConstruct) loop.getNode(); + var doConstruct = (DoConstruct) loop.getNodeImpl(); return FortranJoinpoints.create(weaver.getFactory().ompLoopConstruct(doConstruct, clauses), weaver, AOmpLoopConstruct.class); } @@ -40,7 +40,7 @@ public static AOmpBlockConstruct emptyOmpBlockConstruct(FortranWeaver weaver) { public static AOmpDataSharingClause ompPrivateClause(FortranWeaver weaver, Object[] args) { List dataRefs = SpecsCollections.asListT(ADataRef.class, args) .stream() - .map(clause -> (DataRef) clause.getNode()) + .map(clause -> (DataRef) clause.getNodeImpl()) .toList(); return FortranJoinpoints.create(weaver.getFactory().ompDataSharingClause(OmpClauseKind.PRIVATE, dataRefs), weaver, AOmpDataSharingClause.class); @@ -57,7 +57,7 @@ public static AUseStatement useStatement(FortranWeaver weaver, String moduleName public static AOmpReductionClause ompReductionClause(FortranWeaver weaver, String operator, Object[] args) { List dataRefs = SpecsCollections.asListT(ADataRef.class, args) .stream() - .map(clause -> (DataRef) clause.getNode()) + .map(clause -> (DataRef) clause.getNodeImpl()) .toList(); BinaryOperatorKind kind = BinaryOperatorKind.valueOf(operator); @@ -68,7 +68,7 @@ public static AOmpReductionClause ompReductionClause(FortranWeaver weaver, Strin public static AExecution execution(FortranWeaver weaver, Object[] args) { List stmts = SpecsCollections.asListT(AExecutableStatement.class, args) .stream() - .map(stmt -> (ExecutableStmt) stmt.getNode()) + .map(stmt -> (ExecutableStmt) stmt.getNodeImpl()) .toList(); return FortranJoinpoints.create(weaver.getFactory().execution(stmts), weaver, AExecution.class); @@ -99,9 +99,9 @@ public static ABinaryOperator binaryOperatorDivide(FortranWeaver weaver, AExpr l } public static ARangeLoopControl rangeLoopControl(FortranWeaver weaver, ADataRef var, AExpr lower, AExpr upper) { - DataRef varNode = (DataRef) var.getNode(); - Expr lowerNode = (Expr) lower.getNode(); - Expr upperNode = (Expr) upper.getNode(); + DataRef varNode = (DataRef) var.getNodeImpl(); + Expr lowerNode = (Expr) lower.getNodeImpl(); + Expr upperNode = (Expr) upper.getNodeImpl(); return FortranJoinpoints.create( weaver.getFactory().rangeLoopControl(varNode, lowerNode, upperNode), weaver, @@ -110,7 +110,7 @@ public static ARangeLoopControl rangeLoopControl(FortranWeaver weaver, ADataRef } public static ADoStatement doStatement(FortranWeaver weaver, ARangeLoopControl control) { - RangeLoopControl ctrl = (RangeLoopControl) control.getNode(); + RangeLoopControl ctrl = (RangeLoopControl) control.getNodeImpl(); return FortranJoinpoints.create( weaver.getFactory().doConstruct(ctrl), weaver, @@ -122,7 +122,7 @@ public static AExpr intrinsicCall(FortranWeaver weaver, String name, Object[] ar DataRef callee = weaver.getFactory().dataRef(name); List argNodes = SpecsCollections.asListT(AExpr.class, args) .stream() - .map(a -> weaver.getFactory().argument((Expr) a.getNode())) + .map(a -> weaver.getFactory().argument((Expr) a.getNodeImpl())) .collect(Collectors.toList()); return FortranJoinpoints.create( weaver.getFactory().functionCall(callee, argNodes), @@ -131,8 +131,8 @@ public static AExpr intrinsicCall(FortranWeaver weaver, String name, Object[] ar } private static ABinaryOperator binaryOperator(FortranWeaver weaver, BinaryOperatorKind kind, AExpr lhs, AExpr rhs) { - Expr lhsNode = (Expr) lhs.getNode(); - Expr rhsNode = (Expr) rhs.getNode(); + Expr lhsNode = (Expr) lhs.getNodeImpl(); + Expr rhsNode = (Expr) rhs.getNodeImpl(); return FortranJoinpoints.create( weaver.getFactory().binaryOperator(kind, lhsNode, rhsNode), weaver, diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FActionStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FActionStatement.java deleted file mode 100644 index 485a44b4..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FActionStatement.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.ActionStmt; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AActionStatement; - -public class FActionStatement extends AActionStatement { - - private final ActionStmt actionStmt; - - public FActionStatement(ActionStmt actionStmt, FortranWeaver weaver) { - super(new FExecutableStatement(actionStmt, weaver), weaver); - this.actionStmt = actionStmt; - } - - @Override - public FortranNode getNode() { - return actionStmt; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FArraySubscriptExpr.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FArraySubscriptExpr.java deleted file mode 100644 index 06d42e10..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FArraySubscriptExpr.java +++ /dev/null @@ -1,36 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.ArraySubscriptExpr; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.*; - -public class FArraySubscriptExpr extends AArraySubscriptExpr { - - private final ArraySubscriptExpr arraySubscriptExpr; - - public FArraySubscriptExpr(ArraySubscriptExpr arraySubscriptExpr, FortranWeaver weaver) { - super(new FDataRef(arraySubscriptExpr, weaver), weaver); - this.arraySubscriptExpr = arraySubscriptExpr; - } - - @Override - public ASectionSubscript[] getSubscriptsArrayImpl() { - return arraySubscriptExpr.getSubscripts() - .stream() - .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) - .toList() - .toArray(new ASectionSubscript[0]); - } - - @Override - public ADataRef getVarImpl() { - return FortranJoinpoints.create(arraySubscriptExpr.getRef(), getWeaverEngine(), ADataRef.class); - } - - @Override - public FortranNode getNode() { - return arraySubscriptExpr; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FAssignmentStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FAssignmentStatement.java deleted file mode 100644 index e89bf0d3..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FAssignmentStatement.java +++ /dev/null @@ -1,34 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.AssignmentStmt; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AAssignmentStatement; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADataRef; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; - -public class FAssignmentStatement extends AAssignmentStatement { - - private final AssignmentStmt assignmentStmt; - - public FAssignmentStatement(AssignmentStmt assignmentStmt, FortranWeaver weaver) { - super(new FActionStatement(assignmentStmt, weaver), weaver); - this.assignmentStmt = assignmentStmt; - } - - @Override - public AExpr getExprImpl() { - return FortranJoinpoints.create(assignmentStmt.getExpression(), getWeaverEngine(), AExpr.class); - } - - @Override - public ADataRef getVariableImpl() { - return FortranJoinpoints.create(assignmentStmt.getVariable(), getWeaverEngine(), ADataRef.class); - } - - @Override - public FortranNode getNode() { - return assignmentStmt; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FAttributeSpecifier.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FAttributeSpecifier.java deleted file mode 100644 index 594f5804..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FAttributeSpecifier.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.type.attributes.AttributeSpecifier; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AAttributeSpecifier; - -public class FAttributeSpecifier extends AAttributeSpecifier { - - public final AttributeSpecifier attributeSpecifier; - - public FAttributeSpecifier(AttributeSpecifier attributeSpecifier, FortranWeaver weaver) { - super(weaver); - this.attributeSpecifier = attributeSpecifier; - } - - @Override - public FortranNode getNode() { - return null; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FBinaryOperator.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FBinaryOperator.java deleted file mode 100644 index 4251b656..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FBinaryOperator.java +++ /dev/null @@ -1,38 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.BinaryOperator; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ABinaryOperator; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; - -public class FBinaryOperator extends ABinaryOperator { - - private final BinaryOperator binaryOperator; - - public FBinaryOperator(BinaryOperator binaryOperator, FortranWeaver weaver) { - super(new FExpr(binaryOperator, weaver), weaver); - this.binaryOperator = binaryOperator; - } - - @Override - public String getKindImpl() { - return binaryOperator.getOp().toString(); - } - - @Override - public AExpr getLeftImpl() { - return FortranJoinpoints.create(binaryOperator.getLhs(), getWeaverEngine(), AExpr.class); - } - - @Override - public AExpr getRightImpl() { - return FortranJoinpoints.create(binaryOperator.getRhs(), getWeaverEngine(), AExpr.class); - } - - @Override - public FortranNode getNode() { - return binaryOperator; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FCompilerDirective.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FCompilerDirective.java deleted file mode 100644 index b1a0c393..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FCompilerDirective.java +++ /dev/null @@ -1,37 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.CompilerDirective; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ACompilerDirective; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ANameValue; - -public class FCompilerDirective extends ACompilerDirective { - - private final CompilerDirective compilerDirective; - - public FCompilerDirective(CompilerDirective compilerDirective, FortranWeaver weaver) { - super(new FExecutableStatement(compilerDirective, weaver), weaver); - this.compilerDirective = compilerDirective; - } - - @Override - public String getDirectiveStringImpl() { - return compilerDirective.getDirectiveString(); - } - - @Override - public ANameValue[] getPairsArrayImpl() { - return (ANameValue[]) compilerDirective.getPairs() - .stream() - .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) - .toArray(); - } - - @Override - public FortranNode getNode() { - return compilerDirective; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FDataRef.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FDataRef.java deleted file mode 100644 index 308e35d3..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FDataRef.java +++ /dev/null @@ -1,26 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.DataRef; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADataRef; - -public class FDataRef extends ADataRef { - - private final DataRef dataRef; - - public FDataRef(DataRef dataRef, FortranWeaver weaver) { - super(new FDesignator(dataRef, weaver), weaver); - this.dataRef = dataRef; - } - - @Override - public String getNameImpl() { - return dataRef.getName(); - } - - @Override - public FortranNode getNode() { - return dataRef; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FDesignator.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FDesignator.java deleted file mode 100644 index 1ff5d726..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FDesignator.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.Designator; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADesignator; - -public class FDesignator extends ADesignator { - - private final Designator designator; - - public FDesignator(Designator designator, FortranWeaver weaver) { - super(new FExpr(designator, weaver), weaver); - this.designator = designator; - } - - @Override - public FortranNode getNode() { - return designator; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FDoConstruct.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FDoConstruct.java deleted file mode 100644 index a6994853..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FDoConstruct.java +++ /dev/null @@ -1,56 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.loop.DoConstruct; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADoStatement; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExecution; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ALoopControl; - -import java.util.Objects; - -public class FDoConstruct extends ADoStatement { - - private final DoConstruct doConstruct; - - public FDoConstruct(DoConstruct doConstruct, FortranWeaver weaver) { - super(new FExecutableStatement(doConstruct, weaver), weaver); - this.doConstruct = doConstruct; - } - - @Override - public AExecution getBodyImpl() { - return FortranJoinpoints.create(doConstruct.getBody(), getWeaverEngine(), AExecution.class); - } - - @Override - public ALoopControl getControlImpl() { - return FortranJoinpoints.create(doConstruct.getControl().get(), getWeaverEngine(), ALoopControl.class); - } - - @Override - public String getKindImpl() { - return doConstruct.getKind().toString().toLowerCase(); - } - - @Override - public ADoStatement copyScopeImpl() { - DoConstruct copiedDoStmt = (DoConstruct) doConstruct.copy(); - copiedDoStmt.getBody().removeChildren(); - return new FDoConstruct(copiedDoStmt, getWeaverEngine()); - } - - @Override - public boolean sameScopeImpl(ADoStatement loop) { - if (!Objects.equals(this.getKindImpl(), loop.getKindImpl())) { - return false; - } - return Objects.equals(this.getControlImpl().getCodeImpl(), loop.getControlImpl().getCodeImpl()); - } - - @Override - public FortranNode getNode() { - return doConstruct; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FElseBlock.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FElseBlock.java deleted file mode 100644 index 774384cd..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FElseBlock.java +++ /dev/null @@ -1,28 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.ElseBlock; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AElseBlock; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatementBlock; - -public class FElseBlock extends AElseBlock { - - public final ElseBlock elseBlock; - - public FElseBlock(ElseBlock elseBlock, FortranWeaver weaver) { - super(weaver); - this.elseBlock = elseBlock; - } - - @Override - public AStatementBlock getBodyImpl() { - return FortranJoinpoints.create(elseBlock.getBlock(), getWeaverEngine(), AStatementBlock.class); - } - - @Override - public FortranNode getNode() { - return elseBlock; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FElseIfBlock.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FElseIfBlock.java deleted file mode 100644 index ff6bb47d..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FElseIfBlock.java +++ /dev/null @@ -1,34 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.ElseIfBlock; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AElseIfBlock; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AElseIfStatement; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatementBlock; - -public class FElseIfBlock extends AElseIfBlock { - - public final ElseIfBlock elseIfBlock; - - public FElseIfBlock(ElseIfBlock elseIfBlock, FortranWeaver weaver) { - super(weaver); - this.elseIfBlock = elseIfBlock; - } - - @Override - public AStatementBlock getBodyImpl() { - return FortranJoinpoints.create(elseIfBlock.getBlock(), getWeaverEngine(), AStatementBlock.class); - } - - @Override - public AElseIfStatement getHeaderImpl() { - return FortranJoinpoints.create(elseIfBlock.getElseIfStmt(), getWeaverEngine(), AElseIfStatement.class); - } - - @Override - public FortranNode getNode() { - return elseIfBlock; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FElseIfStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FElseIfStatement.java deleted file mode 100644 index e2248e1c..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FElseIfStatement.java +++ /dev/null @@ -1,28 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.ElseIfStmt; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AElseIfStatement; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; - -public class FElseIfStatement extends AElseIfStatement { - - public final ElseIfStmt elseIfStmt; - - public FElseIfStatement(ElseIfStmt elseIfStmt, FortranWeaver weaver) { - super(weaver); - this.elseIfStmt = elseIfStmt; - } - - @Override - public AExpr getConditionImpl() { - return FortranJoinpoints.create(elseIfStmt.getCondition(), getWeaverEngine(), AExpr.class); - } - - @Override - public FortranNode getNode() { - return elseIfStmt; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FEntityDecl.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FEntityDecl.java deleted file mode 100644 index 8c636ed6..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FEntityDecl.java +++ /dev/null @@ -1,26 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.decl.EntityDecl; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AEntityDecl; - -public class FEntityDecl extends AEntityDecl { - - public final EntityDecl entityDecl; - - public FEntityDecl(EntityDecl entityDecl, FortranWeaver weaver) { - super(new FFortranDecl(entityDecl, weaver), weaver); - this.entityDecl = entityDecl; - } - - @Override - public String getNameImpl() { - return entityDecl.get(EntityDecl.NAME); - } - - @Override - public FortranNode getNode() { - return entityDecl; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExecutableStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExecutableStatement.java deleted file mode 100644 index c7d5814a..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExecutableStatement.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.ExecutableStmt; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExecutableStatement; - -public class FExecutableStatement extends AExecutableStatement { - - private final ExecutableStmt executableStmt; - - public FExecutableStatement(ExecutableStmt executableStmt, FortranWeaver weaver) { - super(new FStatement(executableStmt, weaver), weaver); - this.executableStmt = executableStmt; - } - - @Override - public FortranNode getNode() { - return executableStmt; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExecution.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExecution.java deleted file mode 100644 index d4a6464b..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExecution.java +++ /dev/null @@ -1,45 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.program.Execution; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExecutableStatement; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExecution; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatement; - -import java.util.stream.Collectors; - -public class FExecution extends AExecution { - - private final Execution execution; - - public FExecution(Execution execution, FortranWeaver weaver) { - super(new FStatementBlock(execution, weaver), weaver); - this.execution = execution; - } - - @Override - public AExecutableStatement[] getExecutableStmtsArrayImpl() { - return execution.getStatements() - .stream() - .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) - .toList() - .toArray(new AExecutableStatement[0]); - } - - @Override - public void insertBeginImpl(AExecutableStatement stmt) { - execution.addChild(0, stmt.getNode()); - } - - @Override - public void insertEndImpl(AExecutableStatement stmt) { - execution.addChild(stmt.getNode()); - } - - @Override - public FortranNode getNode() { - return execution; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExpr.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExpr.java deleted file mode 100644 index 9f9c592c..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExpr.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.Expr; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; - -public class FExpr extends AExpr { - - private final Expr expr; - - public FExpr(Expr expr, FortranWeaver weaver) { - super(weaver); - this.expr = expr; - } - - @Override - public FortranNode getNode() { - return expr; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExprInitialization.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExprInitialization.java deleted file mode 100644 index 2d95143f..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FExprInitialization.java +++ /dev/null @@ -1,28 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.decl.ExprInitialization; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExprInitialization; - -public class FExprInitialization extends AExprInitialization { - - public final ExprInitialization exprInitialization; - - public FExprInitialization(ExprInitialization exprInitialization, FortranWeaver weaver) { - super(new FInitialization(exprInitialization, weaver), weaver); - this.exprInitialization = exprInitialization; - } - - @Override - public AExpr getExprImpl() { - return FortranJoinpoints.create(exprInitialization.getExpr(), getWeaverEngine(), AExpr.class); - } - - @Override - public FortranNode getNode() { - return exprInitialization; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FFile.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FFile.java deleted file mode 100644 index b43b3422..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FFile.java +++ /dev/null @@ -1,31 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.program.FortranFile; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AFile; - -public class FFile extends AFile { - - private final FortranFile file; - - public FFile(FortranFile file, FortranWeaver weaver) { - super(weaver); - this.file = file; - } - - @Override - public FortranNode getNode() { - return file; - } - - @Override - public String getNameImpl() { - return file.get(FortranFile.FILE_NAME); - } - - @Override - public String getFoldernameImpl() { - return file.get(FortranFile.FOLDER_NAME); - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FFortranDecl.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FFortranDecl.java deleted file mode 100644 index 9d67e153..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FFortranDecl.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.decl.FortranDecl; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AFortranDecl; - -public class FFortranDecl extends AFortranDecl { - - public final FortranDecl fortranDecl; - - public FFortranDecl(FortranDecl fortranDecl, FortranWeaver weaver) { - super(weaver); - this.fortranDecl = fortranDecl; - } - - @Override - public FortranNode getNode() { - return fortranDecl; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfConstruct.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfConstruct.java deleted file mode 100644 index 14299397..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfConstruct.java +++ /dev/null @@ -1,41 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfConstruct; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.*; - -public class FIfConstruct extends AIfConstruct { - - public final IfConstruct ifConstruct; - - public FIfConstruct(IfConstruct ifConstruct, FortranWeaver weaver) { - super(new FExecutableStatement(ifConstruct, weaver), weaver); - this.ifConstruct = ifConstruct; - } - - @Override - public AElseBlock getElseBlockImpl() { - return FortranJoinpoints.create(ifConstruct.getElseBlock().get(), getWeaverEngine(), AElseBlock.class); - } - - @Override - public AElseIfBlock[] getElseIfBlocksArrayImpl() { - return ifConstruct.getElseIfBlocks() - .stream() - .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) - .toList() - .toArray(new AElseIfBlock[0]); - } - - @Override - public AIfThenBlock getIfThenBlockImpl() { - return FortranJoinpoints.create(ifConstruct.getIfThenBlock(), getWeaverEngine(), AIfThenBlock.class); - } - - @Override - public FortranNode getNode() { - return ifConstruct; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfStatement.java deleted file mode 100644 index e3ec850b..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfStatement.java +++ /dev/null @@ -1,34 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfStmt; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AActionStatement; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIfStatement; - -public class FIfStatement extends AIfStatement { - - public final IfStmt ifStmt; - - public FIfStatement(IfStmt ifStmt, FortranWeaver weaver) { - super(new FActionStatement(ifStmt, weaver), weaver); - this.ifStmt = ifStmt; - } - - @Override - public AExpr getConditionImpl() { - return FortranJoinpoints.create(ifStmt.getCondition(), getWeaverEngine(), AExpr.class); - } - - @Override - public AActionStatement getStatementImpl() { - return FortranJoinpoints.create(ifStmt.getThenAction(), getWeaverEngine(), AActionStatement.class); - } - - @Override - public FortranNode getNode() { - return ifStmt; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfThenBlock.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfThenBlock.java deleted file mode 100644 index 20818eb9..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfThenBlock.java +++ /dev/null @@ -1,34 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfThenBlock; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIfThenBlock; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIfThenStatement; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatementBlock; - -public class FIfThenBlock extends AIfThenBlock { - - public final IfThenBlock ifThenBlock; - - public FIfThenBlock(IfThenBlock ifThenBlock, FortranWeaver weaver) { - super(weaver); - this.ifThenBlock = ifThenBlock; - } - - @Override - public AStatementBlock getBodyImpl() { - return FortranJoinpoints.create(ifThenBlock.getBlock(), getWeaverEngine(), AStatementBlock.class); - } - - @Override - public AIfThenStatement getHeaderImpl() { - return FortranJoinpoints.create(ifThenBlock.getIfThenStmt(), getWeaverEngine(), AIfThenStatement.class); - } - - @Override - public FortranNode getNode() { - return ifThenBlock; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfThenStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfThenStatement.java deleted file mode 100644 index 0c4457ea..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIfThenStatement.java +++ /dev/null @@ -1,28 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfThenStmt; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIfThenStatement; - -public class FIfThenStatement extends AIfThenStatement { - - public final IfThenStmt ifThenStmt; - - public FIfThenStatement(IfThenStmt ifThenStmt, FortranWeaver weaver) { - super(weaver); - this.ifThenStmt = ifThenStmt; - } - - @Override - public AExpr getConditionImpl() { - return FortranJoinpoints.create(ifThenStmt.getCondition(), getWeaverEngine(), AExpr.class); - } - - @Override - public FortranNode getNode() { - return ifThenStmt; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FInitialization.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FInitialization.java deleted file mode 100644 index 2f73fe07..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FInitialization.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.decl.Initialization; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AInitialization; - -public class FInitialization extends AInitialization { - - public final Initialization initialization; - - public FInitialization(Initialization initialization, FortranWeaver weaver) { - super(weaver); - this.initialization = initialization; - } - - @Override - public FortranNode getNode() { - return null; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIntLiteral.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIntLiteral.java deleted file mode 100644 index 9898b2d1..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FIntLiteral.java +++ /dev/null @@ -1,22 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.IntLiteral; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIntLiteral; - -public class FIntLiteral extends AIntLiteral { - - private final IntLiteral intLiteral; - - public FIntLiteral(IntLiteral intLiteral, FortranWeaver weaver) { - super(new FLiteral(intLiteral, weaver), weaver); - - this.intLiteral = intLiteral; - } - - @Override - public FortranNode getNode() { - return intLiteral; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FKeywordAttributeSpecifier.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FKeywordAttributeSpecifier.java deleted file mode 100644 index 5f591375..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FKeywordAttributeSpecifier.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.type.attributes.KeywordAttributeSpecifier; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AKeywordAttributeSpecifier; - -public class FKeywordAttributeSpecifier extends AKeywordAttributeSpecifier { - - public final KeywordAttributeSpecifier keywordAttributeSpecifier; - - public FKeywordAttributeSpecifier(KeywordAttributeSpecifier keywordAttributeSpecifier, FortranWeaver weaver) { - super(new FAttributeSpecifier(keywordAttributeSpecifier, weaver), weaver); - this.keywordAttributeSpecifier = keywordAttributeSpecifier; - } - - @Override - public FortranNode getNode() { - return keywordAttributeSpecifier; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FLiteral.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FLiteral.java deleted file mode 100644 index d5b2dc34..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FLiteral.java +++ /dev/null @@ -1,27 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.Literal; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ALiteral; - -public class FLiteral extends ALiteral { - - private final Literal literal; - - public FLiteral(Literal literal, FortranWeaver weaver) { - super(new FExpr(literal, weaver), weaver); - - this.literal = literal; - } - - @Override - public String getLiteralImpl() { - return literal.getLiteral(); - } - - @Override - public FortranNode getNode() { - return literal; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FLoopControl.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FLoopControl.java deleted file mode 100644 index 3ac68cde..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FLoopControl.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.loops.LoopControl; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ALoopControl; - -public class FLoopControl extends ALoopControl { - - private final LoopControl loopControl; - - public FLoopControl(LoopControl loopControl, FortranWeaver weaver) { - super(weaver); - this.loopControl = loopControl; - } - - @Override - public FortranNode getNode() { - return loopControl; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FMainProgram.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FMainProgram.java deleted file mode 100644 index 16603154..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FMainProgram.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.program.MainProgram; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AMainProgram; - -public class FMainProgram extends AMainProgram { - - public final MainProgram mainProgram; - - public FMainProgram(MainProgram mainProgram, FortranWeaver weaver) { - super(new FProgramUnit(mainProgram, weaver), weaver); - this.mainProgram = mainProgram; - } - - @Override - public FortranNode getNode() { - return null; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FNameValue.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FNameValue.java deleted file mode 100644 index e8c7fdbd..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FNameValue.java +++ /dev/null @@ -1,26 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.utils.NameValue; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ANameValue; - -public class FNameValue extends ANameValue { - - private final NameValue nameValue; - - public FNameValue(NameValue nameValue, FortranWeaver weaver) { - super(weaver); - this.nameValue = nameValue; - } - - @Override - public String getNameImpl() { - return nameValue.getName(); - } - - @Override - public FortranNode getNode() { - return nameValue; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpBlockConstruct.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpBlockConstruct.java deleted file mode 100644 index 63e79512..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpBlockConstruct.java +++ /dev/null @@ -1,28 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.omp.OmpBlockConstruct; -import pt.up.fe.specs.fortran.ast.nodes.program.Execution; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExecution; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpBlockConstruct; - -public class FOmpBlockConstruct extends AOmpBlockConstruct { - - public final OmpBlockConstruct ompBlockConstruct; - - public FOmpBlockConstruct(OmpBlockConstruct ompBlockConstruct, FortranWeaver weaver) { - super(new FOmpConstruct(ompBlockConstruct, weaver), weaver); - this.ompBlockConstruct = ompBlockConstruct; - } - - @Override - public void setBodyImpl(AExecution body) { - ompBlockConstruct.setBody((Execution) body.getNode()); - } - - @Override - public FortranNode getNode() { - return ompBlockConstruct; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpClause.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpClause.java deleted file mode 100644 index 5d1afdee..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpClause.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpClause; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpClause; - -public class FOmpClause extends AOmpClause { - - public final OmpClause ompClause; - - public FOmpClause(OmpClause ompClause, FortranWeaver weaver) { - super(weaver); - this.ompClause = ompClause; - } - - @Override - public FortranNode getNode() { - return ompClause; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpConstruct.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpConstruct.java deleted file mode 100644 index f3dd40b4..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpConstruct.java +++ /dev/null @@ -1,52 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.omp.OmpConstruct; -import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpClause; -import pt.up.fe.specs.fortran.ast.nodes.omp.enums.OmpDirectiveKind; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpClause; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpConstruct; - -import java.util.Arrays; -import java.util.List; - -public class FOmpConstruct extends AOmpConstruct { - - public final OmpConstruct ompConstruct; - - public FOmpConstruct(OmpConstruct ompConstruct, FortranWeaver weaver) { - super(new FExecutableStatement(ompConstruct, weaver), weaver); - this.ompConstruct = ompConstruct; - } - - @Override - public AOmpClause[] getClausesArrayImpl() { - return ompConstruct.getClauses() - .stream() - .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) - .toList() - .toArray(new AOmpClause[0]); - } - - @Override - public void setClausesImpl(AOmpClause[] clauses) { - List clauseList = Arrays.stream(clauses) - .map(c -> (OmpClause) c.getNode()) - .toList(); - - ompConstruct.setClauses(clauseList); - } - - @Override - public void setDirectiveImpl(String directive) { - ompConstruct.set(OmpConstruct.KINDS, OmpDirectiveKind.getKinds(directive)); - } - - @Override - public FortranNode getNode() { - return ompConstruct; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpDataSharingClause.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpDataSharingClause.java deleted file mode 100644 index 5f172e8a..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpDataSharingClause.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpDataSharingClause; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpDataSharingClause; - -public class FOmpDataSharingClause extends AOmpDataSharingClause { - - public final OmpDataSharingClause ompDataSharingClause; - - public FOmpDataSharingClause(OmpDataSharingClause ompDataSharingClause, FortranWeaver weaver) { - super(new FOmpClause(ompDataSharingClause, weaver), weaver); - this.ompDataSharingClause = ompDataSharingClause; - } - - @Override - public FortranNode getNode() { - return ompDataSharingClause; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpLoopConstruct.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpLoopConstruct.java deleted file mode 100644 index 96d458ed..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpLoopConstruct.java +++ /dev/null @@ -1,28 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.omp.OmpLoopConstruct; -import pt.up.fe.specs.fortran.ast.nodes.stmt.loop.DoConstruct; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADoStatement; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpLoopConstruct; - -public class FOmpLoopConstruct extends AOmpLoopConstruct { - - public final OmpLoopConstruct ompLoopConstruct; - - public FOmpLoopConstruct(OmpLoopConstruct ompLoopConstruct, FortranWeaver weaver) { - super(new FOmpConstruct(ompLoopConstruct, weaver), weaver); - this.ompLoopConstruct = ompLoopConstruct; - } - - @Override - public void setLoopImpl(ADoStatement loop) { - ompLoopConstruct.setLoop((DoConstruct) loop.getNode()); - } - - @Override - public FortranNode getNode() { - return ompLoopConstruct; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpOrderedClause.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpOrderedClause.java deleted file mode 100644 index afe9812d..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpOrderedClause.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpOrderedClause; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpOrderedClause; - -public class FOmpOrderedClause extends AOmpOrderedClause { - - public final OmpOrderedClause ompOrderedClause; - - public FOmpOrderedClause(OmpOrderedClause ompOrderedClause, FortranWeaver weaver) { - super(new FOmpClause(ompOrderedClause, weaver), weaver); - this.ompOrderedClause = ompOrderedClause; - } - - @Override - public FortranNode getNode() { - return ompOrderedClause; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpReductionClause.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpReductionClause.java deleted file mode 100644 index e7f3ed5a..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FOmpReductionClause.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpReductionClause; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpReductionClause; - -public class FOmpReductionClause extends AOmpReductionClause { - - public final OmpReductionClause ompReductionClause; - - public FOmpReductionClause(OmpReductionClause ompReductionClause, FortranWeaver weaver) { - super(new FOmpClause(ompReductionClause, weaver), weaver); - this.ompReductionClause = ompReductionClause; - } - - @Override - public FortranNode getNode() { - return ompReductionClause; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FParameterKeyword.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FParameterKeyword.java deleted file mode 100644 index 0929e7ad..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FParameterKeyword.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.type.attributes.ParameterKeyword; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AParameterKeyword; - -public class FParameterKeyword extends AParameterKeyword { - - public final ParameterKeyword parameterKeyword; - - public FParameterKeyword(ParameterKeyword parameterKeyword, FortranWeaver weaver) { - super(new FKeywordAttributeSpecifier(parameterKeyword, weaver), weaver); - this.parameterKeyword = parameterKeyword; - } - - @Override - public FortranNode getNode() { - return parameterKeyword; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FProgram.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FProgram.java deleted file mode 100644 index 3ac946f8..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FProgram.java +++ /dev/null @@ -1,23 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.program.Application; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AJoinPoint; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AProgram; - -public class FProgram extends AProgram { - - private final Application app; - - public FProgram(Application app, FortranWeaver weaver) { - super(weaver); - this.app = app; - } - - @Override - public FortranNode getNode() { - return app; - } - -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FProgramUnit.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FProgramUnit.java deleted file mode 100644 index c6dd7236..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FProgramUnit.java +++ /dev/null @@ -1,28 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.program.ProgramUnit; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AProgramUnit; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASpecification; - -public class FProgramUnit extends AProgramUnit { - - public final ProgramUnit programUnit; - - public FProgramUnit(ProgramUnit programUnit, FortranWeaver weaver) { - super(weaver); - this.programUnit = programUnit; - } - - @Override - public ASpecification getSpecificationImpl() { - return FortranJoinpoints.create(programUnit.getSpecification(), getWeaverEngine(), ASpecification.class); - } - - @Override - public FortranNode getNode() { - return programUnit; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FRangeLoopControl.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FRangeLoopControl.java deleted file mode 100644 index c6cd48d9..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FRangeLoopControl.java +++ /dev/null @@ -1,57 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.Expr; -import pt.up.fe.specs.fortran.ast.nodes.loops.RangeLoopControl; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADataRef; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ARangeLoopControl; - -public class FRangeLoopControl extends ARangeLoopControl { - - private final RangeLoopControl rangeLoopControl; - - public FRangeLoopControl(RangeLoopControl rangeLoopControl, FortranWeaver weaver) { - super(new FLoopControl(rangeLoopControl, weaver), weaver); - this.rangeLoopControl = rangeLoopControl; - } - - @Override - public AExpr getLowerImpl() { - return FortranJoinpoints.create(rangeLoopControl.getLower(), getWeaverEngine(), AExpr.class); - } - - @Override - public AExpr getUpperImpl() { - return FortranJoinpoints.create(rangeLoopControl.getUpper(), getWeaverEngine(), AExpr.class); - } - - @Override - public ADataRef getVarImpl() { - return FortranJoinpoints.create(rangeLoopControl.getVar(), getWeaverEngine(), ADataRef.class); - } - - @Override - public AExpr getStepImpl() { - return rangeLoopControl.getStep() - .map(step -> FortranJoinpoints.create(step, getWeaverEngine(), AExpr.class)) - .orElse(null); - } - - @Override - public void setUpperImpl(AExpr upper) { - rangeLoopControl.setUpper((Expr) upper.getNode()); - } - - @Override - public void setStepImpl(AExpr step) { - rangeLoopControl.setStep((Expr) step.getNode()); - } - - @Override - public FortranNode getNode() { - return rangeLoopControl; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FRealLiteral.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FRealLiteral.java deleted file mode 100644 index 3cbfafdc..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FRealLiteral.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.RealLiteral; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ARealLiteral; - -public class FRealLiteral extends ARealLiteral { - - private final RealLiteral realLiteral; - - public FRealLiteral(RealLiteral realLiteral, FortranWeaver weaver) { - super(new FLiteral(realLiteral, weaver), weaver); - this.realLiteral = realLiteral; - } - - @Override - public FortranNode getNode() { - return realLiteral; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSectionSubscript.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSectionSubscript.java deleted file mode 100644 index 5e4fcd2b..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSectionSubscript.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.SectionSubscript; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASectionSubscript; - -public class FSectionSubscript extends ASectionSubscript { - - private final SectionSubscript sectionSubscript; - - public FSectionSubscript(SectionSubscript sectionSubscript, FortranWeaver weaver) { - super(weaver); - this.sectionSubscript = sectionSubscript; - } - - @Override - public FortranNode getNode() { - return sectionSubscript; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSpecification.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSpecification.java deleted file mode 100644 index 2b52f49d..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSpecification.java +++ /dev/null @@ -1,40 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.program.Specification; -import pt.up.fe.specs.fortran.ast.nodes.stmt.UseStmt; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASpecification; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASpecificationStatement; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AUseStatement; - -public class FSpecification extends ASpecification { - - public final Specification specification; - - public FSpecification(Specification specification, FortranWeaver weaver) { - super(new FStatementBlock(specification, weaver), weaver); - this.specification = specification; - } - - @Override - public ASpecificationStatement[] getSpecificationStmtsArrayImpl() { - return specification.getSpecificationStatements() - .stream() - .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) - .toList() - .toArray(new ASpecificationStatement[0]); - } - - @Override - public void addUseStmtImpl(AUseStatement stmt) { - specification.addUseStmt((UseStmt) stmt.getNode()); - } - - @Override - public FortranNode getNode() { - return null; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSpecificationStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSpecificationStatement.java deleted file mode 100644 index 648eb933..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSpecificationStatement.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.SpecificationStmt; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASpecificationStatement; - -public class FSpecificationStatement extends ASpecificationStatement { - - public final SpecificationStmt specificationStmt; - - public FSpecificationStatement(SpecificationStmt specificationStmt, FortranWeaver weaver) { - super(new FStatement(specificationStmt, weaver), weaver); - this.specificationStmt = specificationStmt; - } - - @Override - public FortranNode getNode() { - return specificationStmt; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FStatementBlock.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FStatementBlock.java deleted file mode 100644 index ddff92f6..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FStatementBlock.java +++ /dev/null @@ -1,32 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.program.StmtBlock; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatement; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatementBlock; - -public class FStatementBlock extends AStatementBlock { - - private final StmtBlock stmtBlock; - - public FStatementBlock(StmtBlock stmtBlock, FortranWeaver weaver) { - super(weaver); - this.stmtBlock = stmtBlock; - } - - @Override - public AStatement[] getStmtsArrayImpl() { - return (AStatement[]) stmtBlock.getStatements() - .stream() - .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) - .toArray(); - } - - @Override - public FortranNode getNode() { - return stmtBlock; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FStringLiteral.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FStringLiteral.java deleted file mode 100644 index 3afdddf1..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FStringLiteral.java +++ /dev/null @@ -1,21 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.StringLiteral; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStringLiteral; - -public class FStringLiteral extends AStringLiteral { - - private final StringLiteral stringLiteral; - - public FStringLiteral(StringLiteral stringLiteral, FortranWeaver weaver) { - super(new FLiteral(stringLiteral, weaver), weaver); - this.stringLiteral = stringLiteral; - } - - @Override - public FortranNode getNode() { - return stringLiteral; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSubroutine.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSubroutine.java deleted file mode 100644 index e41669b6..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSubroutine.java +++ /dev/null @@ -1,26 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.program.Subroutine; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASubroutine; - -public class FSubroutine extends ASubroutine { - - public final Subroutine subroutine; - - public FSubroutine(Subroutine subroutine, FortranWeaver weaver) { - super(new FProgramUnit(subroutine, weaver), weaver); - this.subroutine = subroutine; - } - - @Override - public FortranNode getNode() { - return subroutine; - } - - @Override - public String getModuleNameImpl() { - return subroutine.getName(); - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSubscript.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSubscript.java deleted file mode 100644 index 6120b624..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FSubscript.java +++ /dev/null @@ -1,28 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.expr.Subscript; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASubscript; - -public class FSubscript extends ASubscript { - - private final Subscript subscript; - - public FSubscript(Subscript subscript, FortranWeaver weaver) { - super(new FSectionSubscript(subscript, weaver), weaver); - this.subscript = subscript; - } - - @Override - public AExpr getExprImpl() { - return FortranJoinpoints.create(subscript.getValue(), getWeaverEngine(), AExpr.class); - } - - @Override - public FortranNode getNode() { - return subscript; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FTypeDeclarationStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FTypeDeclarationStatement.java deleted file mode 100644 index c830e1be..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FTypeDeclarationStatement.java +++ /dev/null @@ -1,43 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.TypeDeclarationStmt; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AAttributeSpecifier; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AEntityDecl; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ATypeDeclarationStatement; - -public class FTypeDeclarationStatement extends ATypeDeclarationStatement { - - public final TypeDeclarationStmt typeDeclarationStmt; - - public FTypeDeclarationStatement(TypeDeclarationStmt typeDeclarationStmt, FortranWeaver weaver) { - super(new FSpecificationStatement(typeDeclarationStmt, weaver), weaver); - this.typeDeclarationStmt = typeDeclarationStmt; - } - - @Override - public AAttributeSpecifier[] getAttrsArrayImpl() { - return typeDeclarationStmt.getAttributes() - .stream() - .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) - .toList() - .toArray(new AAttributeSpecifier[0]); - } - - @Override - public AEntityDecl[] getDeclsArrayImpl() { - return typeDeclarationStmt.getDecls() - .stream() - .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) - .toList() - .toArray(new AEntityDecl[0]); - } - - @Override - public FortranNode getNode() { - return typeDeclarationStmt; - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FUseStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FUseStatement.java deleted file mode 100644 index c3131b7c..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FUseStatement.java +++ /dev/null @@ -1,26 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.ast.nodes.stmt.UseStmt; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AUseStatement; - -public class FUseStatement extends AUseStatement { - - public final UseStmt useStmt; - - public FUseStatement(UseStmt useStmt, FortranWeaver weaver) { - super(new FStatement(useStmt, weaver), weaver); - this.useStmt = useStmt; - } - - @Override - public FortranNode getNode() { - return useStmt; - } - - @Override - public String getModuleNameImpl() { - return useStmt.getName(); - } -} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranActionStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranActionStatement.java new file mode 100644 index 00000000..11bc64fa --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranActionStatement.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.ActionStmt; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AActionStatement; + +public class FortranActionStatement> extends AActionStatement { + + public FortranActionStatement(ActionStmt node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public ActionStmt getNodeImpl() { + return (ActionStmt) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranArraySubscriptExpr.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranArraySubscriptExpr.java new file mode 100644 index 00000000..4afdb977 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranArraySubscriptExpr.java @@ -0,0 +1,31 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.ArraySubscriptExpr; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADataRef; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASectionSubscript; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AArraySubscriptExpr; + +public class FortranArraySubscriptExpr> extends AArraySubscriptExpr { + + public FortranArraySubscriptExpr(ArraySubscriptExpr node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public ArraySubscriptExpr getNodeImpl() { + return (ArraySubscriptExpr) super.getNodeImpl(); + } + + @Override + public ASectionSubscript[] getSubscriptsImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getSubscripts(), getWeaverEngine(), ASectionSubscript.class); + } + + @Override + public ADataRef getVarImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getRef(), getWeaverEngine(), ADataRef.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranAssignmentStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranAssignmentStatement.java new file mode 100644 index 00000000..f81d1e40 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranAssignmentStatement.java @@ -0,0 +1,31 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.AssignmentStmt; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADataRef; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AAssignmentStatement; + +public class FortranAssignmentStatement> extends AAssignmentStatement { + + public FortranAssignmentStatement(AssignmentStmt node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public AssignmentStmt getNodeImpl() { + return (AssignmentStmt) super.getNodeImpl(); + } + + @Override + public AExpr getExprImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getExpression(), getWeaverEngine(), AExpr.class); + } + + @Override + public ADataRef getVariableImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getVariable(), getWeaverEngine(), ADataRef.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranAttributeSpecifier.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranAttributeSpecifier.java new file mode 100644 index 00000000..83d02b1a --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranAttributeSpecifier.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.type.attributes.AttributeSpecifier; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AAttributeSpecifier; + +public class FortranAttributeSpecifier> extends AAttributeSpecifier { + + public FortranAttributeSpecifier(AttributeSpecifier node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public AttributeSpecifier getNodeImpl() { + return (AttributeSpecifier) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranBinaryOperator.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranBinaryOperator.java new file mode 100644 index 00000000..843cc564 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranBinaryOperator.java @@ -0,0 +1,45 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.BinaryOperator; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ABinaryOperator; + +public class FortranBinaryOperator> extends ABinaryOperator { + + public FortranBinaryOperator(BinaryOperator node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public BinaryOperator getNodeImpl() { + return (BinaryOperator) super.getNodeImpl(); + } + + @Override + public pt.up.fe.specs.fortran.weaver.enums.BinaryOperatorKind getKindImpl() { + return pt.up.fe.specs.fortran.weaver.enums.BinaryOperatorKind.valueOf(this.getNodeImpl().getOp().name()); + } + + @Override + public AExpr getLeftImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getLhs(), getWeaverEngine(), AExpr.class); + } + + @Override + public AExpr getRightImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getRhs(), getWeaverEngine(), AExpr.class); + } + + @Override + public void setLeftImpl(AExpr lhs) { + throw new UnsupportedOperationException(get_class() + ": Action setLeft not implemented "); + } + + @Override + public void setRightImpl(AExpr rhs) { + throw new UnsupportedOperationException(get_class() + ": Action setRight not implemented "); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranCompilerDirective.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranCompilerDirective.java new file mode 100644 index 00000000..d46235d8 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranCompilerDirective.java @@ -0,0 +1,30 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.CompilerDirective; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ANameValue; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ACompilerDirective; + +public class FortranCompilerDirective> extends ACompilerDirective { + + public FortranCompilerDirective(CompilerDirective node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public CompilerDirective getNodeImpl() { + return (CompilerDirective) super.getNodeImpl(); + } + + @Override + public ANameValue[] getPairsImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getPairs(), getWeaverEngine(), ANameValue.class); + } + + @Override + public String getDirectiveStringImpl() { + return this.getNodeImpl().getDirectiveString(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranDataRef.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranDataRef.java new file mode 100644 index 00000000..890122ed --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranDataRef.java @@ -0,0 +1,23 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.DataRef; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADataRef; + +public class FortranDataRef> extends ADataRef { + + public FortranDataRef(DataRef node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public DataRef getNodeImpl() { + return (DataRef) super.getNodeImpl(); + } + + @Override + public String getNameImpl() { + return this.getNodeImpl().getName(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranDesignator.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranDesignator.java new file mode 100644 index 00000000..994e6fe0 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranDesignator.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.Designator; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADesignator; + +public class FortranDesignator> extends ADesignator { + + public FortranDesignator(Designator node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public Designator getNodeImpl() { + return (Designator) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranDoStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranDoStatement.java new file mode 100644 index 00000000..b7e0fb97 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranDoStatement.java @@ -0,0 +1,54 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.loop.DoConstruct; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADoStatement; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExecution; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ALoopControl; +import java.util.Objects; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADoStatement; + +public class FortranDoStatement> extends ADoStatement { + + public FortranDoStatement(DoConstruct node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public DoConstruct getNodeImpl() { + return (DoConstruct) super.getNodeImpl(); + } + + @Override + public AExecution getBodyImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getBody(), getWeaverEngine(), AExecution.class); + } + + @Override + public ALoopControl getControlImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getControl().get(), getWeaverEngine(), ALoopControl.class); + } + + @Override + public pt.up.fe.specs.fortran.weaver.enums.DoKind getKindImpl() { + return pt.up.fe.specs.fortran.weaver.enums.DoKind.valueOf(this.getNodeImpl().getKind().name()); + } + + @Override + public ADoStatement copyScopeImpl() { + DoConstruct copiedDoStmt = (DoConstruct) this.getNodeImpl().copy(); + copiedDoStmt.getBody().removeChildren(); + return FortranJoinpoints.create(copiedDoStmt, getWeaverEngine(), ADoStatement.class); + } + + @Override + public boolean sameScopeImpl(ADoStatement loop) { + if (!Objects.equals(this.getKindImpl().getDisplay(), loop.getKindImpl().getDisplay())) { + return false; + } + + return Objects.equals(this.getControlImpl().getCodeImpl(), loop.getControlImpl().getCodeImpl()); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranElseBlock.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranElseBlock.java new file mode 100644 index 00000000..f1c1ac49 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranElseBlock.java @@ -0,0 +1,25 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.ElseBlock; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatementBlock; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AElseBlock; + +public class FortranElseBlock> extends AElseBlock { + + public FortranElseBlock(ElseBlock node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public ElseBlock getNodeImpl() { + return (ElseBlock) super.getNodeImpl(); + } + + @Override + public AStatementBlock getBodyImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getBlock(), getWeaverEngine(), AStatementBlock.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranElseIfBlock.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranElseIfBlock.java new file mode 100644 index 00000000..8451641e --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranElseIfBlock.java @@ -0,0 +1,31 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.ElseIfBlock; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AElseIfStatement; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatementBlock; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AElseIfBlock; + +public class FortranElseIfBlock> extends AElseIfBlock { + + public FortranElseIfBlock(ElseIfBlock node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public ElseIfBlock getNodeImpl() { + return (ElseIfBlock) super.getNodeImpl(); + } + + @Override + public AElseIfStatement getHeaderImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getElseIfStmt(), getWeaverEngine(), AElseIfStatement.class); + } + + @Override + public AStatementBlock getBodyImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getBlock(), getWeaverEngine(), AStatementBlock.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranElseIfStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranElseIfStatement.java new file mode 100644 index 00000000..54e7e568 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranElseIfStatement.java @@ -0,0 +1,25 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.ElseIfStmt; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AElseIfStatement; + +public class FortranElseIfStatement> extends AElseIfStatement { + + public FortranElseIfStatement(ElseIfStmt node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public ElseIfStmt getNodeImpl() { + return (ElseIfStmt) super.getNodeImpl(); + } + + @Override + public AExpr getConditionImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getCondition(), getWeaverEngine(), AExpr.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranEntityDecl.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranEntityDecl.java new file mode 100644 index 00000000..f5e14246 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranEntityDecl.java @@ -0,0 +1,23 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.decl.EntityDecl; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AEntityDecl; + +public class FortranEntityDecl> extends AEntityDecl { + + public FortranEntityDecl(EntityDecl node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public EntityDecl getNodeImpl() { + return (EntityDecl) super.getNodeImpl(); + } + + @Override + public String getNameImpl() { + return this.getNodeImpl().get(EntityDecl.NAME); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExecutableStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExecutableStatement.java new file mode 100644 index 00000000..41f2eccf --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExecutableStatement.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.ExecutableStmt; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExecutableStatement; + +public class FortranExecutableStatement> extends AExecutableStatement { + + public FortranExecutableStatement(ExecutableStmt node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public ExecutableStmt getNodeImpl() { + return (ExecutableStmt) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExecution.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExecution.java new file mode 100644 index 00000000..be438c00 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExecution.java @@ -0,0 +1,35 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.program.Execution; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExecutableStatement; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExecution; + +public class FortranExecution> extends AExecution { + + public FortranExecution(Execution node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public Execution getNodeImpl() { + return (Execution) super.getNodeImpl(); + } + + @Override + public AExecutableStatement[] getExecutableStmtsImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getStatements(), getWeaverEngine(), AExecutableStatement.class); + } + + @Override + public void insertBeginImpl(AExecutableStatement stmt) { + this.getNodeImpl().addChild(0, stmt.getNodeImpl()); + } + + @Override + public void insertEndImpl(AExecutableStatement stmt) { + this.getNodeImpl().addChild(stmt.getNodeImpl()); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExpr.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExpr.java new file mode 100644 index 00000000..9b8525ae --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExpr.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.Expr; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; + +public class FortranExpr> extends AExpr { + + public FortranExpr(Expr node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public Expr getNodeImpl() { + return (Expr) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExprInitialization.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExprInitialization.java new file mode 100644 index 00000000..331e0178 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranExprInitialization.java @@ -0,0 +1,25 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.decl.ExprInitialization; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExprInitialization; + +public class FortranExprInitialization> extends AExprInitialization { + + public FortranExprInitialization(ExprInitialization node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public ExprInitialization getNodeImpl() { + return (ExprInitialization) super.getNodeImpl(); + } + + @Override + public AExpr getExprImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getExpr(), getWeaverEngine(), AExpr.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranFile.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranFile.java new file mode 100644 index 00000000..4ae3c6c4 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranFile.java @@ -0,0 +1,26 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AFile; + +public class FortranFile> extends AFile { + + public FortranFile(pt.up.fe.specs.fortran.ast.nodes.program.FortranFile node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public pt.up.fe.specs.fortran.ast.nodes.program.FortranFile getNodeImpl() { + return (pt.up.fe.specs.fortran.ast.nodes.program.FortranFile) super.getNodeImpl(); + } + + @Override + public String getNameImpl() { + return this.getNodeImpl().get(pt.up.fe.specs.fortran.ast.nodes.program.FortranFile.FILE_NAME); + } + + @Override + public String getFoldernameImpl() { + return this.getNodeImpl().get(pt.up.fe.specs.fortran.ast.nodes.program.FortranFile.FOLDER_NAME); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranFortranDecl.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranFortranDecl.java new file mode 100644 index 00000000..d6550fde --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranFortranDecl.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.decl.FortranDecl; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AFortranDecl; + +public class FortranFortranDecl> extends AFortranDecl { + + public FortranFortranDecl(FortranDecl node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public FortranDecl getNodeImpl() { + return (FortranDecl) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfConstruct.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfConstruct.java new file mode 100644 index 00000000..46ffe59f --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfConstruct.java @@ -0,0 +1,37 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfConstruct; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AElseBlock; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AElseIfBlock; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIfThenBlock; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIfConstruct; + +public class FortranIfConstruct> extends AIfConstruct { + + public FortranIfConstruct(IfConstruct node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public IfConstruct getNodeImpl() { + return (IfConstruct) super.getNodeImpl(); + } + + @Override + public AIfThenBlock getIfThenBlockImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getIfThenBlock(), getWeaverEngine(), AIfThenBlock.class); + } + + @Override + public AElseIfBlock[] getElseIfBlocksImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getElseIfBlocks(), getWeaverEngine(), AElseIfBlock.class); + } + + @Override + public AElseBlock getElseBlockImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getElseBlock().get(), getWeaverEngine(), AElseBlock.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfStatement.java new file mode 100644 index 00000000..01f5b5ce --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfStatement.java @@ -0,0 +1,31 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfStmt; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AActionStatement; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIfStatement; + +public class FortranIfStatement> extends AIfStatement { + + public FortranIfStatement(IfStmt node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public IfStmt getNodeImpl() { + return (IfStmt) super.getNodeImpl(); + } + + @Override + public AExpr getConditionImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getCondition(), getWeaverEngine(), AExpr.class); + } + + @Override + public AActionStatement getStatementImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getThenAction(), getWeaverEngine(), AActionStatement.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfThenBlock.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfThenBlock.java new file mode 100644 index 00000000..68012033 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfThenBlock.java @@ -0,0 +1,31 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfThenBlock; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIfThenStatement; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatementBlock; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIfThenBlock; + +public class FortranIfThenBlock> extends AIfThenBlock { + + public FortranIfThenBlock(IfThenBlock node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public IfThenBlock getNodeImpl() { + return (IfThenBlock) super.getNodeImpl(); + } + + @Override + public AIfThenStatement getHeaderImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getIfThenStmt(), getWeaverEngine(), AIfThenStatement.class); + } + + @Override + public AStatementBlock getBodyImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getBlock(), getWeaverEngine(), AStatementBlock.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfThenStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfThenStatement.java new file mode 100644 index 00000000..f1112fd2 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIfThenStatement.java @@ -0,0 +1,25 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.ifstmt.IfThenStmt; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIfThenStatement; + +public class FortranIfThenStatement> extends AIfThenStatement { + + public FortranIfThenStatement(IfThenStmt node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public IfThenStmt getNodeImpl() { + return (IfThenStmt) super.getNodeImpl(); + } + + @Override + public AExpr getConditionImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getCondition(), getWeaverEngine(), AExpr.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranInitialization.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranInitialization.java new file mode 100644 index 00000000..eba2b3c2 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranInitialization.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.decl.Initialization; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AInitialization; + +public class FortranInitialization> extends AInitialization { + + public FortranInitialization(Initialization node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public Initialization getNodeImpl() { + return (Initialization) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIntLiteral.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIntLiteral.java new file mode 100644 index 00000000..368b5590 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranIntLiteral.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.IntLiteral; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AIntLiteral; + +public class FortranIntLiteral> extends AIntLiteral { + + public FortranIntLiteral(IntLiteral node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public IntLiteral getNodeImpl() { + return (IntLiteral) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranJoinpoint.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranJoinpoint.java new file mode 100644 index 00000000..34147c30 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranJoinpoint.java @@ -0,0 +1,270 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Objects; +import java.util.stream.Stream; + +import org.lara.interpreter.weaver.interf.enums.InsertPosition; + +import pt.up.fe.specs.fortran.ast.nodes.FortranNode; +import pt.up.fe.specs.fortran.ast.utils.Position; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AJoinpoint; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AProgram; +import pt.up.fe.specs.util.SpecsLogs; +import pt.up.fe.specs.util.treenode.NodeInsertUtils; + +/** + * Editable class which contains the implementation shared by all join points. + * This class will NOT be overwritten by the generator. + */ +public class FortranJoinpoint> extends AJoinpoint { + + public FortranJoinpoint(FortranNode node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public FortranWeaver getWeaverEngine() { + return (FortranWeaver) super.getWeaverEngine(); + } + + @Override + public FortranNode getNodeImpl() { + return (FortranNode) super.getNodeImpl(); + } + + @Override + public boolean getSameImpl(AJoinpoint other) { + return this.get_class().equals(other.get_class()) && this.getNodeImpl().equals(other.getNodeImpl()); + } + + /** + * Compares the two join points based on their node reference of the used compiler/parsing tool.
+ * This is the default implementation for comparing two join points.
+ * Note for developers: A weaver may override this implementation in the editable abstract join point, so + * the changes are made for all join points, or override this method in specific join points. + */ + @Override + public boolean getCompareNodesImpl(AJoinpoint aJoinPoint) { + return this.getNodeImpl().equals(aJoinPoint.getNodeImpl()); + } + + @Override + public boolean getEqualsImpl(Self jp) { + if (!(jp instanceof AJoinpoint)) { + return false; + } + + return this.getSameImpl(jp); + } + + @Override + public AProgram getRootImpl() { + return FortranJoinpoints.create(getWeaverEngine().getRootNode(), getWeaverEngine(), AProgram.class); + } + + @Override + public AJoinpoint getParentImpl() { + return FortranJoinpoints.create(getNodeImpl().getParent(), getWeaverEngine()); + } + + @Override + public AJoinpoint getJpParent() { + return getParentImpl(); + } + + @Override + public AJoinpoint[] getChildrenImpl() { + return FortranJoinpoints.create(getNodeImpl().getChildren(), getWeaverEngine(), AJoinpoint.class); + } + + @Override + public AJoinpoint[] getDescendantsImpl() { + return FortranJoinpoints.create(getNodeImpl().getDescendants(), getWeaverEngine(), AJoinpoint.class); + } + + @Override + public AJoinpoint[] getScopeNodesImpl() { + return getChildrenImpl(); + } + + @Override + public Stream> getJpChildrenStream() { + return getNodeImpl().getChildrenStream() + .map(node -> (AJoinpoint) FortranJoinpoints.create(node, getWeaverEngine())); + } + + @Override + public String getCodeImpl() { + return getNodeImpl().getCode(); + } + + @Override + public Integer getLineImpl() { + // The Fortran AST has no source location information + return null; + } + + @Override + public Integer getColumnImpl() { + // The Fortran AST has no source location information + return null; + } + + @Override + public boolean getContainsImpl(AJoinpoint jp) { + FortranNode node = jp.getNodeImpl(); + + return getNodeImpl().getDescendantsStream() + .anyMatch(child -> child == node); + } + + @Override + public AJoinpoint getGetAncestorImpl(String type) { + Objects.requireNonNull(type, () -> "Missing type of ancestor in attribute 'ancestor'"); + + if (type.equals("program")) { + SpecsLogs.warn("Consider using attribute .root, instead of .ancestor('program')"); + } + + FortranNode currentNode = getNodeImpl(); + while (currentNode.hasParent()) { + // Create join point for testing type + AJoinpoint parentJp = FortranJoinpoints.create(currentNode.getParent(), getWeaverEngine()); + + if (parentJp.getInstanceOfImpl(type)) { + return parentJp; + } + + currentNode = parentJp.getNodeImpl(); + } + + return null; + } + + @Override + public int getIndexOfSelfImpl() { + return getNodeImpl().indexOfSelf(); + } + + @Override + public AJoinpoint getLeftJpImpl() { + return getNodeImpl().getLeft() + .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) + .orElse(null); + } + + @Override + public AJoinpoint getRightJpImpl() { + return getNodeImpl().getRight() + .map(node -> FortranJoinpoints.create(node, getWeaverEngine())) + .orElse(null); + } + + @Override + public AJoinpoint[] insertImpl(InsertPosition position, String code) { + var insertedNode = getNodeImpl().insert(toPosition(position), code); + + return new AJoinpoint[] { FortranJoinpoints.create(insertedNode, getWeaverEngine()) }; + } + + @Override + public AJoinpoint[] insertImpl(InsertPosition position, AJoinpoint node) { + var insertedNode = getNodeImpl().insert(toPosition(position), node.getNodeImpl()); + + return new AJoinpoint[] { FortranJoinpoints.create(insertedNode, getWeaverEngine()) }; + } + + private static Position toPosition(InsertPosition position) { + return Position.valueOf(position.name()); + } + + @Override + public AJoinpoint insertAfterImpl(AJoinpoint node) { + var insertedNode = getNodeImpl().insert(Position.AFTER, node.getNodeImpl()); + + return FortranJoinpoints.create(insertedNode, getWeaverEngine()); + } + + @Override + public AJoinpoint insertBeforeImpl(AJoinpoint node) { + var insertedNode = getNodeImpl().insert(Position.BEFORE, node.getNodeImpl()); + + return FortranJoinpoints.create(insertedNode, getWeaverEngine()); + } + + @Override + public AJoinpoint insertAfterImpl(String code) { + var insertedNode = getNodeImpl().insert(Position.AFTER, code); + + return FortranJoinpoints.create(insertedNode, getWeaverEngine()); + } + + @Override + public AJoinpoint insertBeforeImpl(String code) { + var insertedNode = getNodeImpl().insert(Position.BEFORE, code); + + return FortranJoinpoints.create(insertedNode, getWeaverEngine()); + } + + public static FortranNode replace(FortranNode target, FortranNode newNode) { + return NodeInsertUtils.replace(target, newNode); + } + + @Override + public AJoinpoint replaceWithImpl(AJoinpoint node) { + return FortranJoinpoints.create(replace(getNodeImpl(), node.getNodeImpl()), getWeaverEngine()); + } + + @Override + public AJoinpoint replaceWithImpl(AJoinpoint[] node) { + // Insert nodes after in reverse order, to preserve order of comments and pragmas + var reverseNodes = Arrays.asList(node); + Collections.reverse(reverseNodes); + + AJoinpoint topInserted = null; + for (var nodeToInsert : reverseNodes) { + topInserted = insertAfterImpl(nodeToInsert); + } + + // Remove current node from the tree + detachImpl(); + + // Return the first inserted element + return topInserted; + } + + @Override + public AJoinpoint detachImpl() { + FortranNode node = getNodeImpl(); + + if (!node.hasParent()) { + SpecsLogs.msgInfo( + "action detach: could not find a parent in joinpoint of type '" + getJoinPointTypeImpl() + "'"); + return this; + } + + node.detach(); + return this; + } + + @Override + public int hashCode() { + return getNodeImpl().hashCode(); + } + + @Override + public AJoinpoint copyImpl() { + FortranNode copiedNode = getNodeImpl().copyShallow(); + return FortranJoinpoints.create(copiedNode, getWeaverEngine()); + } + + @Override + public AJoinpoint deepCopyImpl() { + FortranNode copiedNode = getNodeImpl().copy(); + return FortranJoinpoints.create(copiedNode, getWeaverEngine()); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranKeywordAttributeSpecifier.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranKeywordAttributeSpecifier.java new file mode 100644 index 00000000..1fa701bd --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranKeywordAttributeSpecifier.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.type.attributes.KeywordAttributeSpecifier; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AKeywordAttributeSpecifier; + +public class FortranKeywordAttributeSpecifier> extends AKeywordAttributeSpecifier { + + public FortranKeywordAttributeSpecifier(KeywordAttributeSpecifier node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public KeywordAttributeSpecifier getNodeImpl() { + return (KeywordAttributeSpecifier) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranLiteral.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranLiteral.java new file mode 100644 index 00000000..9fc94577 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranLiteral.java @@ -0,0 +1,23 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.Literal; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ALiteral; + +public class FortranLiteral> extends ALiteral { + + public FortranLiteral(Literal node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public Literal getNodeImpl() { + return (Literal) super.getNodeImpl(); + } + + @Override + public String getLiteralImpl() { + return this.getNodeImpl().getLiteral(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranLoopControl.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranLoopControl.java new file mode 100644 index 00000000..c7c07dab --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranLoopControl.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.loops.LoopControl; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ALoopControl; + +public class FortranLoopControl> extends ALoopControl { + + public FortranLoopControl(LoopControl node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public LoopControl getNodeImpl() { + return (LoopControl) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranMainProgram.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranMainProgram.java new file mode 100644 index 00000000..6360ddfd --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranMainProgram.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.program.MainProgram; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AMainProgram; + +public class FortranMainProgram> extends AMainProgram { + + public FortranMainProgram(MainProgram node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public MainProgram getNodeImpl() { + return (MainProgram) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranNameValue.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranNameValue.java new file mode 100644 index 00000000..ee754e80 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranNameValue.java @@ -0,0 +1,23 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.utils.NameValue; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ANameValue; + +public class FortranNameValue> extends ANameValue { + + public FortranNameValue(NameValue node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public NameValue getNodeImpl() { + return (NameValue) super.getNodeImpl(); + } + + @Override + public String getNameImpl() { + return this.getNodeImpl().getName(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpBlockConstruct.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpBlockConstruct.java new file mode 100644 index 00000000..e3a1afb8 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpBlockConstruct.java @@ -0,0 +1,25 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.omp.OmpBlockConstruct; +import pt.up.fe.specs.fortran.ast.nodes.program.Execution; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExecution; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpBlockConstruct; + +public class FortranOmpBlockConstruct> extends AOmpBlockConstruct { + + public FortranOmpBlockConstruct(OmpBlockConstruct node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public OmpBlockConstruct getNodeImpl() { + return (OmpBlockConstruct) super.getNodeImpl(); + } + + @Override + public void setBodyImpl(AExecution body) { + this.getNodeImpl().setBody((Execution) body.getNodeImpl()); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpClause.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpClause.java new file mode 100644 index 00000000..3188e6df --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpClause.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpClause; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpClause; + +public class FortranOmpClause> extends AOmpClause { + + public FortranOmpClause(OmpClause node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public OmpClause getNodeImpl() { + return (OmpClause) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpConstruct.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpConstruct.java new file mode 100644 index 00000000..053ea05a --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpConstruct.java @@ -0,0 +1,43 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.omp.OmpConstruct; +import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpClause; +import pt.up.fe.specs.fortran.ast.nodes.omp.enums.OmpDirectiveKind; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpClause; +import java.util.Arrays; +import java.util.List; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpConstruct; + +public class FortranOmpConstruct> extends AOmpConstruct { + + public FortranOmpConstruct(OmpConstruct node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public OmpConstruct getNodeImpl() { + return (OmpConstruct) super.getNodeImpl(); + } + + @Override + public AOmpClause[] getClausesImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getClauses(), getWeaverEngine(), AOmpClause.class); + } + + @Override + public void setClausesImpl(AOmpClause[] clauses) { + List clauseList = Arrays.stream(clauses) + .map(c -> (OmpClause) c.getNodeImpl()) + .toList(); + + this.getNodeImpl().setClauses(clauseList); + } + + @Override + public void setDirectiveImpl(String directive) { + this.getNodeImpl().set(OmpConstruct.KINDS, OmpDirectiveKind.getKinds(directive)); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpDataSharingClause.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpDataSharingClause.java new file mode 100644 index 00000000..bc095b79 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpDataSharingClause.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpDataSharingClause; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpDataSharingClause; + +public class FortranOmpDataSharingClause> extends AOmpDataSharingClause { + + public FortranOmpDataSharingClause(OmpDataSharingClause node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public OmpDataSharingClause getNodeImpl() { + return (OmpDataSharingClause) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpLoopConstruct.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpLoopConstruct.java new file mode 100644 index 00000000..efaee5a3 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpLoopConstruct.java @@ -0,0 +1,25 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.omp.OmpLoopConstruct; +import pt.up.fe.specs.fortran.ast.nodes.stmt.loop.DoConstruct; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADoStatement; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpLoopConstruct; + +public class FortranOmpLoopConstruct> extends AOmpLoopConstruct { + + public FortranOmpLoopConstruct(OmpLoopConstruct node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public OmpLoopConstruct getNodeImpl() { + return (OmpLoopConstruct) super.getNodeImpl(); + } + + @Override + public void setLoopImpl(ADoStatement loop) { + this.getNodeImpl().setLoop((DoConstruct) loop.getNodeImpl()); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpOrderedClause.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpOrderedClause.java new file mode 100644 index 00000000..f5723694 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpOrderedClause.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpOrderedClause; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpOrderedClause; + +public class FortranOmpOrderedClause> extends AOmpOrderedClause { + + public FortranOmpOrderedClause(OmpOrderedClause node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public OmpOrderedClause getNodeImpl() { + return (OmpOrderedClause) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpReductionClause.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpReductionClause.java new file mode 100644 index 00000000..57ac6ede --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranOmpReductionClause.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.omp.clause.OmpReductionClause; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AOmpReductionClause; + +public class FortranOmpReductionClause> extends AOmpReductionClause { + + public FortranOmpReductionClause(OmpReductionClause node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public OmpReductionClause getNodeImpl() { + return (OmpReductionClause) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranParameterKeyword.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranParameterKeyword.java new file mode 100644 index 00000000..57de4970 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranParameterKeyword.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.type.attributes.ParameterKeyword; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AParameterKeyword; + +public class FortranParameterKeyword> extends AParameterKeyword { + + public FortranParameterKeyword(ParameterKeyword node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public ParameterKeyword getNodeImpl() { + return (ParameterKeyword) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranProgram.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranProgram.java new file mode 100644 index 00000000..68e9b984 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranProgram.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.program.Application; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AProgram; + +public class FortranProgram> extends AProgram { + + public FortranProgram(Application node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public Application getNodeImpl() { + return (Application) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranProgramUnit.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranProgramUnit.java new file mode 100644 index 00000000..07f383e7 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranProgramUnit.java @@ -0,0 +1,25 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.program.ProgramUnit; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASpecification; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AProgramUnit; + +public class FortranProgramUnit> extends AProgramUnit { + + public FortranProgramUnit(ProgramUnit node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public ProgramUnit getNodeImpl() { + return (ProgramUnit) super.getNodeImpl(); + } + + @Override + public ASpecification getSpecificationImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getSpecification(), getWeaverEngine(), ASpecification.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranRangeLoopControl.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranRangeLoopControl.java new file mode 100644 index 00000000..671cd540 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranRangeLoopControl.java @@ -0,0 +1,54 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.loops.RangeLoopControl; +import pt.up.fe.specs.fortran.ast.nodes.expr.Expr; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ADataRef; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ARangeLoopControl; + +public class FortranRangeLoopControl> extends ARangeLoopControl { + + public FortranRangeLoopControl(RangeLoopControl node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public RangeLoopControl getNodeImpl() { + return (RangeLoopControl) super.getNodeImpl(); + } + + @Override + public ADataRef getVarImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getVar(), getWeaverEngine(), ADataRef.class); + } + + @Override + public AExpr getLowerImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getLower(), getWeaverEngine(), AExpr.class); + } + + @Override + public AExpr getUpperImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getUpper(), getWeaverEngine(), AExpr.class); + } + + @Override + public AExpr getStepImpl() { + return this.getNodeImpl().getStep() + .map(step -> FortranJoinpoints.create(step, getWeaverEngine(), AExpr.class)) + .orElse(null); + } + + @Override + public void setUpperImpl(AExpr upper) { + this.getNodeImpl().setUpper((Expr) upper.getNodeImpl()); + } + + @Override + public void setStepImpl(AExpr step) { + this.getNodeImpl().setStep((Expr) step.getNodeImpl()); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranRealLiteral.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranRealLiteral.java new file mode 100644 index 00000000..90941f21 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranRealLiteral.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.RealLiteral; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ARealLiteral; + +public class FortranRealLiteral> extends ARealLiteral { + + public FortranRealLiteral(RealLiteral node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public RealLiteral getNodeImpl() { + return (RealLiteral) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSectionSubscript.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSectionSubscript.java new file mode 100644 index 00000000..1ad8da3f --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSectionSubscript.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.SectionSubscript; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASectionSubscript; + +public class FortranSectionSubscript> extends ASectionSubscript { + + public FortranSectionSubscript(SectionSubscript node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public SectionSubscript getNodeImpl() { + return (SectionSubscript) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSpecification.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSpecification.java new file mode 100644 index 00000000..ac28b7fc --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSpecification.java @@ -0,0 +1,32 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.program.Specification; +import pt.up.fe.specs.fortran.ast.nodes.stmt.UseStmt; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASpecificationStatement; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AUseStatement; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASpecification; + +public class FortranSpecification> extends ASpecification { + + public FortranSpecification(Specification node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public Specification getNodeImpl() { + return (Specification) super.getNodeImpl(); + } + + @Override + public ASpecificationStatement[] getSpecificationStmtsImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getSpecificationStatements(), getWeaverEngine(), ASpecificationStatement.class); + } + + @Override + public void addUseStmtImpl(AUseStatement stmt) { + this.getNodeImpl().addUseStmt((UseStmt) stmt.getNodeImpl()); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSpecificationStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSpecificationStatement.java new file mode 100644 index 00000000..55da46bf --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSpecificationStatement.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.SpecificationStmt; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASpecificationStatement; + +public class FortranSpecificationStatement> extends ASpecificationStatement { + + public FortranSpecificationStatement(SpecificationStmt node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public SpecificationStmt getNodeImpl() { + return (SpecificationStmt) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranStatement.java similarity index 55% rename from FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FStatement.java rename to FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranStatement.java index 28912764..18a90b42 100644 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FStatement.java +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranStatement.java @@ -1,34 +1,29 @@ package pt.up.fe.specs.fortran.weaver.joinpoints; -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; import pt.up.fe.specs.fortran.ast.nodes.stmt.Stmt; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatement; import pt.up.fe.specs.util.exceptions.NotImplementedException; -public class FStatement extends AStatement { +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatement; - private final Stmt stmt; +public class FortranStatement> extends AStatement { - public FStatement(Stmt stmt, FortranWeaver weaver) { - super(weaver); - this.stmt = stmt; + public FortranStatement(Stmt node, FortranWeaver weaver) { + super(node, weaver); } @Override - public FortranNode getNode() { - return stmt; + public Stmt getNodeImpl() { + return (Stmt) super.getNodeImpl(); } @Override - public Boolean getIsFirstImpl() { + public boolean getIsFirstImpl() { throw new NotImplementedException(this); } @Override - public Boolean getIsLastImpl() { + public boolean getIsLastImpl() { throw new NotImplementedException(this); } - - } diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranStatementBlock.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranStatementBlock.java new file mode 100644 index 00000000..3be199ba --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranStatementBlock.java @@ -0,0 +1,25 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.program.StmtBlock; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatement; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStatementBlock; + +public class FortranStatementBlock> extends AStatementBlock { + + public FortranStatementBlock(StmtBlock node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public StmtBlock getNodeImpl() { + return (StmtBlock) super.getNodeImpl(); + } + + @Override + public AStatement[] getStmtsImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getStatements(), getWeaverEngine(), AStatement.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranStringLiteral.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranStringLiteral.java new file mode 100644 index 00000000..a00f9019 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranStringLiteral.java @@ -0,0 +1,18 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.StringLiteral; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AStringLiteral; + +public class FortranStringLiteral> extends AStringLiteral { + + public FortranStringLiteral(StringLiteral node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public StringLiteral getNodeImpl() { + return (StringLiteral) super.getNodeImpl(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSubroutine.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSubroutine.java new file mode 100644 index 00000000..b808a541 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSubroutine.java @@ -0,0 +1,23 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.program.Subroutine; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASubroutine; + +public class FortranSubroutine> extends ASubroutine { + + public FortranSubroutine(Subroutine node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public Subroutine getNodeImpl() { + return (Subroutine) super.getNodeImpl(); + } + + @Override + public String getModuleNameImpl() { + return this.getNodeImpl().getName(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSubscript.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSubscript.java new file mode 100644 index 00000000..aa204191 --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranSubscript.java @@ -0,0 +1,25 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.expr.Subscript; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AExpr; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ASubscript; + +public class FortranSubscript> extends ASubscript { + + public FortranSubscript(Subscript node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public Subscript getNodeImpl() { + return (Subscript) super.getNodeImpl(); + } + + @Override + public AExpr getExprImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getValue(), getWeaverEngine(), AExpr.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranTypeDeclarationStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranTypeDeclarationStatement.java new file mode 100644 index 00000000..a6b72bbb --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranTypeDeclarationStatement.java @@ -0,0 +1,31 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.TypeDeclarationStmt; +import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AAttributeSpecifier; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AEntityDecl; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.ATypeDeclarationStatement; + +public class FortranTypeDeclarationStatement> extends ATypeDeclarationStatement { + + public FortranTypeDeclarationStatement(TypeDeclarationStmt node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public TypeDeclarationStmt getNodeImpl() { + return (TypeDeclarationStmt) super.getNodeImpl(); + } + + @Override + public AEntityDecl[] getDeclsImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getDecls(), getWeaverEngine(), AEntityDecl.class); + } + + @Override + public AAttributeSpecifier[] getAttrsImpl() { + return FortranJoinpoints.create(this.getNodeImpl().getAttributes(), getWeaverEngine(), AAttributeSpecifier.class); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranUseStatement.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranUseStatement.java new file mode 100644 index 00000000..0867d75b --- /dev/null +++ b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/FortranUseStatement.java @@ -0,0 +1,23 @@ +package pt.up.fe.specs.fortran.weaver.joinpoints; + +import pt.up.fe.specs.fortran.ast.nodes.stmt.UseStmt; + +import pt.up.fe.specs.fortran.weaver.FortranWeaver; +import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AUseStatement; + +public class FortranUseStatement> extends AUseStatement { + + public FortranUseStatement(UseStmt node, FortranWeaver weaver) { + super(node, weaver); + } + + @Override + public UseStmt getNodeImpl() { + return (UseStmt) super.getNodeImpl(); + } + + @Override + public String getModuleNameImpl() { + return this.getNodeImpl().getName(); + } +} diff --git a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/GenericFortranJoinpoint.java b/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/GenericFortranJoinpoint.java deleted file mode 100644 index a100f498..00000000 --- a/FortranWeaver/src/pt/up/fe/specs/fortran/weaver/joinpoints/GenericFortranJoinpoint.java +++ /dev/null @@ -1,22 +0,0 @@ -package pt.up.fe.specs.fortran.weaver.joinpoints; - -import pt.up.fe.specs.fortran.ast.nodes.FortranNode; -import pt.up.fe.specs.fortran.weaver.FortranJoinpoints; -import pt.up.fe.specs.fortran.weaver.FortranWeaver; -import pt.up.fe.specs.fortran.weaver.abstracts.AFortranWeaverJoinPoint; -import pt.up.fe.specs.fortran.weaver.abstracts.joinpoints.AJoinPoint; - -public class GenericFortranJoinpoint extends AFortranWeaverJoinPoint { - - private final FortranNode node; - - public GenericFortranJoinpoint(FortranNode node, FortranWeaver weaver) { - super(weaver); - this.node = node; - } - - @Override - public FortranNode getNode() { - return node; - } -}