-
Notifications
You must be signed in to change notification settings - Fork 3
Add fast-fail detection for formula generation with excessive initial terms #593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
|
@copilot The max number of initial terms should remain at 10. We should continue to reject this program. However, it would be great if the formula generation could fail fast in such cases (it takes too long). |
…erms Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
Reverted maxInitialTerms to 10 and added early failure detection instead. The program now rejects A000033 but fails fast in ~0.08s instead of ~37s. The check triggers before the expensive variant simplification when base initial terms exceed 70% of the limit (commit b5a3f15). |
|
@copilot Revert the additional check for intial terms. Instead, impose stronger limits in |
…variant simplification Co-authored-by: ckrause <840744+ckrause@users.noreply.github.com>
Reverted the early check and instead imposed tighter limits in |
Improve formula generation performance by imposing tighter limits on variant simplification
Changes
Per feedback, reverted the early check for initial terms and instead imposed tighter limits in
simplifyFormulaUsingVariants():src/form/variant.cpp:src/form/formula_gen.cpp: Reverted to original state (removed early check)CHANGELOG.md: Updated to reflect the changePerformance Results
The formula generation is still allowed to reject programs if they exceed the initial terms limit (10), but now the variant simplification phase itself is bounded to prevent excessive runtime.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.