Breaking change migration: CTParser v0.8.1 → v0.8.2-beta#208
Conversation
…lgebra support
Refactored test/exa_linalg.jl into a proper Julia module providing trait-based linear algebra extensions for Array{ExaModels.AbstractNode}. Extended operations to include trace, norms, determinant, array addition/subtraction, and diagonal operations. Added comprehensive unit tests in test/test_exa_linalg.jl covering all operation combinations with 164 passing tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… (wrapper based) extensions, all inside test (no pollution of CTParser / external add-on)
Eliminated all 23 method ambiguities by restricting type parameters to Number or AbstractNode types, preventing conflicts with LinearAlgebra, SparseArrays, and other standard library methods. Changes: - Narrowed Scalar × Vector/Matrix operations to use Number instead of Any - Narrowed Vector/Matrix × Scalar operations to use Number instead of Any - Added explicit methods for AbstractNode × AbstractNode cases - Applied same pattern to dot, matrix-vector, matrix-matrix products - Applied same pattern to vector/matrix addition and subtraction - Applied same pattern to adjoint vector × matrix operations All 164 tests pass, zero ambiguities detected. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added 43 new tests verifying all ambiguity fixes work correctly. New testset "Method ambiguity fixes" includes: - Scalar × Vector (both AbstractNode) - Vector × Scalar (both AbstractNode) - Scalar × Matrix (both AbstractNode) - Matrix × Scalar (both AbstractNode) - dot product (both AbstractNode) - Matrix × Vector (both AbstractNode) - the originally reported issue! - Matrix × Matrix (both AbstractNode) - Adjoint Vector × Matrix (both AbstractNode) - Vector + Vector (both AbstractNode) - Vector - Vector (both AbstractNode) - Matrix + Matrix (both AbstractNode) - Matrix - Matrix (both AbstractNode) - Mixed operations (no standard library conflicts) All 207 tests pass (increased from 164). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement optimization rules for operations involving zero values: - Multiplication: 0 * x and x * 0 return Null(0) - Addition: 0 + x and x + 0 return x (identity) - Subtraction: x - 0 returns x (identity) Added helper functions: - is_zero_value(x): detects zeros in Number, Null, and AbstractNode - zero_node(): returns canonical Null(0) Optimized 24 methods: - 12 scalar-vector/matrix multiplication methods - 6 vector/matrix addition methods - 6 vector/matrix subtraction methods Benefits: - Simpler expression trees (fewer Node2 allocations) - Type stability maintained (all return AbstractNode types) - Proper mathematical identities respected All 287 tests passing (added 43 new optimization tests). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace scattered zero checks with unified optimized scalar operations: - Add is_zero/is_one detection using iszero/isone for all numeric types - Use Null(nothing) as canonical zero (per ExaModels graph.jl line 313) - Add Null(1) as canonical one for multiplicative identity - Implement opt_add, opt_sub, opt_mul, opt_sum core operations - Refactor all vector/matrix ops to use these primitives Key optimization: dot([1,0,1,0], [x,y,z,t]) now produces x+z instead of bloated expression tree with unnecessary zero terms. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add sum(::AbstractArray{<:AbstractNode}) wrapper around opt_sum
- Update convert to return zero_node() for zero values (canonical)
- Keep opt_* functions internal (not exported) following Julia best practices
- Import opt_* explicitly in tests for testing internal functions
- Update module documentation to clarify public vs internal API
- Remove exa_linalg_w files (obsolete)
sum([zero_node(), x, zero_node(), y]) now returns x + y directly,
skipping zeros during summation for optimal expression trees.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fixed p_dynamics_exa! to populate dyn_coords when using vector-form dynamics ∂(x)(t) == [e1, e2, ...] - Added comprehensive test suite (400 tests) in test/test_dynamics_exa.jl covering: * All numerical schemes (euler, euler_implicit, midpoint, trapeze) * Both CPU and GPU backends * Basic dynamics, sums, user functions, nonlinear systems * Classic control problems (double integrator, 9D drone) - Registered dynamics_exa test suite in runtests.jl Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- add 9 unit tests for p_dynamics_exa! covering code generation, various expressions, time-dependent dynamics, and vector operations - add 14 tests for ParsingInfo fields (is_global_dyn, is_coord_dyn, dyn_coords) including mutual exclusion and duplicate detection - fix test_onepass_fun objectives to properly test dynamics parsing - all 176 tests pass successfully Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🔧 Breaking Change Setup CompleteSetup report directory: Summary:
Breakage Test Results (2026-01-18):
Migration Path (simplified - 2 phases):
Beta Strategy: Beta versions will be registered in ct-registry (local registry) for faster testing. Next step: Follow the action plan in Setup completed on 2026-01-17 22:19:00 |
✅ Breakage Tests Completed - Fully CompatibleTest Date: 2026-01-18 Results:
Decision: Proceed with CTParser v0.8.2-beta (minor version, not v0.9.0-beta) Migration Path (simplified to 2 phases):
Documentation: Full action plan available in Next step: Execute Phase 1 (widening in OptimalControl) |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Migration PR for CTParser breaking change. See issue #207 for details.
Objectives
Report
See
reports-breaking/2026-01-17-ctparser-0.8.2-beta/in dev-workflows repository.