Expand description
Abstract syntax tree types for SysML v2 textual notation.
Structs§
- Action
Body Decl - A minimally-modeled declaration inside an action/behavior body (e.g.
attribute ...;,calc ...;). - Action
Def - Action definition:
action defIdentification body (in/out params). - Action
Usage - Action usage:
actionname:type_name (acceptparam_name:param_type)? body. - Actor
Decl - Actor declaration:
actorIdentification;. - Actor
Redefinition Assignment actor :>> <name> = <expr>;redefinition/assignment used in SysML v2 release fixtures.- Actor
Usage - actor usage
actor pilot : Operator; - Alias
Def - Alias definition:
aliasIdentificationforqualified_name body. - Allocate
- Allocate statement at part usage level:
allocatefromtoto body. - Allocation
Def - Allocation definition:
allocation defIdentification body. - Allocation
Usage - Allocation usage:
allocationname (:type)? [allocatesourcetotarget]? body. - Analysis
Case Def - Analysis case definition:
analysis defIdentification body. - Analysis
Case Usage - Analysis case usage:
analysisname (:type)? body. - Annotation
- Generic annotation or metadata usage captured in body scopes.
- Assert
Constraint Member - Occurrence-level assert member:
assert constraintbody. - Assign
Stmt - Assignment statement (SysML v2 AssignmentNode/AssignmentActionUsage).
- Attribute
Def - Attribute definition:
attribute[def] name (:>|:type)? (=value)? body. - Attribute
Usage - Attribute usage:
attributename (:>|:type)?redefines? value? body. - Bind
- Bind:
bindleft=right (;or{ }). - CalcDef
- Calc definition:
calc defIdentification body. - Calc
Usage - Calculation usage:
calcIdentification (:type)? body. - CaseDef
- Case definition:
case defIdentification body. - Case
Usage - Case usage:
casename (:type)? body. - Classifier
Decl - Package-level KerML classifier declaration captured as an explicit dedicated node.
- Comment
Annotation - KerML Comment: ( ‘comment’ Identification? )? ( ‘locale’ STRING_VALUE )? body = REGULAR_COMMENT.
- Concern
Usage - Concern usage at package level:
concernname (:type)? RequirementBody. - Connect
- Connect at part usage level:
connectfromtoto body. - Connect
Stmt - Connect statement in interface def or usage:
connectfromtoto body. - Connection
Def - Connection definition:
connection defIdentification body (BNF ConnectionDefinition). - Connection
Usage Member - Connection usage member inside part definitions.
- Constraint
Def - Constraint definition:
constraint defIdentification body. - Dependency
- Dependency:
dependency(Identificationfrom)? client(s)tosupplier(s) RelationshipBody. - DocComment
- KerML Documentation: ‘doc’ Identification? ( ‘locale’ STRING_VALUE )? body = REGULAR_COMMENT.
- EndDecl
- End declaration in interface def:
endname:type;. - Entry
Action - Entry action:
entry(;or body). - EnumDef
- Enumeration definition:
enum defIdentification EnumerationBody (BNF EnumerationDefinition). - Enumeration
Usage - Enumeration usage inside a definition body:
enumname (:type)? body. - Exhibit
State - Exhibit state usage:
exhibit statename:type (;or body). - Expose
Member - Expose in view body:
expose(MembershipImport | NamespaceImport) RelationshipBody. - Extended
Library Decl - Modeled extended SysML/KerML declaration family not yet represented by dedicated concrete nodes (e.g. concern/message style library declarations).
- Feature
Decl - Package-level KerML feature declaration captured as an explicit dedicated node.
- Filter
Member - KerML ElementFilterMember: MemberPrefix? ‘filter’ condition ‘;’
- Filter
Package Member - KerML FilterPackageMember:
[OwnedExpression]. - Final
State - Final state:
finalname;orfinal statename; - First
Stmt - First/then control flow:
firstexprthenexpr body. - First
Succession first <name>;inside a case/use-case body (used in SysML v2 release fixtures).- Flow
- Flow:
flowfromtoto body. - FlowDef
- Flow definition:
flow defIdentification body. - Flow
Usage - Flow usage:
flowname (:type)? [fromexprtoexpr]? body. - ForLoop
- For-loop node (SysML v2 ForLoopNode) - modeled minimally.
- Frame
Member - Framed concern member in requirement body:
framename (;or body). - Identification
- Identification: optional short name in
< >, optional name. BNF: ( ‘<’ declaredShortName = NAME ‘>’ )? ( declaredName = NAME )? - Import
- Import:
private?importall? QualifiedName (::*)? or FilterPackage form. - InOut
Decl - In/out parameter in action def:
inname:type;oroutname:type;. - Include
UseCase include <usecase> ...inside a case/use-case body.- Individual
Def - Individual definition:
individual defIdentification:>type body. - Interface
Def - Interface definition:
interface defIdentification body. - ItemDef
- Item definition:
item defIdentification body (for events, etc.). - Item
Usage - Item usage inside a part definition body:
itemname multiplicity? (:type)? body. - Kerml
Feature Decl - Modeled KerML feature declaration family (occurrence/expr/predicate/succession).
- Kerml
Semantic Decl - Modeled KerML semantic declaration captured as package-level syntax.
- Library
Package - Library package:
library(optionalstandard)packageIdentification PackageBody (BNF LibraryPackage). - Merge
Stmt - Merge:
mergeexpr body. - Metadata
Annotation - Metadata annotation on usage:
@Name (:Type)? MetadataBody (e.g.@Security;or@Safety{isMandatory = true;}). - Metadata
Def - Metadata definition:
metadata defIdentification body (BNF MetadataDefinition). - Metadata
Keyword Usage - User-defined metadata keyword usage:
#keyword(:Type)? body. - Metadata
Usage - Metadata usage:
metadataname (:type)? body (BNF MetadataUsage). - Namespace
Decl - KerML NamespaceDeclaration:
namespaceIdentification NamespaceBody (same body structure as Package). - Node
- Objective
- Objective
objective { doc ... } - Occurrence
Def - Occurrence definition:
occurrence defIdentification body (BNF OccurrenceDefinition). - Occurrence
Usage - Occurrence usage:
occurrencename (:type)? body, with optional individual/portion modifiers. - Opaque
Member Decl - Library-tolerant part member preserved without forcing it into an unrelated node shape.
- Package
- A package declaration:
packageIdentification PackageBody - Parse
Error Node - Placeholder node inserted when resilient parsing skips malformed input.
- PartDef
- Part definition:
part defIdentification (:>specializes)? Body. - Part
Usage - Part usage:
partname:type multiplicity?ordered? (redefines|:>>)? value? body. - Payload
Clause - Typed payload on accept/send control nodes:
accept name : Typeorsend name : Type. - Perform
- Enacted performance:
performaction_path{body}inside a part usage. - Perform
InOut Binding - In/out binding inside a perform body:
inname=expr;oroutname=expr;. - PortDef
- Port definition:
port defIdentification body. - Port
Usage - Port usage:
portname:type multiplicity?:>subsets?redefines? body. - Purpose
Member - Viewpoint purpose concern reference.
- RefDecl
- Ref declaration in interface def:
refname:type body. - RefRedefinition
ref :>> <name> { ... }redefinition used in SysML v2 release fixtures.- Rendering
Def - Rendering definition:
rendering defDefinition. - Rendering
Usage - Rendering usage:
renderingUsage. - Require
Constraint - Require constraint:
require constraint { ... }. - Requirement
Actor Decl - Actor parameter in a requirement body:
actorname?:type;. - Requirement
Def - Requirement definition:
requirement defIdentification (:>specializes)? body. - Requirement
Usage - Bare requirement Usage.
- Return
Decl - Return declaration:
returnname:type;. - Return
Ref return ref <name><multiplicity?> { ... }used in SysML v2 release libraries.- Root
Namespace - Root of a SysML/KerML document: a sequence of top-level package or namespace elements.
- Satisfy
- Requirement usage / Satisfy. Example:
satisfy EnduranceReq by droneInstance; - Satisfy
View Member - Satisfy in view body:
satisfyQualifiedName RelationshipBody. - Span
- Source location: byte offset, line, column, and length in the source file.
Line and column are 1-based. Use
Span::to_lsp_rangefor 0-based LSP ranges. - Stakeholder
Member - Viewpoint stakeholder concern reference.
- State
Def - State definition:
state defIdentification body. - State
Usage - State usage:
statename (:type)? body. - Subject
Decl - Subject declaration:
subjectname:type;. - Subject
Ref subject;shorthand used in SysML v2 release fixtures (subject of an enclosing case/use case).- Textual
Representation - KerML TextualRepresentation: ( ‘rep’ Identification )? ‘language’ STRING_VALUE body.
- Then
Action - Succession to an action usage:
then action .... - Then
Done then done;inside a case/use-case body.- Then
Include UseCase then include <usecase> ...inside a case/use-case body.- Then
Stmt - Then (initial state):
thenname; - Then
UseCase Usage then use case <name> ...inside a case/use-case body.- Transition
- Transition:
transitionname [firstsource [accepttrigger]] [ifguard] [doeffect]thentarget body. - UseCase
Def - Use Case definition:
use case defIdentification body. - UseCase
Usage - Use case usage at package level:
use casename (:type)? CaseBody. - Verification
Case Def - Verification case definition:
verification defIdentification body. - Verification
Case Usage - Verification case usage:
verificationname (:type)? body. - Verify
Requirement Member - Requirement verification usage in requirement/objective bodies:
verify requirement <...>or shorthandverify <qualified_name>;. - ViewDef
- View definition:
view defIdentification ViewDefinitionBody. - View
Rendering Usage - View rendering usage:
rendername:type (;or body). - View
Usage - View usage:
viewname:type? ViewBody. - Viewpoint
Def - Viewpoint definition:
viewpoint defIdentification RequirementBody. - Viewpoint
Usage - Viewpoint usage:
viewpointConstraintUsageDeclaration RequirementBody.
Enums§
- Action
DefBody - Body of an action definition:
;or{ActionDefBodyElement*}. - Action
DefBody Element - Element inside an action definition body.
- Action
Usage Body - Body of an action usage:
;or{ActionUsageBodyElement*}. - Action
Usage Body Element - Element inside an action usage body.
- Alias
Body - Body of an alias definition:
;or{…}. - Attribute
Body - Body of an attribute (def or usage):
;or{AttributeBodyElement*}. - Attribute
Body Element - Binary
Operator - Classified binary operator for semantic diagnostics.
- Calc
DefBody - Calc
DefBody Element - Connect
Body - Body of a connect statement:
;or{…}. - Connection
DefBody - Body of a connection definition:
;or{end/ref/connect*}. - Connection
DefBody Element - Constraint
Body - constraint body {}
- Constraint
DefBody - Constraint
DefBody Element - Definition
Body - Generic definition body:
;or{DefinitionBodyElement*}. - Definition
Body Element - Definition
Prefix - BNF BasicDefinitionPrefix:
abstract|variation. - Enumeration
Body - Expression
- Expression: literals, feature refs, member access, index, bracket/unit, etc.
- First
Merge Body - Body of first/merge:
;or{…}. - InOut
- Interface
DefBody - Body of an interface definition:
;or{InterfaceDefBodyElement*}. - Interface
DefBody Element - Element inside an interface definition body.
- Interface
Usage - Interface usage: typed+connect or connection form.
- Interface
Usage Body Element - Element in interface usage body (e.g. ref redefinition).
- Occurrence
Body Element - Occurrence
Usage Body - Package
Body - Package body: either
;or{PackageBodyElement*} - Package
Body Element - Top-level element inside a namespace or package body.
- Part
DefBody - Body of a part definition:
;or{PartDefBodyElement*}. - Part
DefBody Element - Element inside a part definition body.
- Part
Usage Body - Body of a part usage:
;or{PartUsageBodyElement*}. - Part
Usage Body Element - Element inside a part usage body.
- Perform
Body - Body of a perform:
;or{PerformBodyElement*}. - Perform
Body Element - Element inside a perform body: doc comment or in/out binding.
- Port
Body - Body of a port usage:
;or{PortBodyElement*}. - Port
Body Element - Element inside a port usage body.
- Port
DefBody - Body of a port definition:
;or{PortDefBodyElement*}. - Port
DefBody Element - Element inside a port definition body (in/out declarations or nested port usages).
- RefBody
- Body of a ref declaration:
;or{…}. - Rendering
DefBody - Rendering
DefBody Element - Require
Constraint Body - Require constraint body:
;or{ConstraintDefBodyElement*}. - Requirement
DefBody - Body of an requirement definition:
;or{RequirementDefBodyElement*}. - Requirement
DefBody Element - Root
Element - KerML top-level element: package, namespace, import, or library package (BNF RootNamespace = PackageBodyElement*).
- State
DefBody - State
DefBody Element - Transition
Accept - Transition accept trigger: typed payload or shorthand expression (
accept StartPressed). - Unary
Operator - Classified unary operator.
- UseCase
DefBody - UseCase
DefBody Element - View
Body - View
Body Element - View
DefBody - View
DefBody Element - Visibility
- Visibility for imports and members.
Traits§
- AstNode
- Trait for generic access to node source span (e.g. visitors).