Documentation
¶
Index ¶
- Constants
- type ActionEndpointPass
- type AssignmentReferentPass
- type AssociationEndTypesPass
- type ConstraintPass
- type Context
- func NewContext(name string, idx *symbols.Index, parseDiags []Diagnostic) *Context
- func NewContextWithKind(name string, kind source.Kind, idx *symbols.Index, parseDiags []Diagnostic) *Context
- func NewContextWithOptions(name string, kind source.Kind, idx *symbols.Index, parseDiags []Diagnostic, ...) *Context
- type Diagnostic
- type ElementFilterPass
- type ElementScoped
- type FeatureReferencePass
- type ImplicitBasePass
- type ImportVisibilityPass
- type KerMLSubsettingMetaclassPass
- type MetadataAnnotationPass
- type MetadataTypePass
- type MultiplicityBoundsPass
- type NameResolutionPass
- type NonstandardNotationPass
- type Options
- type Pass
- type PassLevel
- type RedefinitionConformancePass
- type RedefinitionDirectionPass
- type ReferenceSubsettingPass
- type Registry
- type ResultExpressionPass
- type Severity
- type StateTransitionPass
- type SyntaxPass
- type TopLevelImportPass
- type TransitionGuardPass
- type TypeCheckPass
- type TypeRelationshipsPass
- type VariableFeaturePass
- type W8DConnectorFeaturingPass
- type W8DFlowEndPass
- type W8DMetadataUsagePass
- type W8DOccurrenceTypingPass
- type W8DVariabilityPass
- type W8DVerificationPass
- type W8DViewRenderingPass
- type W9CBoundFeatureTypesPass
- type W9CInheritedNameConflictPass
- type W9CShortNameDistinguishabilityPass
- type W9CUserStandardLibraryPass
- type W10BEndKindPass
- type W10BIndividualTypingPass
- type W10BPortionOwnerPass
- type W10BRelatedElementsPass
- type W10BStructuralPass
- type W11AKerMLSpecializationPass
- type W11AUsageTypingPass
- type W11EConjugatedSpecializationPass
Constants ¶
const CodeAccepterSourceNotState = "accepter-source-not-state"
CodeAccepterSourceNotState marks a transition whose accepter waits in something other than a state (SysML v2 §7.16 TransitionUsage).
const CodeEndpointNotANode = "endpoint-not-a-node"
CodeEndpointNotANode marks an action endpoint naming something other than an action node accepted by the action lowerer.
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).
const CodeKerMLNotation = "kerml-notation"
CodeKerMLNotation marks KerML notation used in a SysML file, where the SysML grammar has no production for it. Strict mode rejects it too: the pinned SysML grammar admits it nowhere.
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).
const CodeNonstandardNotation = "nonstandard-notation"
CodeNonstandardNotation marks notation OpenSysML accepts that no production of the pinned SysML v2 grammars admits.
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).
const CodeReservedKeywordName = "reserved-keyword-name"
CodeReservedKeywordName marks a recovered declared name spelled as a reserved keyword, which analysis rejects in every mode.
const CodeSysMLNotation = "sysml-notation"
CodeSysMLNotation marks SysML notation used in a KerML file, which the pinned KerML grammar admits nowhere.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionEndpointPass ¶ added in v0.3.0
type ActionEndpointPass struct{}
ActionEndpointPass checks endpoints written in action bodies against the nodes accepted by action lowering.
func (ActionEndpointPass) ElementScoped ¶ added in v0.3.0
func (ActionEndpointPass) ElementScoped()
ElementScoped lets each endpoint subject gate independently on lower failures.
func (ActionEndpointPass) Level ¶ added in v0.3.0
func (ActionEndpointPass) Level() PassLevel
Level reports that this pass consumes name-resolution results.
func (ActionEndpointPass) Run ¶ added in v0.3.0
func (ActionEndpointPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
Run checks named endpoints in every action body in the document.
type AssignmentReferentPass ¶ added in v0.2.0
type AssignmentReferentPass struct{}
AssignmentReferentPass checks SysML AssignmentActionUsage referents.
func (AssignmentReferentPass) ElementScoped ¶ added in v0.2.0
func (AssignmentReferentPass) ElementScoped()
func (AssignmentReferentPass) Level ¶ added in v0.2.0
func (AssignmentReferentPass) Level() PassLevel
func (AssignmentReferentPass) Run ¶ added in v0.2.0
func (AssignmentReferentPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type AssociationEndTypesPass ¶ added in v0.2.0
type AssociationEndTypesPass struct{}
AssociationEndTypesPass checks that every owned end feature of an association has exactly one type (KerML 8.3.4.1.2, validateAssociationEndTypes), counting types inherited by redefinition and ignoring ones a more specific type implies.
func (AssociationEndTypesPass) Level ¶ added in v0.2.0
func (AssociationEndTypesPass) Level() PassLevel
func (AssociationEndTypesPass) Run ¶ added in v0.2.0
func (AssociationEndTypesPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type ConstraintPass ¶
type ConstraintPass struct{}
ConstraintPass runs the depth-C semantic constraint checks over a document's symbol tree: specialization-cycle detection, multiplicity-range validity, and subsetting multiplicity conformance (design §4.1). It runs at LevelConstraint, after type checking; it relies on the shared semantic model for the resolved specialization graph and extracted multiplicities.
func (ConstraintPass) Level ¶
func (ConstraintPass) Level() PassLevel
func (ConstraintPass) Run ¶
func (ConstraintPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type Context ¶
type Context struct {
Name string
Kind source.Kind
Index *symbols.Index
ParseDiagnostics []Diagnostic
// Options is what the caller asked for, fixed at construction: a pass reads
// it, and nothing mutates it during a run.
Options Options
// contains filtered or unexported fields
}
Context carries shared state made available to every pass in a run: the document name, the global symbol index, a lazily-created shared resolver, and the syntax diagnostics produced by the caller's parse (passes must not import the parser, so these enter here).
func NewContext ¶
func NewContext(name string, idx *symbols.Index, parseDiags []Diagnostic) *Context
NewContext builds a Context for a document, in the default mode.
func NewContextWithKind ¶ added in v0.2.0
func NewContextWithKind(name string, kind source.Kind, idx *symbols.Index, parseDiags []Diagnostic) *Context
NewContextWithKind builds a context with an explicit source language.
func NewContextWithOptions ¶ added in v0.2.0
func NewContextWithOptions(name string, kind source.Kind, idx *symbols.Index, parseDiags []Diagnostic, opts Options) *Context
NewContextWithOptions builds a context that carries explicit analysis options.
func (*Context) DownstreamOfFailure ¶ added in v0.2.0
DownstreamOfFailure reports whether a reference an element's meaning rests on — its type, its metaclass — carries a blocking fault from a lower tier, so a pass whose subject is that element has nothing sound to judge.
type Diagnostic ¶
type Diagnostic struct {
Severity Severity
Span source.Span
Message string
Code string // stable identifier for filtering / quick-fix selection
Source string // the pass ID that produced this diagnostic
// Fixes are the unambiguous edits resolving the diagnostic, offered by an
// editor as quick fixes.
Fixes []quickfix.Fix
// Notation marks a finding about how the model is written rather than about
// what it means: the document still reads, so it does not gate higher tiers.
Notation bool
}
Diagnostic is a single validation finding produced by a pass.
func Analyze ¶
func Analyze(name string, root *ast.RootNamespace, parseDiags []Diagnostic, idx *symbols.Index) []Diagnostic
Analyze runs the default validation passes over a single parsed document and returns diagnostics sorted by span offset, then source, then message. parseDiags are the parser's diagnostics, already adapted to passes.Diagnostic by the caller.
func AnalyzeWithKind ¶ added in v0.2.0
func AnalyzeWithKind(name string, kind source.Kind, root *ast.RootNamespace, parseDiags []Diagnostic, idx *symbols.Index) []Diagnostic
AnalyzeWithKind validates a document whose language is not encoded in name, in the default conformance mode.
func AnalyzeWithOptions ¶ added in v0.2.0
func AnalyzeWithOptions(name string, kind source.Kind, root *ast.RootNamespace, parseDiags []Diagnostic, idx *symbols.Index, opts Options) []Diagnostic
AnalyzeWithOptions validates a document under explicit analysis options.
func (Diagnostic) Blocking ¶ added in v0.2.0
func (d Diagnostic) Blocking() bool
Blocking reports whether the finding stops what depends on the model being readable — a higher validation tier, a summary of what a submission declared. A notation error is about the writing, not the meaning, so it stops neither.
type ElementFilterPass ¶
type ElementFilterPass struct{}
ElementFilterPass checks the element-filter conditions a document writes: the `filter` members of a namespace (KerML 8.2.4) and the `[...]` clause of an import or expose (SysML v2 7.4.4). A condition is a predicate over one candidate element, so it has to be boolean-valued and it has to be a form the filter evaluator can decide; a condition that is neither selects nothing, and name resolution keeps every candidate rather than hiding model content on a verdict it could not reach.
It runs at LevelType, and its subject is one condition. A classification test is Boolean whatever type it names, so it rests on that type and says nothing more once the type fails to resolve; every other form is judged on itself, where an unresolved name is the verdict — not model-level evaluable — rather than a reason to withhold it.
func (ElementFilterPass) ElementScoped ¶ added in v0.2.0
func (ElementFilterPass) ElementScoped()
func (ElementFilterPass) Level ¶
func (ElementFilterPass) Level() PassLevel
func (ElementFilterPass) Run ¶
func (ElementFilterPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type ElementScoped ¶ added in v0.2.0
type ElementScoped interface{ ElementScoped() }
ElementScoped marks a pass whose subject is a single element rather than the document, so a failure on another element does not skip it. Such a pass names its subject in code and asks Context.DownstreamOfFailure about the references that subject rests on.
type FeatureReferencePass ¶ added in v0.2.0
type FeatureReferencePass struct{}
FeatureReferencePass checks the features an expression names: a referent must be a feature (KerML 8.4.4.6.2/8.4.4.7.2), and a featured one must be reachable from where it is named (8.3.4.5.2 validateSubsettingFeaturingTypes).
func (FeatureReferencePass) Level ¶ added in v0.2.0
func (FeatureReferencePass) Level() PassLevel
func (FeatureReferencePass) Run ¶ added in v0.2.0
func (FeatureReferencePass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type ImplicitBasePass ¶ added in v0.2.0
type ImplicitBasePass struct{}
ImplicitBasePass checks that a classifier reaches the standard-library supertype implied by its kind and that a feature has at least one type (KerML 1.0 validateClassifierDefaultSupertype, validateFeatureHasType). Both hold implicitly once the library is in the resource set, so they report a model whose resources do not supply it, or whose conjugation replaces it.
func (ImplicitBasePass) Level ¶ added in v0.2.0
func (ImplicitBasePass) Level() PassLevel
func (ImplicitBasePass) Run ¶ added in v0.2.0
func (ImplicitBasePass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type ImportVisibilityPass ¶ added in v0.1.2
type ImportVisibilityPass struct{}
ImportVisibilityPass reports an `import` written without the visibility indicator ImportPrefix makes mandatory (KerML.xtext:169-172, SysML.xtext:241-244). The reference rejects the bare form, so it is an error in every mode (D2, docs/project/wave10-decisions.md); the form still parses and reads, so the finding is notation and gates no higher tier.
func (ImportVisibilityPass) Level ¶ added in v0.1.2
func (ImportVisibilityPass) Level() PassLevel
func (ImportVisibilityPass) Run ¶ added in v0.1.2
func (ImportVisibilityPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type KerMLSubsettingMetaclassPass ¶ added in v0.2.1
type KerMLSubsettingMetaclassPass struct{}
KerMLSubsettingMetaclassPass checks that a feature subsets another Feature.
func (KerMLSubsettingMetaclassPass) ElementScoped ¶ added in v0.2.1
func (KerMLSubsettingMetaclassPass) ElementScoped()
func (KerMLSubsettingMetaclassPass) Level ¶ added in v0.2.1
func (KerMLSubsettingMetaclassPass) Level() PassLevel
func (KerMLSubsettingMetaclassPass) Run ¶ added in v0.2.1
func (KerMLSubsettingMetaclassPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type MetadataAnnotationPass ¶ added in v0.2.0
type MetadataAnnotationPass struct{}
MetadataAnnotationPass checks a metadata annotation: what it may annotate, and that its body restates features of its type and binds model-level evaluable values (KerML 1.0 §7.4.9, §8.3.4.9).
func (MetadataAnnotationPass) Level ¶ added in v0.2.0
func (MetadataAnnotationPass) Level() PassLevel
func (MetadataAnnotationPass) Run ¶ added in v0.2.0
func (MetadataAnnotationPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type MetadataTypePass ¶ added in v0.2.0
type MetadataTypePass struct{}
MetadataTypePass reports an annotation whose metaclass is abstract (KerML 1.0 §8.3.4.9.2, validateMetadataFeatureMetaclassNotAbstract).
func (MetadataTypePass) ElementScoped ¶ added in v0.2.0
func (MetadataTypePass) ElementScoped()
Its subject is one annotation, and the reference that subject rests on is the metaclass it names: a failure on another element does not hide it.
func (MetadataTypePass) Level ¶ added in v0.2.0
func (MetadataTypePass) Level() PassLevel
func (MetadataTypePass) Run ¶ added in v0.2.0
func (MetadataTypePass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type MultiplicityBoundsPass ¶ added in v0.2.0
type MultiplicityBoundsPass struct{}
MultiplicityBoundsPass checks that every multiplicity bound has a Natural value (KerML 8.3.3.1.9, validateMultiplicityRangeBoundResultTypes): a model-level evaluable bound must evaluate to a non-negative whole number or `*`, and any other bound must have an Integer-conforming result type.
func (MultiplicityBoundsPass) Level ¶ added in v0.2.0
func (MultiplicityBoundsPass) Level() PassLevel
func (MultiplicityBoundsPass) Run ¶ added in v0.2.0
func (MultiplicityBoundsPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type NameResolutionPass ¶
type NameResolutionPass struct{}
NameResolutionPass resolves every reference in a document via the Plan-3 resolver and reports unresolved / ambiguous references.
func (NameResolutionPass) Level ¶
func (NameResolutionPass) Level() PassLevel
Level reports the name-resolution dependency level.
func (NameResolutionPass) Run ¶
func (NameResolutionPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
Run resolves the document and adapts resolver diagnostics.
type NonstandardNotationPass ¶ added in v0.1.2
type NonstandardNotationPass struct{}
NonstandardNotationPass reports extension notation and recoverable grammar violations without gating later semantic analysis.
func (NonstandardNotationPass) Level ¶ added in v0.1.2
func (NonstandardNotationPass) Level() PassLevel
Level reports the syntax level: the written notation is all it reads.
func (NonstandardNotationPass) Run ¶ added in v0.1.2
func (NonstandardNotationPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
Run walks the document for extension and language-specific notation.
type Options ¶ added in v0.2.0
type Options struct {
// Conformance is the strictness the notation is judged at.
Conformance conformance.Mode
}
Options is the analysis configuration of one run. The zero value is what every existing caller gets: today's behavior, unchanged.
type Pass ¶
type Pass interface {
Level() PassLevel
Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
}
Pass is a single validation rule. Level reports its dependency tier; Run executes it over a whole document and returns any diagnostics found.
type PassLevel ¶
type PassLevel int
PassLevel is the dependency tier of a validation pass. Passes at a higher level are skipped when a lower level produced an error, avoiding cascade noise (e.g. no type-check on an unresolved reference).
type RedefinitionConformancePass ¶ added in v0.2.0
type RedefinitionConformancePass struct{}
RedefinitionConformancePass reports the feature-conformance rules a subsetting or redefinition breaks: direction, uniqueness and constancy (KerML 8.3.3.3). The predicates live in semantics; this pass only locates and words them.
func (RedefinitionConformancePass) Level ¶ added in v0.2.0
func (RedefinitionConformancePass) Level() PassLevel
func (RedefinitionConformancePass) Run ¶ added in v0.2.0
func (RedefinitionConformancePass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type RedefinitionDirectionPass ¶ added in v0.2.0
type RedefinitionDirectionPass struct{}
RedefinitionDirectionPass reports direction conformance as a typing property.
func (RedefinitionDirectionPass) Level ¶ added in v0.2.0
func (RedefinitionDirectionPass) Level() PassLevel
func (RedefinitionDirectionPass) Run ¶ added in v0.2.0
func (RedefinitionDirectionPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type ReferenceSubsettingPass ¶ added in v0.2.0
type ReferenceSubsettingPass struct{}
ReferenceSubsettingPass checks that a feature owns at most one reference subsetting (`references`/`::>`), KerML 8.3.3.1.5. Every reference subsetting after the first is reported, as the pilot does.
func (ReferenceSubsettingPass) Level ¶ added in v0.2.0
func (ReferenceSubsettingPass) Level() PassLevel
func (ReferenceSubsettingPass) Run ¶ added in v0.2.0
func (ReferenceSubsettingPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds an ordered set of validation passes.
func DefaultRegistry ¶
func DefaultRegistry() *Registry
DefaultRegistry returns the default pass registry: syntax, name resolution, state transitions, type checking, and semantic constraints.
func (*Registry) Run ¶
func (r *Registry) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
Run executes all registered passes in ascending PassLevel order and returns their accumulated diagnostics. A pass whose subject is the document is skipped once a strictly lower level emitted a blocking diagnostic, avoiding cascade noise; an ElementScoped pass runs and gates itself per element. Passes at the same level always run.
type ResultExpressionPass ¶ added in v0.2.0
type ResultExpressionPass struct{}
ResultExpressionPass checks that a function or expression has at most one result expression, owned or inherited (KerML 8.3.4.5.2). A function that inherits a result expression from a supertype cannot add its own, and one that inherits two along different specializations is invalid on its own.
func (ResultExpressionPass) Level ¶ added in v0.2.0
func (ResultExpressionPass) Level() PassLevel
func (ResultExpressionPass) Run ¶ added in v0.2.0
func (ResultExpressionPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
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 ¶
func (StateTransitionPass) Level() PassLevel
Level reports the name-resolution level: resolved endpoints are all it reads.
func (StateTransitionPass) Run ¶
func (StateTransitionPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
Run checks every state machine the document declares.
type SyntaxPass ¶
type SyntaxPass struct{}
SyntaxPass surfaces the parser-produced diagnostics carried on the Context. The passes package does not import parser; the caller adapts parser diagnostics into passes.Diagnostic and stores them on Context.ParseDiagnostics.
func (SyntaxPass) Level ¶
func (SyntaxPass) Level() PassLevel
Level reports that syntax is the lowest dependency level.
func (SyntaxPass) Run ¶
func (SyntaxPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
Run returns the parse diagnostics carried on the context.
type TopLevelImportPass ¶ added in v0.2.0
type TopLevelImportPass struct{}
TopLevelImportPass checks that an import owned by the root namespace is private (KerML 8.2.3.4.2, validateImportTopLevelVisibility): a root namespace has no owner, so a non-private import there exports into nothing. It runs at the constraint tier so a recovered parse is not reported on twice and this error does not gate the type and constraint tiers.
func (TopLevelImportPass) Level ¶ added in v0.2.0
func (TopLevelImportPass) Level() PassLevel
func (TopLevelImportPass) Run ¶ added in v0.2.0
func (TopLevelImportPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type TransitionGuardPass ¶ added in v0.2.1
type TransitionGuardPass struct{}
TransitionGuardPass checks that each transition guard is Boolean-valued.
func (TransitionGuardPass) ElementScoped ¶ added in v0.2.1
func (TransitionGuardPass) ElementScoped()
func (TransitionGuardPass) Level ¶ added in v0.2.1
func (TransitionGuardPass) Level() PassLevel
func (TransitionGuardPass) Run ¶ added in v0.2.1
func (TransitionGuardPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type TypeCheckPass ¶
type TypeCheckPass struct{}
TypeCheckPass validates that each def/usage relationship target has a symbol kind compatible with the source node and relationship kind (spec §6.3), and types expressions (operands, bound values, invocation arguments) against the stdlib scalar lattice. It runs at LevelType, after name resolution; unresolved targets are skipped.
func (TypeCheckPass) Level ¶
func (TypeCheckPass) Level() PassLevel
func (TypeCheckPass) Run ¶
func (TypeCheckPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type TypeRelationshipsPass ¶ added in v0.2.0
type TypeRelationshipsPass struct{}
TypeRelationshipsPass checks the union, intersection, difference and chaining relationships a type owns for a single operand or a self operand (KerML 8.3.3.1.2, 8.3.3.1.5). Constraint tier: the self rules resolve targets.
func (TypeRelationshipsPass) Level ¶ added in v0.2.0
func (TypeRelationshipsPass) Level() PassLevel
func (TypeRelationshipsPass) Run ¶ added in v0.2.0
func (TypeRelationshipsPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type VariableFeaturePass ¶ added in v0.2.0
type VariableFeaturePass struct{}
VariableFeaturePass checks that a `var` feature is owned by an occurrence type (KerML 8.3.3.1.5, validateFeatureIsVariable): a variable feature is a snapshot-varying feature, which only an occurrence has.
func (VariableFeaturePass) Level ¶ added in v0.2.0
func (VariableFeaturePass) Level() PassLevel
func (VariableFeaturePass) Run ¶ added in v0.2.0
func (VariableFeaturePass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W8DConnectorFeaturingPass ¶ added in v0.2.0
type W8DConnectorFeaturingPass struct{}
W8DConnectorFeaturingPass checks that each end of a connector names a feature featured within the connector's own featuring type (KerML 1.0 §8.3.3.3, Feature::isFeaturedWithin): a nested feature is reached with dot notation, not with `::`.
func (W8DConnectorFeaturingPass) Level ¶ added in v0.2.0
func (W8DConnectorFeaturingPass) Level() PassLevel
func (W8DConnectorFeaturingPass) Run ¶ added in v0.2.0
func (W8DConnectorFeaturingPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W8DFlowEndPass ¶ added in v0.2.0
type W8DFlowEndPass struct{}
W8DFlowEndPass checks that a flow's ends name features of the flow's own context rather than members of an unrelated definition (SysML v2 §8.3.17).
func (W8DFlowEndPass) Level ¶ added in v0.2.0
func (W8DFlowEndPass) Level() PassLevel
func (W8DFlowEndPass) Run ¶ added in v0.2.0
func (W8DFlowEndPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W8DMetadataUsagePass ¶ added in v0.2.0
type W8DMetadataUsagePass struct{}
W8DMetadataUsagePass checks a `metadata m : A { … }` usage against the metadata definition it is typed by: every feature its body writes must be one of the definition's own (KerML §7.5), and the definition must be concrete. Prefix annotations are RedefinitionConformancePass's (body features) and MetadataTypePass's (concrete type).
func (W8DMetadataUsagePass) Level ¶ added in v0.2.0
func (W8DMetadataUsagePass) Level() PassLevel
func (W8DMetadataUsagePass) Run ¶ added in v0.2.0
func (W8DMetadataUsagePass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W8DOccurrenceTypingPass ¶ added in v0.2.0
type W8DOccurrenceTypingPass struct{}
W8DOccurrenceTypingPass checks that an occurrence, item or part is typed by occurrence definitions only (SysML v2 §8.3.9.11, OccurrenceUsage).
func (W8DOccurrenceTypingPass) Level ¶ added in v0.2.0
func (W8DOccurrenceTypingPass) Level() PassLevel
func (W8DOccurrenceTypingPass) Run ¶ added in v0.2.0
func (W8DOccurrenceTypingPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W8DVariabilityPass ¶ added in v0.2.0
type W8DVariabilityPass struct{}
W8DVariabilityPass checks that every usage a variation owns is a variant and that a variation does not specialize another variation (SysML v2 §7.20).
func (W8DVariabilityPass) Level ¶ added in v0.2.0
func (W8DVariabilityPass) Level() PassLevel
func (W8DVariabilityPass) Run ¶ added in v0.2.0
func (W8DVariabilityPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W8DVerificationPass ¶ added in v0.2.0
type W8DVerificationPass struct{}
W8DVerificationPass checks that a `verify` appears only in the objective of a verification case (SysML v2 §8.3.24).
func (W8DVerificationPass) Level ¶ added in v0.2.0
func (W8DVerificationPass) Level() PassLevel
func (W8DVerificationPass) Run ¶ added in v0.2.0
func (W8DVerificationPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W8DViewRenderingPass ¶ added in v0.2.0
type W8DViewRenderingPass struct{}
W8DViewRenderingPass checks that a view owns at most one view rendering (SysML v2 §8.3.26); a plain `rendering` member is no view rendering and does not count.
func (W8DViewRenderingPass) Level ¶ added in v0.2.0
func (W8DViewRenderingPass) Level() PassLevel
func (W8DViewRenderingPass) Run ¶ added in v0.2.0
func (W8DViewRenderingPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W9CBoundFeatureTypesPass ¶ added in v0.2.0
type W9CBoundFeatureTypesPass struct{}
W9CBoundFeatureTypesPass checks that the two features a binding connector binds have conforming types (SysML 8.3.3.1, KerML 8.3.4.3): binding features of unrelated types cannot be satisfied.
func (W9CBoundFeatureTypesPass) Level ¶ added in v0.2.0
func (W9CBoundFeatureTypesPass) Level() PassLevel
func (W9CBoundFeatureTypesPass) Run ¶ added in v0.2.0
func (W9CBoundFeatureTypesPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W9CInheritedNameConflictPass ¶ added in v0.2.0
type W9CInheritedNameConflictPass struct{}
W9CInheritedNameConflictPass warns when a declaration reuses a member name a library definition it conforms to already supplies — `state start;` inside a state, against StatePerformances::StateAction::start — and when two such definitions each supply a feature of one name: `action a : ABlock` inherits `self`, `start` and `done` from both Actions::Action and Parts::Part. The resolver's own rule covers only the document's own supertypes.
func (W9CInheritedNameConflictPass) Level ¶ added in v0.2.0
func (W9CInheritedNameConflictPass) Level() PassLevel
func (W9CInheritedNameConflictPass) Run ¶ added in v0.2.0
func (W9CInheritedNameConflictPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W9CShortNameDistinguishabilityPass ¶ added in v0.2.0
type W9CShortNameDistinguishabilityPass struct{}
W9CShortNameDistinguishabilityPass reports the short names one namespace uses twice, or that repeat another member's name: a short name is a name for distinguishability (KerML 7.2.2). Resolve's own rule keys on primary names, so it never sees these.
func (W9CShortNameDistinguishabilityPass) Level ¶ added in v0.2.0
func (W9CShortNameDistinguishabilityPass) Level() PassLevel
func (W9CShortNameDistinguishabilityPass) Run ¶ added in v0.2.0
func (W9CShortNameDistinguishabilityPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W9CUserStandardLibraryPass ¶ added in v0.2.0
type W9CUserStandardLibraryPass struct{}
W9CUserStandardLibraryPass reports a `standard library package` written outside the standard library: only the library's own packages may claim it (KerML 7.2.4).
func (W9CUserStandardLibraryPass) Level ¶ added in v0.2.0
func (W9CUserStandardLibraryPass) Level() PassLevel
func (W9CUserStandardLibraryPass) Run ¶ added in v0.2.0
func (W9CUserStandardLibraryPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W10BEndKindPass ¶ added in v0.2.0
type W10BEndKindPass struct{}
W10BEndKindPass checks the kind and the number of end features an interface or a flow connection definition declares. It is level-scoped to the type tier like the usage-typing rules it accompanies, since the reference reports both on the same declaration.
func (W10BEndKindPass) Level ¶ added in v0.2.0
func (W10BEndKindPass) Level() PassLevel
func (W10BEndKindPass) Run ¶ added in v0.2.0
func (W10BEndKindPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W10BIndividualTypingPass ¶ added in v0.2.0
type W10BIndividualTypingPass struct{}
W10BIndividualTypingPass checks that a usage carrying the `individual` modifier is typed by exactly one individual definition (SysML v2 §8.3.9.11). Other types are allowed beside it, as they are in the reference.
func (W10BIndividualTypingPass) Level ¶ added in v0.2.0
func (W10BIndividualTypingPass) Level() PassLevel
func (W10BIndividualTypingPass) Run ¶ added in v0.2.0
func (W10BIndividualTypingPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W10BPortionOwnerPass ¶ added in v0.2.0
type W10BPortionOwnerPass struct{}
W10BPortionOwnerPass checks that a `snapshot` or `timeslice` usage is owned by an occurrence definition or usage: a portion of an occurrence needs the occurrence it is a portion of (SysML v2 §8.3.9.11).
func (W10BPortionOwnerPass) Level ¶ added in v0.2.0
func (W10BPortionOwnerPass) Level() PassLevel
func (W10BPortionOwnerPass) Run ¶ added in v0.2.0
func (W10BPortionOwnerPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W10BRelatedElementsPass ¶ added in v0.2.0
type W10BRelatedElementsPass struct{}
W10BRelatedElementsPass reports a concrete association or connector with fewer than two ends: a link needs two participants (KerML §8.4.3.4). An abstract declaration is exempt, as it is in the reference — its ends are the specialization's to supply.
func (W10BRelatedElementsPass) Level ¶ added in v0.2.0
func (W10BRelatedElementsPass) Level() PassLevel
func (W10BRelatedElementsPass) Run ¶ added in v0.2.0
func (W10BRelatedElementsPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W10BStructuralPass ¶ added in v0.2.0
type W10BStructuralPass struct{}
W10BStructuralPass checks how many members of a kind a declaration owns and whether they may be composite. The rules read the declaration only, so they sit at the type tier rather than behind it.
func (W10BStructuralPass) Level ¶ added in v0.2.0
func (W10BStructuralPass) Level() PassLevel
func (W10BStructuralPass) Run ¶ added in v0.2.0
func (W10BStructuralPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W11AKerMLSpecializationPass ¶ added in v0.2.0
type W11AKerMLSpecializationPass struct{}
W11AKerMLSpecializationPass checks the kind of a KerML classifier's supertypes: a data type specializes neither a class nor an association, a class neither a data type nor an association, and a structure and a behavior do not specialize each other (KerML 1.0 §8.4.4).
func (W11AKerMLSpecializationPass) Level ¶ added in v0.2.0
func (W11AKerMLSpecializationPass) Level() PassLevel
func (W11AKerMLSpecializationPass) Run ¶ added in v0.2.0
func (W11AKerMLSpecializationPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W11AUsageTypingPass ¶ added in v0.2.0
type W11AUsageTypingPass struct{}
W11AUsageTypingPass checks the kind of a usage's type where the typing is inherited through a subsetting, redefinition or reference subsetting, and the kind of the feature a `perform`/`exhibit` member references.
func (W11AUsageTypingPass) Level ¶ added in v0.2.0
func (W11AUsageTypingPass) Level() PassLevel
func (W11AUsageTypingPass) Run ¶ added in v0.2.0
func (W11AUsageTypingPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
type W11EConjugatedSpecializationPass ¶ added in v0.2.0
type W11EConjugatedSpecializationPass struct{}
W11EConjugatedSpecializationPass checks that a conjugated type is not the specific type of a specialization (KerML 1.0 validateSpecializationSpecificNotConjugated). The specialization metaclass rules are W11AKerMLSpecializationPass's, and this pass shares its level so a kind error does not suppress this one.
func (W11EConjugatedSpecializationPass) Level ¶ added in v0.2.0
func (W11EConjugatedSpecializationPass) Level() PassLevel
func (W11EConjugatedSpecializationPass) Run ¶ added in v0.2.0
func (W11EConjugatedSpecializationPass) Run(ctx *Context, name string, root *ast.RootNamespace) []Diagnostic
Source Files
¶
- action_endpoint.go
- analyze.go
- at_most_one_member.go
- constraint.go
- diagnostic.go
- expose.go
- filter.go
- import_visibility.go
- kerml_subsetting_metaclass.go
- multiplicity_conformance.go
- nameres.go
- nonstandard_notation.go
- one_type.go
- pass.go
- registry.go
- state_transition.go
- subsetting_featuring.go
- syntax.go
- transition_guard.go
- typecheck.go
- typecheck_dimension.go
- typecheck_expr.go
- typecheck_value.go
- w10b_cross_features.go
- w10b_ends.go
- w10b_individual_portion.go
- w10b_redefinition.go
- w10b_related_elements.go
- w10b_structural.go
- w10b_usage_typing.go
- w11a_kerml_specialization.go
- w11a_usage_typing.go
- w11e_conjugated_specialization.go
- w11e_implicit_base.go
- w8b_redefinition_conformance.go
- w8c_association_end_types.go
- w8c_common.go
- w8c_feature_reference.go
- w8c_import_visibility.go
- w8c_metadata_annotation.go
- w8c_metadata_type.go
- w8c_multiplicity_bounds.go
- w8c_reference_subsetting.go
- w8c_result_expression.go
- w8c_type_relationships.go
- w8c_variable_feature.go
- w8d_assignment_referent.go
- w8d_connector_featuring.go
- w8d_flow_end.go
- w8d_metadata_usage.go
- w8d_occurrence_typing.go
- w8d_variability.go
- w8d_verification.go
- w8d_view_rendering.go
- w8d_walk.go
- w9c_bound_feature_types.go
- w9c_inherited_name_conflict.go
- w9c_owned_name_and_library.go