From 947ea218c54cd12f64320f6207fc8da83f7a8c43 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Wed, 8 Oct 2025 21:42:05 +0200 Subject: Complete occCountX --- src/AST.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/AST.hs') diff --git a/src/AST.hs b/src/AST.hs index b8bee1b..a10f1ae 100644 --- a/src/AST.hs +++ b/src/AST.hs @@ -82,6 +82,9 @@ data Expr x env t where -- be backpropagated to; 'a' is the inactive part. The dual field of -- ECustom does not allow a derivative to be generated for 'a', and hence -- none is propagated. + -- No accumulators are allowed inside a, b and tape. This restriction is + -- currently not used very much, so could be relaxed in the future; be sure + -- to check this requirement whenever it is necessary for soundness! ECustom :: x t -> STy a -> STy b -> STy tape -> Expr x [b, a] t -- ^ regular operation -> Expr x [D1 b, D1 a] (TPair (D1 t) tape) -- ^ CHAD forward pass -- cgit v1.2.3-70-g09d2