• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stillwater-sc / universal / 23715766161
85%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 29 Mar 2026 06:44PM UTC
Jobs 1
Files 630
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Mar 2026 06:16PM UTC coverage: 84.352% (+0.02%) from 84.328%
23715766161

push

github

web-flow
feat(ucalc): AST subtree matching and suggest command (#674)

* docs(ucalc): AST evaluator conversion plan for Epic #642

Plan for converting the expression evaluator to AST-based with
provenance tracking, rewrite pattern database, and structural
pattern matching. Five phases, each delivering standalone value.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ucalc): AST subtree matching and suggest command (#669)

Add structural pattern matching on expression ASTs:

- match_ast(): matches an expression tree against a pattern template
  with variable binding (pattern variables bind to arbitrary subtrees)
- Handles commutativity for + and * (a+b matches b+a)
- Repeated pattern variables must bind to identical subtrees
- find_pattern(): depth-first search for matching subtrees
- substitute_ast(): replaces pattern variables with bound subtrees
- ast_equal(): structural equality test

Add `suggest <expr>` command that scans the expression AST against
the rewrite pattern database (#668) and reports matches:

  ucalc> suggest sqrt(a) - sqrt(b)
    pattern:     Square root difference (sqrt_diff)
    matched:     (sqrt(a) - sqrt(b))
    alternative: ((a - b) / (sqrt(a) + sqrt(b)))
    condition:   a, b exact inputs, a ~= b > 0

All output formats: plain, --json, --csv, --quiet.

Resolves #669

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(ucalc): resolve CodeRabbit review items for suggest command

Three fixes:

1. find_all_patterns() collects ALL subtree matches, not just the
   first. suggest command now finds multiple occurrences of the same
   pattern in one expression (e.g., two sqrt differences).

2. Narrowed catch(...) to catch(const std::exception&) so malformed
   patterns produce diagnosable errors, not silent swallowing.

3. Added comment noting precondition/magnitude checks are deferred
   to Phase 5 (#670 verification).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
... (continued)

44587 of 52858 relevant lines covered (84.35%)

6101442.01 hits per line

Jobs
ID Job ID Ran Files Coverage
1 23715766161.1 29 Mar 2026 06:44PM UTC 630
84.35
GitHub Action Run
Source Files on build 23715766161
  • Tree
  • List 630
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23715766161
  • e9d16b4a on github
  • Prev Build on main (#23712086399)
  • Next Build on main (#23716789256)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc