Skip to content

Support STL formula parsing#1

Merged
qthibeault merged 36 commits into
mainfrom
feature-stl-parser
Jul 17, 2026
Merged

Support STL formula parsing#1
qthibeault merged 36 commits into
mainfrom
feature-stl-parser

Conversation

@qthibeault

Copy link
Copy Markdown
Contributor

Merge cpslab-asu/banquo#8 made parsing functionality for STL formulas public in the banquo Rust library, which means that we can now create bindings to allow parsing from Python.

These assertions guarantee that the EnsureInput wrappers in the core are
functioning properly when transitioning from Rust evaluation to Python
evaluation.
This makes it slightly easier than having to define a class for quick
operator or expression definitions.
Since Banquo now provides access to the ForwardEvaluationError, we need
to handle it as a unique case when converting errors from forward
operator bindings.
Splitting up the monolithic _banquo_impl module makes maintenance and
refactoring simpler. Implement new methods on PyMetricTrace for
inverting inner results to outer result and update PyFormula
implementation to short circuit if the contained formula produces an
error.
This allows us to implement Meet and Join without having to resort to
panicking if an operator is not defined. Now the error is caught in the
value and can be reported. This method is less efficient because we
evaluate the whole trace even if the first element errors but we gain
better error reporting.
implementations

We delegate to the python definitions of `min` and `max` in the PyMetric
Meet and Join implementations, which use the strict inequality
operators. Thus we change our type bounds appropriately.
Define a custom module type to represent the STL submodule in the
_banquo_impl library.
Replace pyright with pyrefly and create more dependency groups
for better control in CI workflows
This matches the version bounds in the build dependencies
The psm library is failing to compile on the s390x architecture. We set
the processor architecture to z10 as found in the discussion
[here](rust-lang/stacker#79).
macos-13 runner for the x86_64 build is no longer supported, so we
upgrade to macos 15 and ensure it is running on an intel machine. For
the arm64 build we use the latest version of the macos runner, which
will always be running on apple silicon.
@qthibeault
qthibeault merged commit 8d852f5 into main Jul 17, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant