Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

This PR improves static analysis compatibility by adding JET.jl tests and fixing several issues identified during JET analysis.

Changes

JET.jl Integration:

  • Add JET.jl as a test dependency
  • Add JET static analysis tests for algorithm constructors (CVODE_BDF, CVODE_Adams, IDA, ARKODE, KINSOL)
  • Tests verify that constructors have no JET reports

Bug Fixes (addressing JET warnings):

  • Add getindex method for UserFunctionAndData to support userfun[] syntax used in kinsolfun
  • Add else error branch in cvode! for unrecognized integrator type (was undefined variable)
  • Add else error branch in CVODE __init for unrecognized algorithm type (was undefined variable)
  • Add else error branch in KINSOL solve for unsupported function types (was undefined variable)

JET Issues Addressed

The following JET reports are now handled:

  1. MethodErrorReport for getindex(::UserFunctionAndData)
  2. UndefVarErrorReport for mem_ptr in cvode! with unknown integrator
  3. UndefVarErrorReport for alg_code in __init with unknown algorithm
  4. UndefVarErrorReport for f! with unsupported function types

Test Results

All tests pass including the new JET tests:

Test Summary:       | Pass  Total
JET Static Analysis |    5      5

Test plan

  • Run Pkg.test() to verify all existing tests pass
  • Verify JET tests pass for algorithm constructors
  • Verify no regressions in existing functionality

cc @ChrisRackauckas

🤖 Generated with Claude Code

Changes:
- Add JET.jl to test dependencies with tests for algorithm constructors
- Add getindex method for UserFunctionAndData to support userfun[] syntax
- Add else error branch in cvode! for unrecognized integrator type
- Add else error branch in CVODE __init for unrecognized algorithm type
- Add else error branch in KINSOL solve for unrecognized function types

These changes address several JET.jl static analysis warnings:
- MethodErrorReport for getindex on UserFunctionAndData
- UndefVarErrorReport for mem_ptr in cvode! with unknown integrator
- UndefVarErrorReport for alg_code in __init with unknown algorithm
- UndefVarErrorReport for f! with unsupported function types

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit b16c9ec into SciML:master Dec 29, 2025
6 of 9 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.

2 participants