Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

  • Add Real type annotations to the λ parameter in all functions (pois_rand, count_rand, ad_rand, procf) for better static analysis compatibility
  • Add JET.jl as a test dependency with broad version compat (0.9-0.11)
  • Add JET static analysis tests using @test_opt and @test_call macros to verify type stability and catch potential runtime errors

Details

Type Annotations Added

The λ parameter was previously untyped duck-typing. Since the functions require numeric operations (sqrt, floor, comparisons, etc.), adding Real as a type annotation:

  1. Makes the API contract explicit
  2. Helps JET and Julia's compiler with static analysis
  3. Catches type errors at compile time rather than runtime

JET Tests

Added two test sets in test/qa.jl:

  1. Type stability tests (@test_opt) - Verify no type instabilities in the core functions
  2. Error analysis tests (@test_call) - Verify no potential runtime errors

All JET analysis passes with zero reports, confirming the package is type-stable.

Test plan

  • Run Pkg.test() - All tests pass
  • Run JET analysis manually - Zero reports
  • Verify existing functionality with different numeric types (Float64, Int, Float32)

CC @ChrisRackauckas

🤖 Generated with Claude Code

- Add Real type annotations to λ parameter in all functions (pois_rand,
  count_rand, ad_rand, procf) for better static analysis compatibility
- Add JET.jl as a test dependency with broad version compat (0.9-0.11)
- Add JET static analysis tests using @test_opt and @test_call macros
  to verify type stability and catch potential runtime errors

All JET analysis passes with zero reports, confirming the package is
type-stable and ready for Julia's compilation improvements.

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

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