BaseModel

class BaseModel

A SysMLv2 model represented using abstract syntax.

Children
Members defined in BaseModel (12 members)

all_docs

R

All built documents, including standard library.

documents

RW

Documents as part of this model.

environment

RW

The environment this model was built in

index

RW

Index of exported symbols

lib

RW

Standard library cache

result

RW

The model build result as returned by core module.

stdlib_docs

R

Environment documents as part of this model. Prefer accessing documents through ‘environment’ instead

user_docs

R

User documents built as part of this model. Prefer ‘documents’ instead.

elements

An alias for nodes.

nodes

Iterate over all nodes of the given kind.

to_environment

Convert this model to Environment for building other dependent models.

uris

Return URIs of documents.

Attributes

property all_docs: list[syside.SharedMutex[syside.Document]]

All built documents, including standard library.

documents: list[syside.SharedMutex[syside.Document]] = None

Documents as part of this model.

environment: syside.Environment = None

The environment this model was built in

index: syside.StaticIndex = None

Index of exported symbols

lib: syside.Stdlib = None

Standard library cache

result: syside.ExecutionResult | None = None

The model build result as returned by core module.

property stdlib_docs: list[syside.SharedMutex[syside.Document]]

Environment documents as part of this model. Prefer accessing documents through ‘environment’ instead

property user_docs: list[syside.SharedMutex[syside.Document]]

User documents built as part of this model. Prefer ‘documents’ instead.

Methods

elements(node_kind: type[syside.TElement], include_subtypes: bool = False, considered_document_kinds: syside.DocumentKind = DocumentKind.MODEL) Iterable[syside.TElement]

An alias for nodes.

nodes(node_kind: type[syside.TElement], include_subtypes: bool = False, considered_document_kinds: syside.DocumentKind = DocumentKind.MODEL) Iterable[syside.TElement]

Iterate over all nodes of the given kind.

Parameters:
  • node_kind – What kind of nodes to return.

  • include_subtypes – Whether to consider subtypes.

  • considered_document_kinds – What document kinds to consider. By default returns only documents created for this model.

to_environment() syside.Environment

Convert this model to Environment for building other dependent models.

uris(considered_document_kinds: syside.DocumentKind = DocumentKind.MODEL) Iterable[str]

Return URIs of documents.

Parameters:

considered_document_kinds – What document kinds to consider. By default returns only documents created for this model.

Used in