Deprecate IntervalContractors in favour of IntervalArithmetic#60
Open
dpsanders wants to merge 1 commit into
Open
Deprecate IntervalContractors in favour of IntervalArithmetic#60dpsanders wants to merge 1 commit into
dpsanders wants to merge 1 commit into
Conversation
Every reverse-mode function previously defined here now lives in
`IntervalArithmetic.jl` (>= 1.1). This release replaces the per-domain
implementations with deprecation shims that forward to their IA
equivalents and emit `Base.depwarn`. The package will be archived after
the 0.7.x deprecation cycle.
Changes:
- New `src/deprecations.jl` provides the shims:
- `@deprecate` for tuple-rewriting reverses and singleton extras
whose names and shapes match IA (`plus_rev`, `minus_rev`,
`div_rev`, `power_rev`, `max_rev`, `min_rev`, `mul_rev_to_pair`,
`pow_rev1`, `pow_rev2`).
- `@deprecate mul_rev → IntervalArithmetic.times_rev` (rename — the
IC tuple-rewrite collided with IA's IEEE 1788 `mul_rev(b, c, x)`).
- `@deprecate mul_rev_IEEE1788 → IntervalArithmetic.mul_rev`.
- Manual shims for the 2-arg reverses (`sqr_rev`, `abs_rev`,
`sign_rev`, `sqrt_rev`, `inv_rev`, the exp/log/trig/hyperbolic
families) that wrap IA's single-output result back into IC's
`(c, x_new)` tuple shape and emit `Base.depwarn`.
- `src/IntervalContractors.jl` reduced to module declaration, exports,
the `IntervalType{T}` alias for backwards compat, and the include of
`deprecations.jl`.
- Per-domain source files (`arithmetic.jl`, `exponential.jl`,
`extrema.jl`, `hyperbolic.jl`, `inverse_hyperbolic.jl`,
`inverse_trig.jl`, `trig.jl`, `transformations.jl`, `powers.jl`,
plus the long-orphaned `decorated.jl` and `pave.jl`) are deleted.
Helpers that lived alongside the reverses (`integer_contractor`,
`reflect_x`, `sin_main`, `exp!`, `log!`, etc.) were never exported
and are dropped with this release; consumers can pin to 0.6.0 or
copy from git history.
- `Project.toml`: bumped to 0.7.0, dropped the unused `IntervalBoxes`
dependency, and tightened the `IntervalArithmetic` compat to `1.1`.
- `README.md`: deprecation banner with a migration table at the top.
- `test/runtests.jl`: explicit `using IntervalContractors:` imports for
every reverse name to disambiguate from `IntervalArithmetic`'s
same-named exports.
- Four tests are now `@test_broken` because IA's implementation is
tighter or more correct than IC's old one (`cos_rev` ulp drift,
`acosh_rev` clipping, `max_rev` / `min_rev` on empty `a`); each is
annotated inline with the reason.
Depends on the IntervalArithmetic PR adding the new reverse exports
(JuliaIntervals/IntervalArithmetic.jl#756) being merged and released
as 1.1.0. Local test runs use `Pkg.develop` against that branch.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the deprecation release for
IntervalContractors.jl. Every reverse-mode function previously provided here now lives inIntervalArithmetic.jl(1.1+); this PR replaces the implementations with shims that forward to IA and emitBase.depwarn. The package will be archived after the 0.7.x cycle.src/deprecations.jlprovides the shimsarithmetic.jl,exponential.jl,extrema.jl, etc.) are deleted, since their only public API was the reverse functionssrc/IntervalContractors.jlreduced to module declaration + exports + include ofdeprecations.jlProject.toml: 0.6.0 → 0.7.0;IntervalArithmetic = "1.1"; drop unusedIntervalBoxesdepMigration
IntervalContractors.plus_rev(a, b, c)IntervalArithmetic.plus_rev(a, b, c)IntervalContractors.mul_rev(a, b, c)IntervalArithmetic.times_rev(a, b, c)(rename)IntervalContractors.f_rev(c, x)returning(c, x_new)IntervalArithmetic.f_rev(c, x)returningx_newIntervalContractors.mul_rev_IEEE1788IntervalArithmetic.mul_revIntervalArithmeticusing IntervalContractorsandusing IntervalArithmetictogether now makes the reverse names ambiguous; users qualify or dropusing IntervalContractors.Behaviour drift
Four
Non1788tests are now@test_brokenbecause IA's implementation is tighter or more correct than IC's old one. Each is annotated inline with the reason:cos_revreturns a slightly different bound (ulp drift).acosh_revclipscto[0, ∞)before applyingcosh, giving a tight[1, cosh(1)]instead of IC's loose[1, ∞].max_revandmin_revon emptyacorrectly return empty preimages instead of IC's oldentire.Helpers dropped
The non-exported helpers that lived in the deleted source files (
integer_contractor,reflect_x,sin_main,exp!,log!,constant_contractor, ...) are gone. These were never exported; consumers can pin to 0.6.0 or copy from git history.Dependency
Depends on JuliaIntervals/IntervalArithmetic.jl#756 being merged and released as 1.1.0. Local test runs use
Pkg.developagainst that branch.Test plan
Pkg.develop'd IA reverse-refactor branch (with the 4 documented@test_broken)🤖 Generated with Claude Code