B0712: APL text whose APL Workbench analysis exceeds its expansion budget
Catalog status: active. Default severity: error. Stable name: workbench-expansion-budget. Family: Syntax and source text.
When the APL Workbench analyses an APL expression, it expands the expression as Verada's lowering does: a local value is substituted at each of its uses. An analysis admits at most 200,000 generated expressions (2,000,000 syntax fields) before type checking. A local value whose uses double at each step grows past that quickly, and the workbench refuses the expression. Compiling, checking and proving the program do not apply this budget.
Example (Vada)
pragma Extensions_Allowed (On);
procedure Main is
X : Integer := 1;
R : Integer := APL ("V0 ← X ⋄ V1 ← V0 + V0 ⋄ V2 ← V1 + V1 ⋄ ... ⋄ V20 ← V19 + V19 ⋄ V20");
begin
null;
end Main;V20 stands for X added to itself over a million times once each name is substituted.
What to do
Use the workbench on a smaller expression, or edit this one as text in the source editor; ordinary compilation does not apply this budget.
Regression source and further reading
See syntax and source text, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.