egglog 10.0.2__cp310-cp310-win_amd64.whl → 11.0.0__cp310-cp310-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of egglog might be problematic. Click here for more details.

egglog/__init__.py CHANGED
@@ -5,7 +5,9 @@ Package for creating e-graphs in Python.
5
5
  from . import config, ipython_magic # noqa: F401
6
6
  from .bindings import EggSmolError # noqa: F401
7
7
  from .builtins import * # noqa: UP029
8
- from .conversion import ConvertError, convert, converter, get_type_args # noqa: F401
8
+ from .conversion import *
9
+ from .deconstruct import *
9
10
  from .egraph import *
11
+ from .runtime import define_expr_method as define_expr_method
10
12
 
11
13
  del ipython_magic
Binary file
egglog/bindings.pyi CHANGED
@@ -43,7 +43,6 @@ __all__ = [
43
43
  "PrintSize",
44
44
  "Push",
45
45
  "PyObjectSort",
46
- "QueryExtract",
47
46
  "Relation",
48
47
  "Repeat",
49
48
  "Rewrite",
@@ -61,7 +60,6 @@ __all__ = [
61
60
  "SerializedEGraph",
62
61
  "Set",
63
62
  "SetOption",
64
- "Simplify",
65
63
  "Sort",
66
64
  "SrcFile",
67
65
  "String",
@@ -74,6 +72,7 @@ __all__ = [
74
72
  "Union",
75
73
  "Unit",
76
74
  "UnstableCombinedRuleset",
75
+ "UserDefined",
77
76
  "Var",
78
77
  "Variant",
79
78
  "Variants",
@@ -309,14 +308,7 @@ class Expr_: # noqa: N801
309
308
  span: _Span
310
309
  expr: _Expr
311
310
 
312
- @final
313
- class Extract:
314
- def __init__(self, span: _Span, expr: _Expr, variants: _Expr) -> None: ...
315
- span: _Span
316
- expr: _Expr
317
- variants: _Expr
318
-
319
- _Action: TypeAlias = Let | Set | Change | Union | Panic | Expr_ | Extract
311
+ _Action: TypeAlias = Let | Set | Change | Union | Panic | Expr_
320
312
 
321
313
  ##
322
314
  # Other Structs
@@ -367,22 +359,20 @@ class IdentSort:
367
359
  @final
368
360
  class RunReport:
369
361
  updated: bool
370
- search_time_per_rule: dict[str, timedelta]
371
- apply_time_per_rule: dict[str, timedelta]
372
- search_time_per_ruleset: dict[str, timedelta]
373
- apply_time_per_ruleset: dict[str, timedelta]
374
- rebuild_time_per_ruleset: dict[str, timedelta]
362
+ search_and_apply_time_per_rule: dict[str, timedelta]
375
363
  num_matches_per_rule: dict[str, int]
364
+ search_and_apply_time_per_ruleset: dict[str, timedelta]
365
+ merge_time_per_ruleset: dict[str, timedelta]
366
+ rebuild_time_per_ruleset: dict[str, timedelta]
376
367
 
377
368
  def __init__(
378
369
  self,
379
370
  updated: bool,
380
- search_time_per_rule: dict[str, timedelta],
381
- apply_time_per_rule: dict[str, timedelta],
382
- search_time_per_ruleset: dict[str, timedelta],
383
- apply_time_per_ruleset: dict[str, timedelta],
384
- rebuild_time_per_ruleset: dict[str, timedelta],
371
+ search_and_apply_time_per_rule: dict[str, timedelta],
385
372
  num_matches_per_rule: dict[str, int],
373
+ search_and_apply_time_per_ruleset: dict[str, timedelta],
374
+ merge_time_per_ruleset: dict[str, timedelta],
375
+ rebuild_time_per_ruleset: dict[str, timedelta],
386
376
  ) -> None: ...
387
377
 
388
378
  @final
@@ -488,8 +478,9 @@ class Function:
488
478
 
489
479
  @final
490
480
  class AddRuleset:
481
+ span: _Span
491
482
  name: str
492
- def __init__(self, name: str) -> None: ...
483
+ def __init__(self, span: _Span, name: str) -> None: ...
493
484
 
494
485
  @final
495
486
  class RuleCommand:
@@ -524,18 +515,11 @@ class RunSchedule:
524
515
  def __init__(self, schedule: _Schedule) -> None: ...
525
516
 
526
517
  @final
527
- class Simplify:
528
- span: _Span
529
- expr: _Expr
530
- schedule: _Schedule
531
- def __init__(self, span: _Span, expr: _Expr, schedule: _Schedule) -> None: ...
532
-
533
- @final
534
- class QueryExtract:
518
+ class Extract:
535
519
  span: _Span
536
- variants: int
537
520
  expr: _Expr
538
- def __init__(self, span: _Span, variants: int, expr: _Expr) -> None: ...
521
+ variants: _Expr
522
+ def __init__(self, span: _Span, expr: _Expr, variants: _Expr) -> None: ...
539
523
 
540
524
  @final
541
525
  class Check:
@@ -614,11 +598,19 @@ class Constructor:
614
598
  class PrintOverallStatistics:
615
599
  def __init__(self) -> None: ...
616
600
 
601
+ @final
602
+ class UserDefined:
603
+ span: _Span
604
+ name: str
605
+ args: list[_Expr]
606
+ def __init__(self, span: _Span, name: str, args: list[_Expr]) -> None: ...
607
+
617
608
  @final
618
609
  class UnstableCombinedRuleset:
610
+ span: _Span
619
611
  name: str
620
612
  rulesets: list[str]
621
- def __init__(self, name: str, rulesets: list[str]) -> None: ...
613
+ def __init__(self, span: _Span, name: str, rulesets: list[str]) -> None: ...
622
614
 
623
615
  _Command: TypeAlias = (
624
616
  SetOption
@@ -632,8 +624,7 @@ _Command: TypeAlias = (
632
624
  | BiRewriteCommand
633
625
  | ActionCommand
634
626
  | RunSchedule
635
- | Simplify
636
- | QueryExtract
627
+ | Extract
637
628
  | Check
638
629
  | PrintFunction
639
630
  | PrintSize
@@ -647,6 +638,7 @@ _Command: TypeAlias = (
647
638
  | PrintOverallStatistics
648
639
  | UnstableCombinedRuleset
649
640
  | Constructor
641
+ | UserDefined
650
642
  )
651
643
 
652
644
  ##