Version History

This page contains notable changes that affect the API with more details than provided by the changelogs.

v0.9.1

  • Added resolve_duplicate_names to reqif.ImportOptions. Setting this to True will append __<6 characters of id> to the ReqIF objects that have duplicated names. On export to ReqIF, Syside will detect these modifications and automatically strip them.

v0.9.0

  • Added LazyImportsIterator that provides an opt-in method to evaluate import filters on imported members via LazyImportsIterator.with_import_filter. There is also a convenience evaluator CompilerFilter.

    def filtered(
        element: Namespace, compiler: Compiler, lib: Stdlib | None = None
    ) -> list[Membership]:
        filter = CompilerFilter(compiler=compiler, lib=lib or Environment.get_default().lib)
        return element.memberships.with_import_filter(filter).collect()
    
  • Added SerializationOptions.filter that allows evaluating import filters during serialization with a given evaluator. Note that this adds overhead through filter expression evaluation, and expressions may be evaluated multiple times with the same arguments.

  • Changed __main__ to invoke the native CLI. All commands work the same as if using native CLI, however there is non-negligible Python startup cost compared to the native executable. interactive command has not changed. Standard output can be captured via contextlib.redirect_stdout and friends.

  • Moved and refactored FormatOptions to conf.FormatOptions. The structure is mostly incompatible with previous versions, but matches the structure used in syside.toml, and should be easier to navigate.

  • BoundMetaclass.metaclass is now optional. This makes reflection and metadata classification work without passing standard library cache to Compiler.evaluate and friends.

  • Marked BaseModel and Model as frozen to satisfy type checkers.

  • Added missing ForLoopActionUsage.seq_member.

  • Extended Compiler.evaluate to work on calculations and constraints as invocations without explicit arguments. Requirement evaluation implemented as

    conjunction(assumed constraints) implies conjunction(required constraints + nested requirements)
    
  • Split scalar values off of Value into Scalar. This just propagates the internal behaviour to the type system, namely that returned lists were never staggered.

  • Added complex evaluation to interpreter, and to Scalar.

  • Added fractions.Fraction evaluation to interpreter, and to Scalar. Integer division now returns a rational number which is exact as long as numerator and denominator fit into 64 bit signed integer (2^63..2^63-1).

  • Added ReqIF import and export functionality. The main use case is to use it as a CLI through syside reqif --help, python -m syside reqif --help or python -m syside.reqif. Requires Syside Automator to be installed with an optional [reqif] extra, e.g. pip install syside[reqif].

v0.8.5

  • Added Compiler.evaluate_filter to evaluate filter expressions on selected elements. This assumes that filter expressions operator on the element metadata rather than the element itself.

  • Compiler now evaluates supported user defined functions.

  • Compiler now evaluates metamodel reflection.

  • Added Sema.resolve overload that accepts Sequence[Document] instead. The first overload will be deprecated and removed in future versions to reduce chances of deadlocking.

  • Simplified builtin standard function lookup to allow calling standard operator functions explicitly, and support type-overloaded standard functions.

  • Implemented most missing scalar and sequence functions from the Kernel Function Library. They also support optional and named arguments.

v0.8.4

v0.8.3

v0.8.2

v0.8.1

v0.8.0

Version v0.8.0 updates SysML support including changes from:

Most notable changes:

  • Removed implicit SubjectMemberships and ObjectiveMemberships from requirements and cases.

  • Feature.is_constant replaces Feature.is_read_only.

  • Added Feature.is_variable.

  • Added ConstructorExpressions which replace InvocationExpressions that invoke non-Step, non-Behavior types. While the syntax is similar with former needing a new keyword prefix, parse trees are different:

    attribute x = Type(2);
    
    Namespace [0, 0] - [1, 0]
      children: OwningMembership [0, 0] - [0, 22]
        target: AttributeUsage [0, 0] - [0, 22]
          attribute [0, 0] - [0, 9]
          declared_name: NAME [0, 10] - [0, 11]
          value: FeatureValue [0, 12] - [0, 21]
            = [0, 12] - [0, 13]
            target: InvocationExpression [0, 14] - [0, 21]
              children: Membership [0, 14] - [0, 18]
                target: TypeReference [0, 14] - [0, 18]
                  parts: NAME [0, 14] - [0, 18]
              ( [0, 18] - [0, 19]
              children: ParameterMembership [0, 19] - [0, 20]
                target: Feature [0, 19] - [0, 20]
                  value: FeatureValue [0, 19] - [0, 20]
                    target: LiteralInteger [0, 19] - [0, 20]
                      literal: DECIMAL_VALUE [0, 19] - [0, 20]
              ) [0, 20] - [0, 21]
          ; [0, 21] - [0, 22]
    
    attribute x = new Type(2);
    
    Namespace [0, 0] - [1, 0]
      children: OwningMembership [0, 0] - [0, 26]
        target: AttributeUsage [0, 0] - [0, 26]
          attribute [0, 0] - [0, 9]
          declaredName: NAME [0, 10] - [0, 11]
          value: FeatureValue [0, 12] - [0, 25]
            = [0, 12] - [0, 13]
            target: ConstructorExpression [0, 14] - [0, 25]
              new [0, 14] - [0, 17]
              children: Membership [0, 18] - [0, 22]
                target: TypeReference [0, 18] - [0, 22]
                  parts: NAME [0, 18] - [0, 22]
              children: ReturnParameterMembership [0, 22] - [0, 25]
                target: Feature [0, 22] - [0, 25]
                  ( [0, 22] - [0, 23]
                  children: ParameterMembership [0, 23] - [0, 24]
                    target: Feature [0, 23] - [0, 24]
                      value: FeatureValue [0, 23] - [0, 24]
                        target: LiteralInteger [0, 23] - [0, 24]
                          literal: DECIMAL_VALUE [0, 23] - [0, 24]
                  ) [0, 24] - [0, 25]
          ; [0, 25] - [0, 26]
    

    Note that the type constructed by ConstructorExpression is now a member in Namespace.children, and arguments are parsed into a return Feature.

  • Renamed some classes, and related snaked_cased attribute names:

    • ItemFeature renamed to PayloadFeature, item_feature to payload_feature.

    • ItemFlow renamed to Flow, item_flow to flow.

    • FlowConnectionUsage and FlowConnectionDefinition renamed to FlowUsage and FlowDefinition respectively, flow_connection to flow.

  • Removed Featuring and LifeClass types - these were not representable in textual syntax anyway, but FeatureMembership and TypeFeaturing lost inherited members from Featuring.

  • MetadataAccessExpression.set_referenced_element was fixed in the specification to be referenced through Membership, available through MetadataAccessExpression.referenced_element.

  • Added Element.path, and extended deterministic element ID generation to user models. However, also note:

    • Element.path does not yet work for elements without qualified_name due to performance concerns. This should be fixed in a future release.

    • User element ID generation may be changed in a future version if we can improve performance.

  • Added previously missed standard attributes:

Other non-model changes include:

  • Increased default PrinterConfig.line_width to 100 from 80 to match rustfmt and produce fewer line breaks, this works better with modern monitors.

  • Improved deserialization to defer unresolved references without @uri instead of emitting an error. Unresolved owned elements still emit errors.

v0.7.2

v0.6.4

  • Added print_references option to print references with sexp

v0.6.3

v0.6.0

Initial public release.