Skip to content

Commit 581b424

Browse files
committed
Bump to 0.24.0-beta: Add Differentiation module and AD backend strategies
- Add Differentiation module with AD backend infrastructure - AbstractADBackend: abstract contract for AD backends with trait-based dispatch - DifferentiationInterface strategy: wraps DifferentiationInterface.jl backends - Hamiltonian gradient computation: hamiltonian_gradient, variable_gradient methods - Generic differentiation methods: gradient, derivative, differentiate, pushforward - ADTypes.jl as hard dependency with AutoForwardDiff as default backend - CTBaseDifferentiationInterface extension for gradient computation - Full test coverage and documentation guide - No breaking changes; purely additive feature
1 parent 4c2b549 commit 581b424

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

BREAKINGS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
This document outlines all breaking changes introduced in CTBase v0.18.0-beta compared to v0.17.4. Use this guide to migrate your code and understand the impact of these changes.
44

5+
## Non-breaking note (0.24.0-beta)
6+
7+
- **Differentiation module**: Added comprehensive AD backend infrastructure for computing gradients
8+
- **AbstractADBackend**: Abstract contract for AD backends with trait-based dispatch
9+
- **DifferentiationInterface strategy**: Concrete strategy wrapping DifferentiationInterface.jl backends (e.g., `AutoForwardDiff()`)
10+
- **Hamiltonian gradient computation**: `hamiltonian_gradient(backend, h, t, x, p, v)` → (∂H/∂x, ∂H/∂p)
11+
- **Variable gradient computation**: `variable_gradient(backend, h, t, x, p, v)` → ∂H/∂v
12+
- **Generic differentiation methods**: `gradient`, `derivative`, `differentiate`, `pushforward` for flexible AD operations
13+
- **ADTypes integration**: Hard dependency on ADTypes.jl with `AutoForwardDiff` as default backend
14+
- **DifferentiationInterface extension**: CTBaseDifferentiationInterface extension for gradient computation
15+
- **Construction defaults**: `__ad_backend` for trait-based backend selection
16+
- **Full test coverage**: Comprehensive test suite for Differentiation module
17+
- **Documentation**: Complete Differentiation module guide in `docs/src/guide/differentiation.md`
18+
- **Migration from CTFlows**: AD backend strategies moved from CTFlows to CTBase for ecosystem-wide sharing
19+
- **Self-contained module**: CTBase.Differentiation depends on CTBase.Data, CTBase.Strategies, CTBase.Exceptions, and ADTypes
20+
- **No breaking changes**: Purely additive feature with backward-compatible API. No migration required.
21+
- **Dependencies**: Added ADTypes.jl as hard dependency and DifferentiationInterface.jl as weak dependency with extension
22+
- **No breaking changes**: Purely additive feature with new dependencies. No migration required.
23+
524
## Non-breaking note (0.23.0-beta)
625

726
- **Data module**: Added comprehensive data structures for vector fields and Hamiltonian systems

CHANGELOGS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,46 @@ All notable changes to CTBase will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.24.0-beta] - 2026-06-25
9+
10+
### ✨ New Features
11+
12+
#### **Differentiation Module**
13+
14+
- **Automatic differentiation backend strategies**: Added comprehensive AD backend infrastructure for computing gradients
15+
- **AbstractADBackend**: Abstract contract for AD backends with trait-based dispatch
16+
- **DifferentiationInterface strategy**: Concrete strategy wrapping DifferentiationInterface.jl backends (e.g., `AutoForwardDiff()`)
17+
- **Hamiltonian gradient computation**: `hamiltonian_gradient(backend, h, t, x, p, v)` → (∂H/∂x, ∂H/∂p)
18+
- **Variable gradient computation**: `variable_gradient(backend, h, t, x, p, v)` → ∂H/∂v
19+
- **Generic differentiation methods**: `gradient`, `derivative`, `differentiate`, `pushforward` for flexible AD operations
20+
- **ADTypes integration**: Hard dependency on ADTypes.jl with `AutoForwardDiff` as default backend
21+
- **DifferentiationInterface extension**: CTBaseDifferentiationInterface extension for gradient computation
22+
- **Construction defaults**: `__ad_backend` for trait-based backend selection
23+
- **Full test coverage**: Added comprehensive test suite for Differentiation module
24+
- **Documentation**: Added `docs/src/guide/differentiation.md` with complete Differentiation module guide
25+
- **Migration from CTFlows**: AD backend strategies moved from CTFlows to CTBase.Differentiation for ecosystem-wide sharing
26+
- **Self-contained module**: CTBase.Differentiation depends on CTBase.Data, CTBase.Strategies, CTBase.Exceptions, and ADTypes
27+
- **No breaking changes**: Purely additive feature with backward-compatible API. No migration required.
28+
29+
### 🔄 Dependencies
30+
31+
- **ADTypes.jl**: Added as hard dependency for AD backend type definitions
32+
- **DifferentiationInterface.jl**: Added as weak dependency with extension support
33+
34+
### 🏗️ Architecture
35+
36+
- **Shared AD infrastructure**: Moved AD backend strategies from CTFlows to CTBase.Differentiation
37+
- Enables automatic differentiation across control-toolbox packages without duplication
38+
- Provides abstract contract for AD backends with trait-based dispatch
39+
- Supports multiple AD backends through strategy pattern
40+
- Integrates with CTBase.Strategies for solver configuration
41+
42+
### 🧹 Maintenance
43+
44+
- **Documentation refinement**: Refined Differentiation docstrings and guide synchronization
45+
- **Test coverage**: Added gradient/derivative tests for DifferentiationInterface extension
46+
- **Version bump**: Bumped to 0.24.0-beta for Differentiation module addition.
47+
848
## [0.23.0-beta] - 2026-06-25
949

1050
### ✨ New Features

0 commit comments

Comments
 (0)