behavior

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package behavior contains validation passes over state machines, successions and control nodes.

Index

Constants

View Source
const (
	// CodeControlNodeIncomingMultiplicity: a succession into a control node
	// writes a target multiplicity other than 1..1
	// (validateControlNodeIncomingSuccessions).
	CodeControlNodeIncomingMultiplicity = "control-node-incoming-multiplicity"
	// CodeControlNodeOutgoingMultiplicity: a succession out of a control node
	// writes a source multiplicity other than 1..1
	// (validateControlNodeOutgoingSuccessions).
	CodeControlNodeOutgoingMultiplicity = "control-node-outgoing-multiplicity"
	// CodeForkIncomingSuccessions: a fork node has more than one incoming
	// succession (validateForkNodeIncomingSuccessions).
	CodeForkIncomingSuccessions = "fork-incoming-successions"
	// CodeJoinOutgoingSuccessions: a join node has more than one outgoing
	// succession (validateJoinNodeOutgoingSuccessions).
	CodeJoinOutgoingSuccessions = "join-outgoing-successions"
	// CodeMergeIncomingMultiplicity: a succession into a merge node writes a
	// source multiplicity other than 0..1 (validateMergeNodeIncomingSuccessions).
	CodeMergeIncomingMultiplicity = "merge-incoming-multiplicity"
	// CodeMergeOutgoingSuccessions: a merge node has more than one outgoing
	// succession (validateMergeNodeOutgoingSuccessions).
	CodeMergeOutgoingSuccessions = "merge-outgoing-successions"
	// CodeDecisionIncomingSuccessions: a decision node has more than one
	// incoming succession (validateDecisionNodeIncomingSuccessions).
	CodeDecisionIncomingSuccessions = "decision-incoming-successions"
	// CodeDecisionOutgoingMultiplicity: a succession out of a decision node
	// writes a target multiplicity other than 0..1
	// (validateDecisionNodeOutgoingSuccessions).
	CodeDecisionOutgoingMultiplicity = "decision-outgoing-multiplicity"
)

Diagnostic codes for the bounds SysML v2 8.3.17 places on the successions of each control-node kind, one per validation constraint.

View Source
const CodeAccepterSourceNotState = "accepter-source-not-state"

CodeAccepterSourceNotState marks a transition with an accepter whose source is an action usage but no state usage (SysML v2.1 §8.3.18.9 validateTransitionUsageTriggerActions).

View Source
const CodeControlNodeOwner = "control-node-owner"

CodeControlNodeOwner marks a control node declared outside an action definition or usage (SysML v2 8.3.17.6 validateControlNodeOwningType).

View Source
const CodeEndpointNotANode = "endpoint-not-a-node"

CodeEndpointNotANode marks an action endpoint naming something other than an action node accepted by the action lowerer.

View Source
const CodeEndpointNotOfMachine = "endpoint-not-of-machine"

CodeEndpointNotOfMachine marks a transition endpoint naming a vertex the machine the transition belongs to does not own (UML 2.5.1 §14.2.3.9).

View Source
const CodeEntryTransitionShape = "entry-transition-shape"

CodeEntryTransitionShape marks a transition out of the entry action written with a trigger or an effect, which chooses a starting state by its guard alone (SysML v2 §7.18.3, EntryTransitionMember).

View Source
const CodeEntryTransitionTarget = "entry-transition-target"

CodeEntryTransitionTarget marks a transition out of the entry action whose target is a vertex but not a state the body can start in (SysML v2 §7.18.3).

View Source
const CodeNoOutgoingTransition = "no-outgoing-transition"

CodeNoOutgoingTransition marks a routing pseudostate no transition leaves, which a transition reaching it terminates nowhere at (UML 2.5.1 §15.7.18).

View Source
const CodeNoTransitionSource = "no-transition-source"

CodeNoTransitionSource marks a transition written without a source that no member precedes in its body (SysML v2 §7.18.3, TargetTransitionUsage).

View Source
const CodeParallelStateTransition = "parallel-state-transition"

CodeParallelStateTransition marks a succession or transition ordering the direct substates of a parallel state, which are concurrent (SysML v2 §7.16).

View Source
const CodeTransitionSourceNotVertex = "transition-source-not-vertex"

CodeTransitionSourceNotVertex marks a transition written without a source whose preceding member is not a vertex of the machine (SysML v2 §7.18.3).

View Source
const MsgAccepterSourceNotState = "A transition with an accepter must have a state as its source."

MsgAccepterSourceNotState is the pilot's wording of the same rule.

View Source
const MsgParallelStateTransition = "A parallel state cannot have successions or transitions."

MsgParallelStateTransition is the pilot's wording of the same rule.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionEndpointPass

type ActionEndpointPass struct{}

ActionEndpointPass checks endpoints written in action bodies against the nodes accepted by action lowering.

func (ActionEndpointPass) ElementScoped

func (ActionEndpointPass) ElementScoped()

ElementScoped lets each endpoint subject gate independently on lower failures.

func (ActionEndpointPass) Level

Level reports that this pass consumes name-resolution results.

func (ActionEndpointPass) Run

Run checks named endpoints in every action body in the document.

type ActionStepMultiplicityPass added in v0.10.0

type ActionStepMultiplicityPass struct{}

ActionStepMultiplicityPass warns about action steps the runtime cannot execute according to their declared multiplicity.

func (ActionStepMultiplicityPass) ElementScoped added in v0.10.0

func (ActionStepMultiplicityPass) ElementScoped()

func (ActionStepMultiplicityPass) Level added in v0.10.0

func (ActionStepMultiplicityPass) Run added in v0.10.0

type ControlNodeSuccessionPass

type ControlNodeSuccessionPass struct{}

ControlNodeSuccessionPass checks the successions of fork, join, merge, and decision nodes against the bounds SysML v2 7.17.3 places on each kind, and that every control node is owned by an action definition or usage.

func (ControlNodeSuccessionPass) ElementScoped

func (ControlNodeSuccessionPass) ElementScoped()

ElementScoped: each control node is its own subject.

func (ControlNodeSuccessionPass) Level

func (ControlNodeSuccessionPass) Run

type StateTransitionPass

type StateTransitionPass struct{}

StateTransitionPass checks that every transition names one source and one target vertex of its own machine (UML 2.5.1 §14.2.3.9), and that a routing pseudostate is left by one (§15.7.18).

func (StateTransitionPass) Level

Level reports the name-resolution level: resolved endpoints are all it reads.

func (StateTransitionPass) Run

Run checks every state machine the document declares, and the source of every transition with an accepter wherever it is written.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL