@@ -33,17 +33,21 @@ __all__ = [
3333 "Float" ,
3434 "Function" ,
3535 "FunctionCommand" ,
36+ "FusedIntersect" ,
3637 "IdentSort" ,
3738 "Include" ,
3839 "Input" ,
3940 "Int" ,
41+ "Intersect" ,
42+ "IterationReport" ,
4043 "Let" ,
4144 "Lit" ,
4245 "NewSort" ,
4346 "Output" ,
4447 "OverallStatistics" ,
4548 "Panic" ,
4649 "PanicSpan" ,
50+ "Plan" ,
4751 "Pop" ,
4852 "PrintAllFunctionsSize" ,
4953 "PrintFunction" ,
@@ -58,26 +62,33 @@ __all__ = [
5862 "RewriteCommand" ,
5963 "Rule" ,
6064 "RuleCommand" ,
65+ "RuleReport" ,
66+ "RuleSetReport" ,
6167 "Run" ,
6268 "RunConfig" ,
6369 "RunReport" ,
6470 "RunSchedule" ,
6571 "RunScheduleOutput" ,
6672 "RustSpan" ,
6773 "Saturate" ,
74+ "Scan" ,
6875 "Schema" ,
6976 "Sequence" ,
7077 "SerializedEGraph" ,
7178 "Set" ,
79+ "SingleScan" ,
7280 "Sort" ,
7381 "SrcFile" ,
82+ "StageInfo" ,
83+ "StageStats" ,
7484 "String" ,
7585 "SubVariants" ,
7686 "Subsume" ,
7787 "TermApp" ,
7888 "TermDag" ,
7989 "TermLit" ,
8090 "TermVar" ,
91+ "TimeOnly" ,
8192 "Union" ,
8293 "Unit" ,
8394 "UnstableCombinedRuleset" ,
@@ -87,6 +98,7 @@ __all__ = [
8798 "Value" ,
8899 "Var" ,
89100 "Variant" ,
101+ "WithPlan" ,
90102]
91103
92104@final
@@ -118,6 +130,7 @@ class EGraph:
118130 max_calls_per_function : int | None = None ,
119131 include_temporary_functions : bool = False ,
120132 ) -> SerializedEGraph : ...
133+ def set_report_level (self , level : _ReportLevel ) -> None : ...
121134 def lookup_function (self , name : str , key : list [Value ]) -> Value | None : ...
122135 def eval_expr (self , expr : _Expr ) -> tuple [str , Value ]: ...
123136 def value_to_i64 (self , v : Value ) -> int : ...
@@ -389,12 +402,99 @@ class IdentSort:
389402@final
390403class UserDefinedCommandOutput : ...
391404
405+ @final
406+ class SingleScan :
407+ atom : str
408+ column : tuple [str , int ]
409+
410+ def __new__ (cls , atom : str , column : tuple [str , int ]) -> SingleScan : ...
411+
412+ @final
413+ class Scan :
414+ atom : str
415+ columns : list [tuple [str , int ]]
416+
417+ def __new__ (cls , atom : str , columns : list [tuple [str , int ]]) -> Scan : ...
418+
419+ @final
420+ class StageStats :
421+ num_candidates : int
422+ num_succeeded : int
423+
424+ def __new__ (cls , num_candidates : int , num_succeeded : int ) -> StageStats : ...
425+
426+ @final
427+ class TimeOnly :
428+ def __new__ (cls ) -> TimeOnly : ...
429+
430+ @final
431+ class WithPlan :
432+ def __new__ (cls ) -> WithPlan : ...
433+
434+ @final
435+ class StageInfo :
436+ def __new__ (cls ) -> StageInfo : ...
437+
438+ _ReportLevel : TypeAlias = TimeOnly | WithPlan | StageInfo
439+
440+ @final
441+ class Intersect :
442+ scans : list [SingleScan ]
443+
444+ def __new__ (cls , scans : list [SingleScan ]) -> Intersect : ...
445+
446+ @final
447+ class FusedIntersect :
448+ cover : Scan
449+ to_intersect : list [Scan ]
450+
451+ def __new__ (cls , cover : Scan , to_intersect : list [Scan ]) -> FusedIntersect : ...
452+
453+ _Stage : TypeAlias = Intersect | FusedIntersect
454+
455+ @final
456+ class Plan :
457+ stages : list [tuple [_Stage , StageStats | None , list [int ]]]
458+
459+ def __new__ (cls , stages : list [tuple [_Stage , StageStats | None , list [int ]]]) -> Plan : ...
460+
461+ @final
462+ class RuleReport :
463+ plan : Plan | None
464+ search_and_apply_time : timedelta
465+ num_matches : int
466+
467+ def __new__ (cls , plan : Plan | None , search_and_apply_time : timedelta , num_matches : int ) -> RuleReport : ...
468+
469+ @final
470+ class RuleSetReport :
471+ changed : bool
472+ rule_reports : dict [str , list [RuleReport ]]
473+ search_and_apply_time : timedelta
474+ merge_time : timedelta
475+
476+ def __new__ (
477+ cls ,
478+ changed : bool ,
479+ rule_reports : dict [str , list [RuleReport ]],
480+ search_and_apply_time : timedelta ,
481+ merge_time : timedelta ,
482+ ) -> RuleSetReport : ...
483+
484+ @final
485+ class IterationReport :
486+ rule_set_report : RuleSetReport
487+ rebuild_time : timedelta
488+
489+ def __new__ (cls , rule_set_report : RuleSetReport , rebuild_time : timedelta ) -> IterationReport : ...
490+
392491@final
393492class Function :
394493 name : str
395494
396495@final
397496class RunReport :
497+ iterations : list [IterationReport ]
398498 updated : bool
399499 search_and_apply_time_per_rule : dict [str , timedelta ]
400500 num_matches_per_rule : dict [str , int ]
@@ -404,6 +504,7 @@ class RunReport:
404504
405505 def __new__ (
406506 cls ,
507+ iterations : list [IterationReport ],
407508 updated : bool ,
408509 search_and_apply_time_per_rule : dict [str , timedelta ],
409510 num_matches_per_rule : dict [str , int ],
@@ -688,7 +789,11 @@ class Constructor:
688789 def __new__ (cls , span : _Span , name : str , schema : Schema , cost : int | None , unextractable : bool ) -> Constructor : ...
689790
690791@final
691- class PrintOverallStatistics : ...
792+ class PrintOverallStatistics :
793+ span : _Span
794+ file : str | None
795+
796+ def __new__ (cls , span : _Span , file : str | None ) -> PrintOverallStatistics : ...
692797
693798@final
694799class UserDefined :
0 commit comments