This repository was archived by the owner on Jan 7, 2025. It is now read-only.
Commit d732a10
authored
Fix: fix for heuristic rule wrapper (#147)
The new expr returned by heuristic rules are not in the original group,
which means it never got an OptimizeExpressionTask with exploring as
false (OptimizeExpressionTask with exploring=False only be called in
OptimizeGroup), it should evoke an OptimizeExpressionTask with
exploring=false for itself to apply all the transform rules and
implementation rules for itself.
Besides, the pr adds checks for whether the original expr equals to the
output expr for heuristic rule. If that's the case, it should prompt an
error as this breaks the heuristic rule's definition. (Silently
accepting it will mark the input expr being as a dead end and there's no
more new exprs to replace it)
Signed-off-by: AveryQi115 <averyqi115@gmail.com>1 parent e35d508 commit d732a10
2 files changed
+16
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
290 | 299 | | |
291 | 300 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | 301 | | |
296 | 302 | | |
297 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
0 commit comments