Skip to content
CAI
Software that uses CAICheck a score

Thorium/Linq.Expression.Optimizer

58.3

Adequate · 15 November 2026

1.6k

lines of production code

F#

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Linq.Expression.Optimizer v1.0.6 introduces expression tree optimization

This release adds the core optimization engine for System.Linq.Expressions, enabling users to simplify and optimize LINQ expression trees. The new \OptimizeExtension\ API allows calling \.Optimize()\ on expressions to apply reductions such as constant folding (e.g., simplifying \7 \> 8\ to \False\), boolean algebra simplifications, and the elimination of unused anonymous type members and empty code blocks. The optimizer also handles structural comparisons of member accesses and parameters to ensure correctness across different expression instances.

src/Code · high confidence

Test coverage

1 commit adding/updating tests in Linq.Expression.Optimizer.PropertyTests, Linq.Expression.Optimizer.Tests, tests; 1 commit adding/updating tests in Linq.Expression.Optimizer.PropertyTests, Linq.Expression.Optimizer.Tests, tests; 10 commits adding/updating tests in tests/Linq.Expression.Optimizer.Tests; Migrated test suite to xUnit and FsUnit with expanded query coverage.

Dependencies

Linq.Expression.Optimizer version bump to 1.0.34 and multi-targeting expansion

The Linq.Expression.Optimizer library has been updated to version 1.0.34. The project now targets .NET Framework 4.8.1, .NET Standard 2.0, .NET Standard 2.1, .NET 8, and .NET 10, requiring FSharp.Core version 8.0.301 or higher. The assembly metadata and build configuration have been updated to reflect these changes, including the removal of legacy binding redirects in favor of the new framework-specific dependencies.

src/Linq.Expression.Optimizer · high confidence

Migrated build system from Paket/FAKE 5 to .NET SDK/FAKE 6

The project's build infrastructure has been upgraded from the legacy Paket bootstrapper and FAKE 5 to the modern .NET SDK tooling and FAKE 6. This change replaces the manual Paket restore and FAKE execution steps in \build.cmd\ and \build.sh\ with \dotnet tool restore\ and \dotnet fake run\. The \build.fsx\ script has been rewritten to use FAKE 6's functional API (e.g., \Target.create\, \DotNet.build\) and references FAKE 6.1.4 packages, while the solution file has been updated to target Visual Studio 17. This migration simplifies the build process by leveraging the .NET CLI and removes the dependency on the Paket bootstrapper.

(repo-wide) · high confidence

Updated .NET targets and F\# dependencies

The Linq.Expression.Optimizer project now targets netstandard2.0, netstandard2.1, net8.0, and net10.0, replacing older frameworks. FSharp.Core has been upgraded to version 8.0.301, and the build system now includes FSharp.NET.Sdk and FSharp.Compiler.Tools. The test suite has migrated from NUnit to xUnit, adding FsCheck.Xunit, FsUnit.xUnit, and BenchmarkDotNet for performance testing.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 58 → 58 (+0.8)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 52 → 53 (+0.4)
  • Architecture 97 → 96 (-1.0)
  • Maturity 50 → 50 (+0.4)
  • Readiness 54 → 61 (+6.2)
  • Security 98 → 97 (-0.8)
  • Performance 94 → 90 (-4.3)

Resolved (18)

  • Duplicated block (12 lines × 2) (src/Code/ExpressionOptimizer.fs)
  • Duplicated block (13 lines × 2) (src/Code/ExpressionOptimizer.fs)
  • Duplicated block (5 lines × 2) (src/Code/ExpressionOptimizer.fs)
  • Duplicated block (5 lines × 2) (src/Code/ExpressionOptimizer.fs)
  • Duplicated block (6 lines × 2) (src/Code/ExpressionOptimizer.fs)
  • Duplicated block (6 lines × 2) (src/Code/ExpressionOptimizer.fs)
  • Flaky test: Linq.Expression.Optimizer.PropertyTests::Linq.Expression.Optimizer.PropertyTests.OptimizerProperties.Linq.Expression.Optimizer.PropertyTests.OptimizerProperties.the optimized tree is never larger
  • Flaky test: Linq.Expression.Optimizer.PropertyTests::Linq.Expression.Optimizer.PropertyTests.OptimizerProperties.Linq.Expression.Optimizer.PropertyTests.OptimizerProperties.the optimized tree is the same function as the original
  • IL efficiency: 20 authored method(s) exceed the IL budget (src/Code/ExpressionOptimizer.fs)
  • Methods.evaluate basic constant math (cognitive 155) (src/Code/ExpressionOptimizer.fs)
  • Methods.evaluate basic constant math (cyclomatic 305) (src/Code/ExpressionOptimizer.fs)
  • Methods.remove duplicate condition (cognitive 39) (src/Code/ExpressionOptimizer.fs)
  • Methods.remove duplicate condition (cyclomatic 105) (src/Code/ExpressionOptimizer.fs)
  • Outdated: BenchmarkDotNet
  • Outdated: FSharp.Core
  • Outdated: FsUnit.xUnit (tests/Linq.Expression.Optimizer.Tests/Linq.Expression.Optimizer.Tests.fsproj)
  • Outdated: coverlet.collector (tests/Linq.Expression.Optimizer.Tests/Linq.Expression.Optimizer.Tests.fsproj)
  • Outdated: xunit

New (10)

  • Duplicated block (31–32 lines × 2) (src/Code/ExpressionOptimizer.fs)
  • ExpressionOptimizer.visitWith (cognitive 18) (src/Code/ExpressionOptimizer.fs)
  • Methods.basicConstantMath (cognitive 121) (src/Code/ExpressionOptimizer.fs)
  • Methods.basicConstantMath (cyclomatic 171) (src/Code/ExpressionOptimizer.fs)
  • Methods.dropComparison (cognitive 18) (src/Code/ExpressionOptimizer.fs)
  • Methods.integralOp (cognitive 28) (src/Code/ExpressionOptimizer.fs)
  • Methods.integralOp (cyclomatic 19) (src/Code/ExpressionOptimizer.fs)
  • Methods.readsOnly (cyclomatic 18) (src/Code/ExpressionOptimizer.fs)
  • Outdated: FSharp.Core (src/Linq.Expression.Optimizer.standard/Linq.Expression.Optimizer.standard.fsproj)
  • Outdated: FsUnit.xUnit

Changes since last survey

  • 3 commits — 2 feature/other, 1 fixes

By area

  • (root) — 2 commits
  • (repo) — 1 commit

Notable commits

  • fix: DateOny/TimeOnly fix
  • change: Merge pull request #25 from Thorium/cache-and-min
  • change: Some caching and minor edge-case tweaks

Architecture

  • Unchanged — 0 containers · 2 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Thorium/Linq.Expression.Optimizer was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit b6932ea8c9d5d134c9d39fa235743145a5609134 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.