Loading

Main Functions and Objects

try_load_model

Load a SysMLv2 model.

load_model

Load a SysMLv2 model.

collect_files_recursively

Recursively collect all .sysml and .kerml files in the specified directory.

Model

A SysMLv2 model represented using abstract syntax.

Diagnostics

ModelError

An exception thrown when model contains errors.

Diagnostics

All model diagnostics.

Diagnostic

DiagnosticMessage

A diagnostic providing information about a model.

DiagnosticSeverity

DiagnosticRelatedInformation

DocumentSegment

CodeDescription

(Advanced) Pipeline Construction

get_default_executor

Get a default initialized Executor for running schedules. Default executor will use half the logical cores that are available on the current machine. An executor is just a thread pool so there is no reason for constructing and destroying one all the time.

Environment

Standard library environment for use with user models.

Executor

ExecutionResult

IOSchedule

Schedule

ScheduleError

ScheduleOptions

ValidationTiming

DiagnosticResults

Pipeline

PipelineOptions

DocumentTimes

DocumentKind

Is this a model-created document?

StageTimes

build_model

Build the AST for document from its text_document. Any existing model will be cleared, and the built model will not have its references linked. Instead, most references will use placeholder references that will be replaced by actual targets in linking stage. Only sysml and kerml languages are supported.

collect_exports

Collect and cache symbols exported by document. This must be called before the document is indexed, otherwise wrong or no symbols may be indexed. Returns the number of symbols cached.

make_pipeline

sema_reset

Reset semantic state of element. This will typically remove any implied relationships, and reverse a few other changes made by sema. After this completes, element.sema_state == SemaState.None.

Sema

Semantic resolver for SysML. This is responsible for linking references and resolving semantic rules in the pipeline.

StaticIndex

Stdlib

Cache of standard library elements used by sema.

SemaState

Semantic resolution state of Elements. Sema will use this information to discard duplicate work, e.g. when resolving elements in a group of related documents.

ModelLanguage

ImplicitSpecializationKind

UnexpectedDifferentReference