Skip to main content

Module ast

Module ast 

Source
Expand description

Abstract syntax tree types for SysML v2 textual notation.

Structs§

ActionBodyDecl
A minimally-modeled declaration inside an action/behavior body (e.g. attribute ...;, calc ...;).
ActionDef
Action definition: action def Identification body (in/out params).
ActionUsage
Action usage: action name : type_name (accept param_name : param_type)? body.
ActorDecl
Actor declaration: actor Identification ;.
ActorRedefinitionAssignment
actor :>> <name> = <expr>; redefinition/assignment used in SysML v2 release fixtures.
ActorUsage
actor usage actor pilot : Operator;
AliasDef
Alias definition: alias Identification for qualified_name body.
Allocate
Allocate statement at part usage level: allocate from to to body.
AllocationDef
Allocation definition: allocation def Identification body.
AllocationUsage
Allocation usage: allocation name (: type)? [allocate source to target]? body.
AnalysisCaseDef
Analysis case definition: analysis def Identification body.
AnalysisCaseUsage
Analysis case usage: analysis name (: type)? body.
Annotation
Generic annotation or metadata usage captured in body scopes.
AssertConstraintMember
Occurrence-level assert member: assert constraint body.
AssignStmt
Assignment statement (SysML v2 AssignmentNode/AssignmentActionUsage).
AttributeDef
Attribute definition: attribute [def] name (:> | : type)? (= value)? body.
AttributeUsage
Attribute usage: attribute name (:> | : type)? redefines? value? body.
Bind
Bind: bind left = right (; or { }).
CalcDef
Calc definition: calc def Identification body.
CalcUsage
Calculation usage: calc Identification (: type)? body.
CaseDef
Case definition: case def Identification body.
CaseUsage
Case usage: case name (: type)? body.
ClassifierDecl
Package-level KerML classifier declaration captured as an explicit dedicated node.
CommentAnnotation
KerML Comment: ( ‘comment’ Identification? )? ( ‘locale’ STRING_VALUE )? body = REGULAR_COMMENT.
ConcernUsage
Concern usage at package level: concern name (: type)? RequirementBody.
Connect
Connect at part usage level: connect from to to body.
ConnectStmt
Connect statement in interface def or usage: connect from to to body.
ConnectionDef
Connection definition: connection def Identification body (BNF ConnectionDefinition).
ConnectionUsageMember
Connection usage member inside part definitions.
ConstraintDef
Constraint definition: constraint def Identification body.
Dependency
Dependency: dependency (Identification from)? client(s) to supplier(s) RelationshipBody.
DocComment
KerML Documentation: ‘doc’ Identification? ( ‘locale’ STRING_VALUE )? body = REGULAR_COMMENT.
EndDecl
End declaration in interface def: end name : type ;.
EntryAction
Entry action: entry (; or body).
EnumDef
Enumeration definition: enum def Identification EnumerationBody (BNF EnumerationDefinition).
EnumerationUsage
Enumeration usage inside a definition body: enum name (: type)? body.
ExhibitState
Exhibit state usage: exhibit state name : type (; or body).
ExposeMember
Expose in view body: expose (MembershipImport | NamespaceImport) RelationshipBody.
ExtendedLibraryDecl
Modeled extended SysML/KerML declaration family not yet represented by dedicated concrete nodes (e.g. concern/message style library declarations).
FeatureDecl
Package-level KerML feature declaration captured as an explicit dedicated node.
FilterMember
KerML ElementFilterMember: MemberPrefix? ‘filter’ condition ‘;’
FilterPackageMember
KerML FilterPackageMember: [ OwnedExpression ].
FinalState
Final state: final name ; or final state name ;
FirstStmt
First/then control flow: first expr then expr body.
FirstSuccession
first <name>; inside a case/use-case body (used in SysML v2 release fixtures).
Flow
Flow: flow from to to body.
FlowDef
Flow definition: flow def Identification body.
FlowUsage
Flow usage: flow name (: type)? [from expr to expr]? body.
ForLoop
For-loop node (SysML v2 ForLoopNode) - modeled minimally.
FrameMember
Framed concern member in requirement body: frame name (; or body).
Identification
Identification: optional short name in < >, optional name. BNF: ( ‘<’ declaredShortName = NAME ‘>’ )? ( declaredName = NAME )?
Import
Import: private? import all? QualifiedName (:: *)? or FilterPackage form.
InOutDecl
In/out parameter in action def: in name : type ; or out name : type ;.
IncludeUseCase
include <usecase> ... inside a case/use-case body.
IndividualDef
Individual definition: individual def Identification :> type body.
InterfaceDef
Interface definition: interface def Identification body.
ItemDef
Item definition: item def Identification body (for events, etc.).
ItemUsage
Item usage inside a part definition body: item name multiplicity? (: type)? body.
KermlFeatureDecl
Modeled KerML feature declaration family (occurrence/expr/predicate/succession).
KermlSemanticDecl
Modeled KerML semantic declaration captured as package-level syntax.
LibraryPackage
Library package: library (optional standard) package Identification PackageBody (BNF LibraryPackage).
MergeStmt
Merge: merge expr body.
MetadataAnnotation
Metadata annotation on usage: @ Name (: Type)? MetadataBody (e.g. @Security; or @Safety{isMandatory = true;}).
MetadataDef
Metadata definition: metadata def Identification body (BNF MetadataDefinition).
MetadataKeywordUsage
User-defined metadata keyword usage: #keyword (: Type)? body.
MetadataUsage
Metadata usage: metadata name (: type)? body (BNF MetadataUsage).
NamespaceDecl
KerML NamespaceDeclaration: namespace Identification NamespaceBody (same body structure as Package).
Node
Objective
Objective objective { doc ... }
OccurrenceDef
Occurrence definition: occurrence def Identification body (BNF OccurrenceDefinition).
OccurrenceUsage
Occurrence usage: occurrence name (: type)? body, with optional individual/portion modifiers.
OpaqueMemberDecl
Library-tolerant part member preserved without forcing it into an unrelated node shape.
Package
A package declaration: package Identification PackageBody
ParseErrorNode
Placeholder node inserted when resilient parsing skips malformed input.
PartDef
Part definition: part def Identification (:> specializes)? Body.
PartUsage
Part usage: part name : type multiplicity? ordered? (redefines|:>>)? value? body.
PayloadClause
Typed payload on accept/send control nodes: accept name : Type or send name : Type.
Perform
Enacted performance: perform action_path { body } inside a part usage.
PerformInOutBinding
In/out binding inside a perform body: in name = expr ; or out name = expr ;.
PortDef
Port definition: port def Identification body.
PortUsage
Port usage: port name : type multiplicity? :> subsets? redefines? body.
PurposeMember
Viewpoint purpose concern reference.
RefDecl
Ref declaration in interface def: ref name : type body.
RefRedefinition
ref :>> <name> { ... } redefinition used in SysML v2 release fixtures.
RenderingDef
Rendering definition: rendering def Definition.
RenderingUsage
Rendering usage: rendering Usage.
RequireConstraint
Require constraint: require constraint { ... }.
RequirementActorDecl
Actor parameter in a requirement body: actor name? : type ;.
RequirementDef
Requirement definition: requirement def Identification (:> specializes)? body.
RequirementUsage
Bare requirement Usage.
ReturnDecl
Return declaration: return name : type ;.
ReturnRef
return ref <name><multiplicity?> { ... } used in SysML v2 release libraries.
RootNamespace
Root of a SysML/KerML document: a sequence of top-level package or namespace elements.
Satisfy
Requirement usage / Satisfy. Example: satisfy EnduranceReq by droneInstance;
SatisfyViewMember
Satisfy in view body: satisfy QualifiedName RelationshipBody.
Span
Source location: byte offset, line, column, and length in the source file. Line and column are 1-based. Use Span::to_lsp_range for 0-based LSP ranges.
StakeholderMember
Viewpoint stakeholder concern reference.
StateDef
State definition: state def Identification body.
StateUsage
State usage: state name (: type)? body.
SubjectDecl
Subject declaration: subject name : type ;.
SubjectRef
subject; shorthand used in SysML v2 release fixtures (subject of an enclosing case/use case).
TextualRepresentation
KerML TextualRepresentation: ( ‘rep’ Identification )? ‘language’ STRING_VALUE body.
ThenAction
Succession to an action usage: then action ....
ThenDone
then done; inside a case/use-case body.
ThenIncludeUseCase
then include <usecase> ... inside a case/use-case body.
ThenStmt
Then (initial state): then name ;
ThenUseCaseUsage
then use case <name> ... inside a case/use-case body.
Transition
Transition: transition name [first source [accept trigger]] [if guard] [do effect] then target body.
UseCaseDef
Use Case definition: use case def Identification body.
UseCaseUsage
Use case usage at package level: use case name (: type)? CaseBody.
VerificationCaseDef
Verification case definition: verification def Identification body.
VerificationCaseUsage
Verification case usage: verification name (: type)? body.
VerifyRequirementMember
Requirement verification usage in requirement/objective bodies: verify requirement <...> or shorthand verify <qualified_name>;.
ViewDef
View definition: view def Identification ViewDefinitionBody.
ViewRenderingUsage
View rendering usage: render name : type (; or body).
ViewUsage
View usage: view name : type? ViewBody.
ViewpointDef
Viewpoint definition: viewpoint def Identification RequirementBody.
ViewpointUsage
Viewpoint usage: viewpoint ConstraintUsageDeclaration RequirementBody.

Enums§

ActionDefBody
Body of an action definition: ; or { ActionDefBodyElement* }.
ActionDefBodyElement
Element inside an action definition body.
ActionUsageBody
Body of an action usage: ; or { ActionUsageBodyElement* }.
ActionUsageBodyElement
Element inside an action usage body.
AliasBody
Body of an alias definition: ; or {}.
AttributeBody
Body of an attribute (def or usage): ; or { AttributeBodyElement* }.
AttributeBodyElement
BinaryOperator
Classified binary operator for semantic diagnostics.
CalcDefBody
CalcDefBodyElement
ConnectBody
Body of a connect statement: ; or {}.
ConnectionDefBody
Body of a connection definition: ; or { end/ref/connect* }.
ConnectionDefBodyElement
ConstraintBody
constraint body {}
ConstraintDefBody
ConstraintDefBodyElement
DefinitionBody
Generic definition body: ; or { DefinitionBodyElement* }.
DefinitionBodyElement
DefinitionPrefix
BNF BasicDefinitionPrefix: abstract | variation.
EnumerationBody
Expression
Expression: literals, feature refs, member access, index, bracket/unit, etc.
FirstMergeBody
Body of first/merge: ; or {}.
InOut
InterfaceDefBody
Body of an interface definition: ; or { InterfaceDefBodyElement* }.
InterfaceDefBodyElement
Element inside an interface definition body.
InterfaceUsage
Interface usage: typed+connect or connection form.
InterfaceUsageBodyElement
Element in interface usage body (e.g. ref redefinition).
OccurrenceBodyElement
OccurrenceUsageBody
PackageBody
Package body: either ; or { PackageBodyElement* }
PackageBodyElement
Top-level element inside a namespace or package body.
PartDefBody
Body of a part definition: ; or { PartDefBodyElement* }.
PartDefBodyElement
Element inside a part definition body.
PartUsageBody
Body of a part usage: ; or { PartUsageBodyElement* }.
PartUsageBodyElement
Element inside a part usage body.
PerformBody
Body of a perform: ; or { PerformBodyElement* }.
PerformBodyElement
Element inside a perform body: doc comment or in/out binding.
PortBody
Body of a port usage: ; or { PortBodyElement* }.
PortBodyElement
Element inside a port usage body.
PortDefBody
Body of a port definition: ; or { PortDefBodyElement* }.
PortDefBodyElement
Element inside a port definition body (in/out declarations or nested port usages).
RefBody
Body of a ref declaration: ; or {}.
RenderingDefBody
RenderingDefBodyElement
RequireConstraintBody
Require constraint body: ; or { ConstraintDefBodyElement* }.
RequirementDefBody
Body of an requirement definition: ; or { RequirementDefBodyElement* }.
RequirementDefBodyElement
RootElement
KerML top-level element: package, namespace, import, or library package (BNF RootNamespace = PackageBodyElement*).
StateDefBody
StateDefBodyElement
TransitionAccept
Transition accept trigger: typed payload or shorthand expression (accept StartPressed).
UnaryOperator
Classified unary operator.
UseCaseDefBody
UseCaseDefBodyElement
ViewBody
ViewBodyElement
ViewDefBody
ViewDefBodyElement
Visibility
Visibility for imports and members.

Traits§

AstNode
Trait for generic access to node source span (e.g. visitors).