UNPKG

@specs-feup/metafor

Version:

A Fortran source-to-source compiler written in Typescript

639 lines 18.5 kB
import { LaraJoinPoint } from "@specs-feup/lara/api/LaraJoinPoint.js"; type PrivateMapper = { "Joinpoint": typeof Joinpoint; "Expr": typeof Expr; "FileJp": typeof FileJp; "Literal": typeof Literal; "LoopControl": typeof LoopControl; "NameValue": typeof NameValue; "OmpClause": typeof OmpClause; "OmpDataSharingClause": typeof OmpDataSharingClause; "OmpOrderedClause": typeof OmpOrderedClause; "OmpReductionClause": typeof OmpReductionClause; "Program": typeof Program; "ProgramUnit": typeof ProgramUnit; "RangeLoopControl": typeof RangeLoopControl; "RealLiteral": typeof RealLiteral; "Statement": typeof Statement; "StatementBlock": typeof StatementBlock; "StringLiteral": typeof StringLiteral; "Subroutine": typeof Subroutine; "UseStatement": typeof UseStatement; "BinaryOperator": typeof BinaryOperator; "Designator": typeof Designator; "ExecutableStatement": typeof ExecutableStatement; "Execution": typeof Execution; "IntLiteral": typeof IntLiteral; "MainProgram": typeof MainProgram; "OmpConstruct": typeof OmpConstruct; "OmpLoopConstruct": typeof OmpLoopConstruct; "Specification": typeof Specification; "ActionStatement": typeof ActionStatement; "AssignmentStatement": typeof AssignmentStatement; "CompilerDirective": typeof CompilerDirective; "DataRef": typeof DataRef; "DoStatement": typeof DoStatement; "OmpBlockConstruct": typeof OmpBlockConstruct; "ArraySubscriptExpr": typeof ArraySubscriptExpr; }; type DefaultAttributeMap = { FileJp: "name"; }; export declare class Joinpoint extends LaraJoinPoint { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; /** * Returns an array with the children of the node */ get children(): Joinpoint[]; /** * String with the code represented by this node */ get code(): string; /** * Returns an array with the descendants of the node */ get descendants(): Joinpoint[]; /** * Returns the index of this join point in relation to its parent */ get indexOfSelf(): number; /** * Returns the node that came before this node, or undefined if there is none */ get leftJp(): Joinpoint; /** * Returns the parent node in the AST, or undefined if it is the root node */ get parent(): Joinpoint; /** * Returns the node that comes after this node, or undefined if there is none */ get rightJp(): Joinpoint; /** * Returns the 'program' join point */ get root(): Program; /** * 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 */ get scopeNodes(): Joinpoint[]; /** * True if the given node is a descendant of this node */ contains(jp: Joinpoint): boolean; /** * Looks for an ancestor joinpoint name, walking back on the AST */ getAncestor(type: string): Joinpoint; /** * Removes node associated to the joinpoint from the AST */ detach(): Joinpoint; /** * Replaces this node with the given node */ replaceWith(node: Joinpoint): Joinpoint; } /** * Represents an expression */ export declare class Expr extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } /** * Represents a source file (e.g., .f90) */ export declare class FileJp extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; /** * The name of the folder */ get foldername(): string; /** * The name of the file */ get name(): string; } /** * Represents a literal */ export declare class Literal extends Expr { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get literal(): string; } /** * Represents the loop control structure, with specialized subclasses for different loop kinds */ export declare class LoopControl extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } /** * Represents a name/value pair in a compiler directive */ export declare class NameValue extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get name(): string; } /** * Represents an OpenMP clause */ export declare class OmpClause extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } /** * Represents an OpenMP datasharing clause (public, private, ...) */ export declare class OmpDataSharingClause extends OmpClause { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } export declare class OmpOrderedClause extends OmpClause { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } export declare class OmpReductionClause extends OmpClause { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } /** * Represents the complete program and is the top-most join point in the hierarchy */ export declare class Program extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } export declare class ProgramUnit extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; /** * Returns the unit's specification part */ get specification(): Specification; } export declare class RangeLoopControl extends LoopControl { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get lower(): Expr; get upper(): Expr; get var(): DataRef; } export declare class RealLiteral extends Literal { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } /** * Represents a Fortran statement */ export declare class Statement extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get isFirst(): boolean; get isLast(): boolean; } export declare class StatementBlock extends Joinpoint { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get stmts(): Statement[]; } export declare class StringLiteral extends Literal { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } export declare class Subroutine extends ProgramUnit { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } export declare class UseStatement extends Statement { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get moduleName(): string; } /** * Represents a binary operation */ export declare class BinaryOperator extends Expr { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get kind(): "add" | "sub" | "mul" | "div" | "gt" | "ge" | "lt" | "le" | "eq" | "ne"; get left(): Expr; set left(value: Expr); get right(): Expr; set right(value: Expr); /** * Sets the left-hand side of the operation */ setLeft(lhs: Expr): void; /** * Sets the right-hand side of the operation */ setRight(rhs: Expr): void; } /** * Represents a designator */ export declare class Designator extends Expr { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } /** * Represents an executable statement */ export declare class ExecutableStatement extends Statement { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } export declare class Execution extends StatementBlock { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get executableStmts(): ExecutableStatement[]; insertBegin(stmt: ExecutableStatement): void; insertEnd(stmt: ExecutableStatement): void; } export declare class IntLiteral extends Literal { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } export declare class MainProgram extends ProgramUnit { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } /** * Represents a generic OpenMP construct */ export declare class OmpConstruct extends ExecutableStatement { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get clauses(): OmpClause[]; set clauses(value: OmpClause[]); /** * Sets the construct's clauses */ setClauses(clauses: OmpClause[]): void; setDirective(directive: string): void; } /** * Represents an OpenMP loop construct (such as do or do parallel) */ export declare class OmpLoopConstruct extends OmpConstruct { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; setLoop(loop: DoStatement): void; } export declare class Specification extends StatementBlock { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; /** * Adds a UseStmt to a specification part. The statement is inserted at the beginning. */ addUseStmt(stmt: UseStatement): void; } /** * Represents an action statement */ export declare class ActionStatement extends ExecutableStatement { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; } /** * Represents an assignment statement */ export declare class AssignmentStatement extends ActionStatement { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get expr(): Expr; get variable(): DataRef; } export declare class CompilerDirective extends ExecutableStatement { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; /** * Returns the directive's contents as a string */ get directiveString(): string; get pairs(): NameValue[]; } /** * Represents a data reference */ export declare class DataRef extends Designator { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get name(): string; } /** * Represents a do loop */ export declare class DoStatement extends ExecutableStatement { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get body(): Execution; get control(): LoopControl; } /** * Represents an OpenMP block construct (such as parallel or task) */ export declare class OmpBlockConstruct extends OmpConstruct { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; setBody(body: Execution): void; } /** * Represents an access to one (or several) elements of an array */ export declare class ArraySubscriptExpr extends DataRef { /** * @internal */ static readonly _defaultAttributeInfo: { readonly map?: DefaultAttributeMap; readonly name: string | null; readonly type?: PrivateMapper; readonly jpMapper?: typeof JoinpointMapper; }; get subscripts(): Expr[]; get var(): DataRef; } declare const JoinpointMapper: { joinpoint: typeof Joinpoint; expr: typeof Expr; file: typeof FileJp; literal: typeof Literal; loopControl: typeof LoopControl; nameValue: typeof NameValue; ompClause: typeof OmpClause; ompDataSharingClause: typeof OmpDataSharingClause; ompOrderedClause: typeof OmpOrderedClause; ompReductionClause: typeof OmpReductionClause; program: typeof Program; programUnit: typeof ProgramUnit; rangeLoopControl: typeof RangeLoopControl; realLiteral: typeof RealLiteral; statement: typeof Statement; statementBlock: typeof StatementBlock; stringLiteral: typeof StringLiteral; subroutine: typeof Subroutine; useStatement: typeof UseStatement; binaryOperator: typeof BinaryOperator; designator: typeof Designator; executableStatement: typeof ExecutableStatement; execution: typeof Execution; intLiteral: typeof IntLiteral; mainProgram: typeof MainProgram; ompConstruct: typeof OmpConstruct; ompLoopConstruct: typeof OmpLoopConstruct; specification: typeof Specification; actionStatement: typeof ActionStatement; assignmentStatement: typeof AssignmentStatement; compilerDirective: typeof CompilerDirective; dataRef: typeof DataRef; doStatement: typeof DoStatement; ompBlockConstruct: typeof OmpBlockConstruct; arraySubscriptExpr: typeof ArraySubscriptExpr; }; export {}; //# sourceMappingURL=Joinpoints.d.ts.map