egglog 10.0.0__cp311-cp311-win_amd64.whl → 10.0.2__cp311-cp311-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.

Binary file
egglog/builtins.py CHANGED
@@ -5,10 +5,11 @@ Builtin sorts and function to egg.
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
+ from collections.abc import Callable
8
9
  from fractions import Fraction
9
10
  from functools import partial, reduce
10
11
  from types import FunctionType, MethodType
11
- from typing import TYPE_CHECKING, Generic, Protocol, TypeAlias, TypeVar, Union, cast, overload
12
+ from typing import TYPE_CHECKING, Generic, Protocol, TypeAlias, TypeVar, cast, overload
12
13
 
13
14
  from typing_extensions import TypeVarTuple, Unpack
14
15
 
@@ -20,7 +21,7 @@ from .runtime import RuntimeClass, RuntimeExpr, RuntimeFunction
20
21
  from .thunk import Thunk
21
22
 
22
23
  if TYPE_CHECKING:
23
- from collections.abc import Callable, Iterator
24
+ from collections.abc import Iterator
24
25
 
25
26
 
26
27
  __all__ = [
@@ -100,8 +101,6 @@ def join(*strings: StringLike) -> String: ...
100
101
 
101
102
  converter(str, String, String)
102
103
 
103
- BoolLike: TypeAlias = Union["Bool", bool]
104
-
105
104
 
106
105
  class Bool(BuiltinExpr, egg_sort="bool"):
107
106
  @method(preserve=True)
@@ -132,10 +131,10 @@ class Bool(BuiltinExpr, egg_sort="bool"):
132
131
  def implies(self, other: BoolLike) -> Bool: ...
133
132
 
134
133
 
135
- converter(bool, Bool, Bool)
134
+ BoolLike: TypeAlias = Bool | bool
136
135
 
137
- # The types which can be convertered into an i64
138
- i64Like: TypeAlias = Union["i64", int] # noqa: N816, PYI042
136
+
137
+ converter(bool, Bool, Bool)
139
138
 
140
139
 
141
140
  class i64(BuiltinExpr): # noqa: N801
@@ -247,6 +246,9 @@ class i64(BuiltinExpr): # noqa: N801
247
246
  def bool_ge(self, other: i64Like) -> Bool: ...
248
247
 
249
248
 
249
+ # The types which can be convertered into an i64
250
+ i64Like: TypeAlias = i64 | int # noqa: N816, PYI042
251
+
250
252
  converter(int, i64, i64)
251
253
 
252
254
 
@@ -254,9 +256,6 @@ converter(int, i64, i64)
254
256
  def count_matches(s: StringLike, pattern: StringLike) -> i64: ...
255
257
 
256
258
 
257
- f64Like: TypeAlias = Union["f64", float] # noqa: N816, PYI042
258
-
259
-
260
259
  class f64(BuiltinExpr): # noqa: N801
261
260
  @method(preserve=True)
262
261
  def eval(self) -> float:
@@ -336,6 +335,9 @@ class f64(BuiltinExpr): # noqa: N801
336
335
  def to_string(self) -> String: ...
337
336
 
338
337
 
338
+ f64Like: TypeAlias = f64 | float # noqa: N816, PYI042
339
+
340
+
339
341
  converter(float, f64, f64)
340
342
 
341
343
 
egglog/declarations.py CHANGED
@@ -93,7 +93,7 @@ class DelayedDeclerations:
93
93
  # Catch attribute error, so that it isn't bubbled up as a missing attribute and fallbacks on `__getattr__`
94
94
  # instead raise explicitly
95
95
  except AttributeError as err:
96
- msg = f"Cannot resolve declerations for {self}"
96
+ msg = f"Cannot resolve declarations for {self}"
97
97
  raise RuntimeError(msg) from err
98
98
 
99
99
 
@@ -308,11 +308,11 @@ class ClassTypeVarRef:
308
308
  module: str
309
309
 
310
310
  def to_just(self) -> JustTypeRef:
311
- msg = "egglog does not support generic classes yet."
311
+ msg = f"{self}: egglog does not support generic classes yet."
312
312
  raise NotImplementedError(msg)
313
313
 
314
314
  def __str__(self) -> str:
315
- return f"{self.module}.{self.name}"
315
+ return str(self.to_type_var())
316
316
 
317
317
  @classmethod
318
318
  def from_type_var(cls, typevar: TypeVar) -> ClassTypeVarRef:
egglog/egraph.py CHANGED
@@ -16,7 +16,6 @@ from typing import (
16
16
  ClassVar,
17
17
  Generic,
18
18
  Literal,
19
- Never,
20
19
  TypeAlias,
21
20
  TypedDict,
22
21
  TypeVar,
@@ -26,7 +25,7 @@ from typing import (
26
25
  )
27
26
 
28
27
  import graphviz
29
- from typing_extensions import ParamSpec, Self, Unpack, assert_never
28
+ from typing_extensions import Never, ParamSpec, Self, Unpack, assert_never
30
29
 
31
30
  from . import bindings
32
31
  from .conversion import *
@@ -36,6 +35,7 @@ from .ipython_magic import IN_IPYTHON
36
35
  from .pretty import pretty_decl
37
36
  from .runtime import *
38
37
  from .thunk import *
38
+ from .version_compat import *
39
39
 
40
40
  if TYPE_CHECKING:
41
41
  from .builtins import String, Unit
@@ -169,8 +169,9 @@ def check_eq(x: BASE_EXPR, y: BASE_EXPR, schedule: Schedule | None = None, *, ad
169
169
  except bindings.EggSmolError as err:
170
170
  if display:
171
171
  egraph.display()
172
- err.add_note(f"Failed:\n{eq(x).to(y)}\n\nExtracted:\n {eq(egraph.extract(x)).to(egraph.extract(y))})")
173
- raise
172
+ raise add_note(
173
+ f"Failed:\n{eq(x).to(y)}\n\nExtracted:\n {eq(egraph.extract(x)).to(egraph.extract(y))})", err
174
+ ) from None
174
175
  return egraph
175
176
 
176
177
 
@@ -492,8 +493,7 @@ def _generate_class_decls( # noqa: C901,PLR0912
492
493
  reverse_args=reverse_args,
493
494
  )
494
495
  except Exception as e:
495
- e.add_note(f"Error processing {cls_name}.{method_name}")
496
- raise
496
+ raise add_note(f"Error processing {cls_name}.{method_name}", e) from None
497
497
 
498
498
  if not builtin and not isinstance(ref, InitRef) and not mutates:
499
499
  add_default_funcs.append(add_rewrite)
@@ -569,16 +569,11 @@ def _fn_decl(
569
569
  if not isinstance(fn, FunctionType):
570
570
  raise NotImplementedError(f"Can only generate function decls for functions not {fn} {type(fn)}")
571
571
 
572
- hint_globals = fn.__globals__.copy()
573
- # Copy Callable into global if not present bc sometimes it gets automatically removed by ruff to type only block
574
- # https://docs.astral.sh/ruff/rules/typing-only-standard-library-import/
575
- if "Callable" not in hint_globals:
576
- hint_globals["Callable"] = Callable
577
572
  # Instead of passing both globals and locals, just pass the globals. Otherwise, for some reason forward references
578
573
  # won't be resolved correctly
579
574
  # We need this to be false so it returns "__forward_value__" https://github.com/python/cpython/blob/440ed18e08887b958ad50db1b823e692a747b671/Lib/typing.py#L919
580
575
  # https://github.com/egraphs-good/egglog-python/issues/210
581
- hint_globals.update(hint_locals)
576
+ hint_globals = {**fn.__globals__, **hint_locals}
582
577
  hints = get_type_hints(fn, hint_globals)
583
578
 
584
579
  params = list(signature(fn).parameters.values())
@@ -632,7 +627,7 @@ def _fn_decl(
632
627
  )
633
628
  decls |= merged
634
629
 
635
- # defer this in generator so it doesnt resolve for builtins eagerly
630
+ # defer this in generator so it doesn't resolve for builtins eagerly
636
631
  args = (TypedExprDecl(tp.to_just(), VarDecl(name, False)) for name, tp in zip(arg_names, arg_types, strict=True))
637
632
  res_ref: FunctionRef | MethodRef | ClassMethodRef | PropertyRef | InitRef | UnnamedFunctionRef
638
633
  res_thunk: Callable[[], object]
@@ -676,7 +671,7 @@ def _fn_decl(
676
671
  )
677
672
  res_ref = ref
678
673
  decls.set_function_decl(ref, decl)
679
- res_thunk = Thunk.fn(_create_default_value, decls, ref, fn, args, ruleset)
674
+ res_thunk = Thunk.fn(_create_default_value, decls, ref, fn, args, ruleset, context=f"creating {ref}")
680
675
  return res_ref, Thunk.fn(_add_default_rewrite_function, decls, res_ref, return_type, ruleset, res_thunk, subsume)
681
676
 
682
677
 
@@ -1045,8 +1040,7 @@ class EGraph:
1045
1040
  bindings.ActionCommand(bindings.Extract(span(2), expr, bindings.Lit(span(2), bindings.Int(n))))
1046
1041
  )
1047
1042
  except BaseException as e:
1048
- e.add_note("Extracting: " + str(expr))
1049
- raise
1043
+ raise add_note("Extracting: " + str(expr), e) # noqa: B904
1050
1044
  extract_report = self._egraph.extract_report()
1051
1045
  if not extract_report:
1052
1046
  msg = "No extract report saved"
@@ -1817,12 +1811,13 @@ def _rewrite_or_rule_generator(gen: RewriteOrRuleGenerator, frame: FrameType) ->
1817
1811
  """
1818
1812
  Returns a thunk which will call the function with variables of the type and name of the arguments.
1819
1813
  """
1820
- # Get the local scope from where the function is defined, so that we can get any type hints that are in the scope
1821
- # but not in the globals
1822
- globals = gen.__globals__.copy()
1823
- if "Callable" not in globals:
1824
- globals["Callable"] = Callable
1825
- hints = get_type_hints(gen, globals, frame.f_locals)
1814
+ # Need to manually pass in the frame locals from the generator, because otherwise classes defined within function
1815
+ # will not be available in the annotations
1816
+ # combine locals and globals so that they are the same dict. Otherwise get_type_hints will go through the wrong
1817
+ # path and give an error for the test
1818
+ # python/tests/test_no_import_star.py::test_no_import_star_rulesset
1819
+ combined = {**gen.__globals__, **frame.f_locals}
1820
+ hints = get_type_hints(gen, combined, combined)
1826
1821
  args = [_var(p.name, hints[p.name]) for p in signature(gen).parameters.values()]
1827
1822
  return list(gen(*args)) # type: ignore[misc]
1828
1823
 
@@ -6,13 +6,10 @@ Higher Order Functions
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
- from typing import TYPE_CHECKING
9
+ from collections.abc import Callable
10
10
 
11
11
  from egglog import *
12
12
 
13
- if TYPE_CHECKING:
14
- from collections.abc import Callable
15
-
16
13
 
17
14
  class Math(Expr):
18
15
  def __init__(self, i: i64Like) -> None: ...
@@ -7,12 +7,11 @@ Lambda Calculus
7
7
 
8
8
  from __future__ import annotations
9
9
 
10
- from typing import TYPE_CHECKING, ClassVar
10
+ from collections.abc import Callable
11
+ from typing import ClassVar
11
12
 
12
13
  from egglog import *
13
-
14
- if TYPE_CHECKING:
15
- from collections.abc import Callable
14
+ from egglog import Expr
16
15
 
17
16
 
18
17
  class Val(Expr):
egglog/exp/array_api.py CHANGED
@@ -60,6 +60,7 @@ import math
60
60
  import numbers
61
61
  import os
62
62
  import sys
63
+ from collections.abc import Callable
63
64
  from copy import copy
64
65
  from types import EllipsisType
65
66
  from typing import TYPE_CHECKING, Any, ClassVar, TypeAlias, cast
@@ -68,13 +69,15 @@ import numpy as np
68
69
 
69
70
  from egglog import *
70
71
  from egglog.runtime import RuntimeExpr
72
+ from egglog.version_compat import add_note
71
73
 
72
74
  from .program_gen import *
73
75
 
74
76
  if TYPE_CHECKING:
75
- from collections.abc import Callable, Iterator
77
+ from collections.abc import Iterator
76
78
  from types import ModuleType
77
79
 
80
+
78
81
  # Pretend that exprs are numbers b/c sklearn does isinstance checks
79
82
  numbers.Integral.register(RuntimeExpr)
80
83
 
@@ -1196,13 +1199,13 @@ class NDArray(Expr, ruleset=array_api_ruleset):
1196
1199
 
1197
1200
  NDArrayLike: TypeAlias = NDArray | ValueLike | TupleValueLike
1198
1201
 
1199
- converter(NDArray, IndexKey, IndexKey.ndarray)
1200
- converter(Value, NDArray, NDArray.scalar)
1202
+ converter(NDArray, IndexKey, lambda v: IndexKey.ndarray(v))
1203
+ converter(Value, NDArray, lambda v: NDArray.scalar(v))
1201
1204
  # Need this if we want to use ints in slices of arrays coming from 1d arrays, but make it more expensive
1202
1205
  # to prefer upcasting in the other direction when we can, which is safer at runtime
1203
1206
  converter(NDArray, Value, lambda n: n.to_value(), 100)
1204
- converter(TupleValue, NDArray, NDArray.vector)
1205
- converter(TupleInt, TupleValue, TupleValue.from_tuple_int)
1207
+ converter(TupleValue, NDArray, lambda v: NDArray.vector(v))
1208
+ converter(TupleInt, TupleValue, lambda v: TupleValue.from_tuple_int(v))
1206
1209
 
1207
1210
 
1208
1211
  @array_api_ruleset.register
@@ -1381,8 +1384,8 @@ class IntOrTuple(Expr, ruleset=array_api_ruleset):
1381
1384
  def tuple(cls, value: TupleIntLike) -> IntOrTuple: ...
1382
1385
 
1383
1386
 
1384
- converter(Int, IntOrTuple, IntOrTuple.int)
1385
- converter(TupleInt, IntOrTuple, IntOrTuple.tuple)
1387
+ converter(Int, IntOrTuple, lambda v: IntOrTuple.int(v))
1388
+ converter(TupleInt, IntOrTuple, lambda v: IntOrTuple.tuple(v))
1386
1389
 
1387
1390
 
1388
1391
  class OptionalIntOrTuple(Expr, ruleset=array_api_ruleset):
@@ -1393,7 +1396,7 @@ class OptionalIntOrTuple(Expr, ruleset=array_api_ruleset):
1393
1396
 
1394
1397
 
1395
1398
  converter(type(None), OptionalIntOrTuple, lambda _: OptionalIntOrTuple.none)
1396
- converter(IntOrTuple, OptionalIntOrTuple, OptionalIntOrTuple.some)
1399
+ converter(IntOrTuple, OptionalIntOrTuple, lambda v: OptionalIntOrTuple.some(v))
1397
1400
 
1398
1401
 
1399
1402
  @function
@@ -1978,6 +1981,5 @@ def try_evaling(egraph: EGraph, schedule: Schedule, expr: Expr, prim_expr: Built
1978
1981
  extracted = egraph.extract(prim_expr)
1979
1982
  except BaseException as e:
1980
1983
  # egraph.display(n_inline_leaves=1, split_primitive_outputs=True)
1981
- e.add_note(f"Cannot evaluate {egraph.extract(expr)}")
1982
- raise
1984
+ raise add_note(f"Cannot evaluate {egraph.extract(expr)}", e) # noqa: B904
1983
1985
  return extracted.eval() # type: ignore[attr-defined]
egglog/exp/program_gen.py CHANGED
@@ -5,12 +5,10 @@ Builds up imperative string expressions from a functional expression.
5
5
 
6
6
  from __future__ import annotations
7
7
 
8
- from typing import TypeAlias, Union
8
+ from typing import TypeAlias
9
9
 
10
10
  from egglog import *
11
11
 
12
- ProgramLike: TypeAlias = Union["Program", StringLike]
13
-
14
12
 
15
13
  class Program(Expr):
16
14
  """
@@ -97,6 +95,9 @@ class Program(Expr):
97
95
  """
98
96
 
99
97
 
98
+ ProgramLike: TypeAlias = Program | StringLike
99
+
100
+
100
101
  converter(String, Program, Program)
101
102
 
102
103
 
egglog/runtime.py CHANGED
@@ -22,6 +22,7 @@ from .declarations import *
22
22
  from .pretty import *
23
23
  from .thunk import Thunk
24
24
  from .type_constraint_solver import *
25
+ from .version_compat import *
25
26
 
26
27
  if TYPE_CHECKING:
27
28
  from collections.abc import Iterable
@@ -249,8 +250,7 @@ class RuntimeClass(DelayedDeclerations):
249
250
  try:
250
251
  cls_decl = self.__egg_decls__._classes[self.__egg_tp__.name]
251
252
  except Exception as e:
252
- e.add_note(f"Error processing class {self.__egg_tp__.name}")
253
- raise
253
+ raise add_note(f"Error processing class {self.__egg_tp__.name}", e) from None
254
254
 
255
255
  preserved_methods = cls_decl.preserved_methods
256
256
  if name in preserved_methods:
@@ -281,6 +281,9 @@ class RuntimeClass(DelayedDeclerations):
281
281
  def __str__(self) -> str:
282
282
  return str(self.__egg_tp__)
283
283
 
284
+ def __repr__(self) -> str:
285
+ return str(self)
286
+
284
287
  # Make hashable so can go in Union
285
288
  def __hash__(self) -> int:
286
289
  return hash((id(self.__egg_decls_thunk__), self.__egg_tp__))
@@ -315,8 +318,7 @@ class RuntimeFunction(DelayedDeclerations):
315
318
  try:
316
319
  signature = self.__egg_decls__.get_callable_decl(self.__egg_ref__).signature
317
320
  except Exception as e:
318
- e.add_note(f"Failed to find callable {self}")
319
- raise
321
+ raise add_note(f"Failed to find callable {self}", e) # noqa: B904
320
322
  decls = self.__egg_decls__.copy()
321
323
  # Special case function application bc we dont support variadic generics yet generally
322
324
  if signature == "fn-app":
egglog/thunk.py CHANGED
@@ -41,13 +41,13 @@ class Thunk(Generic[T, Unpack[TS]]):
41
41
  state: Resolved[T] | Unresolved[T, Unpack[TS]] | Resolving | Error
42
42
 
43
43
  @classmethod
44
- def fn(cls, fn: Callable[[Unpack[TS]], T], *args: Unpack[TS]) -> Thunk[T, Unpack[TS]]:
44
+ def fn(cls, fn: Callable[[Unpack[TS]], T], *args: Unpack[TS], context: str | None = None) -> Thunk[T, Unpack[TS]]:
45
45
  """
46
46
  Create a thunk based on some functions and some partial args.
47
47
 
48
48
  If the function is called while it is being resolved recursively it will raise an exception.
49
49
  """
50
- return cls(Unresolved(fn, args))
50
+ return cls(Unresolved(fn, args, context))
51
51
 
52
52
  @classmethod
53
53
  def value(cls, value: T) -> Thunk[T]:
@@ -57,12 +57,12 @@ class Thunk(Generic[T, Unpack[TS]]):
57
57
  match self.state:
58
58
  case Resolved(value):
59
59
  return value
60
- case Unresolved(fn, args):
60
+ case Unresolved(fn, args, context):
61
61
  self.state = Resolving()
62
62
  try:
63
63
  res = fn(*args)
64
64
  except Exception as e:
65
- self.state = Error(e)
65
+ self.state = Error(e, context)
66
66
  raise e from None
67
67
  else:
68
68
  self.state = Resolved(res)
@@ -83,6 +83,7 @@ class Resolved(Generic[T]):
83
83
  class Unresolved(Generic[T, Unpack[TS]]):
84
84
  fn: Callable[[Unpack[TS]], T]
85
85
  args: tuple[Unpack[TS]]
86
+ context: str | None
86
87
 
87
88
 
88
89
  @dataclass
@@ -93,3 +94,4 @@ class Resolving:
93
94
  @dataclass
94
95
  class Error:
95
96
  e: Exception
97
+ context: str | None
@@ -107,7 +107,7 @@ class TypeConstraintSolver:
107
107
  try:
108
108
  return self._cls_typevar_index_to_type[cls_name][tp]
109
109
  except KeyError as e:
110
- raise TypeConstraintError(f"Not enough bound typevars for {tp} in class {cls_name}") from e
110
+ raise TypeConstraintError(f"Not enough bound typevars for {tp!r} in class {cls_name}") from e
111
111
  case TypeRefWithVars(name, args):
112
112
  return JustTypeRef(name, tuple(self.substitute_typevars(arg, cls_name) for arg in args))
113
113
  assert_never(tp)
@@ -0,0 +1,87 @@
1
+ import collections
2
+ import sys
3
+ import types
4
+ import typing
5
+
6
+ BEFORE_3_11 = sys.version_info < (3, 11)
7
+
8
+ __all__ = ["add_note"]
9
+
10
+
11
+ def add_note(message: str, exc: BaseException) -> BaseException:
12
+ """
13
+ Backwards compatible add_note for Python <= 3.10
14
+ """
15
+ if BEFORE_3_11:
16
+ return exc
17
+ exc.add_note(message)
18
+ return exc
19
+
20
+
21
+ # For Python version 3.10 need to monkeypatch this function so that RuntimeClass type parameters
22
+ # will be collected as typevars
23
+ if BEFORE_3_11:
24
+
25
+ @typing.no_type_check
26
+ def _collect_type_vars_monkeypatch(types_, typevar_types=None):
27
+ """
28
+ Collect all type variable contained
29
+ in types in order of first appearance (lexicographic order). For example::
30
+
31
+ _collect_type_vars((T, List[S, T])) == (T, S)
32
+ """
33
+ from .runtime import RuntimeClass
34
+
35
+ if typevar_types is None:
36
+ typevar_types = typing.TypeVar
37
+ tvars = []
38
+ for t in types_:
39
+ if isinstance(t, typevar_types) and t not in tvars:
40
+ tvars.append(t)
41
+ # **MONKEYPATCH CHANGE HERE TO ADD RuntimeClass**
42
+ if isinstance(t, (typing._GenericAlias, typing.GenericAlias, types.UnionType, RuntimeClass)): # type: ignore[name-defined]
43
+ tvars.extend([t for t in t.__parameters__ if t not in tvars])
44
+ return tuple(tvars)
45
+
46
+ typing._collect_type_vars = _collect_type_vars_monkeypatch # type: ignore[attr-defined]
47
+
48
+ @typing.no_type_check
49
+ @typing._tp_cache
50
+ def __getitem__monkeypatch(self, params): # noqa: C901, PLR0912
51
+ from .runtime import RuntimeClass
52
+
53
+ if self.__origin__ in (typing.Generic, typing.Protocol):
54
+ # Can't subscript Generic[...] or Protocol[...].
55
+ raise TypeError(f"Cannot subscript already-subscripted {self}")
56
+ if not isinstance(params, tuple):
57
+ params = (params,)
58
+ params = tuple(typing._type_convert(p) for p in params)
59
+ if self._paramspec_tvars and any(isinstance(t, typing.ParamSpec) for t in self.__parameters__):
60
+ params = typing._prepare_paramspec_params(self, params)
61
+ else:
62
+ typing._check_generic(self, params, len(self.__parameters__))
63
+
64
+ subst = dict(zip(self.__parameters__, params, strict=False))
65
+ new_args = []
66
+ for arg in self.__args__:
67
+ if isinstance(arg, self._typevar_types):
68
+ if isinstance(arg, typing.ParamSpec):
69
+ arg = subst[arg] # noqa: PLW2901
70
+ if not typing._is_param_expr(arg):
71
+ raise TypeError(f"Expected a list of types, an ellipsis, ParamSpec, or Concatenate. Got {arg}")
72
+ else:
73
+ arg = subst[arg] # noqa: PLW2901
74
+ # **MONKEYPATCH CHANGE HERE TO ADD RuntimeClass**
75
+ elif isinstance(arg, (typing._GenericAlias, typing.GenericAlias, types.UnionType, RuntimeClass)):
76
+ subparams = arg.__parameters__
77
+ if subparams:
78
+ subargs = tuple(subst[x] for x in subparams)
79
+ arg = arg[subargs] # noqa: PLW2901
80
+ # Required to flatten out the args for CallableGenericAlias
81
+ if self.__origin__ == collections.abc.Callable and isinstance(arg, tuple):
82
+ new_args.extend(arg)
83
+ else:
84
+ new_args.append(arg)
85
+ return self.copy_with(tuple(new_args))
86
+
87
+ typing._GenericAlias.__getitem__ = __getitem__monkeypatch # type: ignore[attr-defined]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: egglog
3
- Version: 10.0.0
3
+ Version: 10.0.2
4
4
  Classifier: Environment :: MacOS X
5
5
  Classifier: Environment :: Win32 (MS Windows)
6
6
  Classifier: Intended Audience :: Developers
@@ -1,44 +1,45 @@
1
- egglog-10.0.0.dist-info/METADATA,sha256=aWuZK6v1QbkwYpgfn9_9UnMiwCvPBONgvULMJCkMyFw,4019
2
- egglog-10.0.0.dist-info/WHEEL,sha256=tAGdc4C2KTz7B2CZ8Jf3DcKSAviAbCg44UH9ma2gYww,96
3
- egglog-10.0.0.dist-info/licenses/LICENSE,sha256=TfaboMVZ81Q6OUaKjU7z6uVjSlcGKclLYcOpgDbm9_s,1091
1
+ egglog-10.0.2.dist-info/METADATA,sha256=xR0HB5r6onjZhIk878L992umIt2QZT3zzRRCEN1NkF0,4019
2
+ egglog-10.0.2.dist-info/WHEEL,sha256=s0dDfj2AxxVsNT4qxjje5WVH9nG_gFfyCM_ZRxv6bRM,96
3
+ egglog-10.0.2.dist-info/licenses/LICENSE,sha256=TfaboMVZ81Q6OUaKjU7z6uVjSlcGKclLYcOpgDbm9_s,1091
4
+ egglog/__init__.py,sha256=TZ3IMVKoz5Qr97VFe-YT7oyT2NACikTis21PpVlSCmg,326
5
+ egglog/bindings.cp311-win_amd64.pyd,sha256=0m4d6DmJMgHp6MfYPy_HFwxldtvD5Zzzw3rfeEW3eNk,4504064
4
6
  egglog/bindings.pyi,sha256=fnRiGyHuM-m0fDe91kFryUC09U87f5XXPiY6Lno8bvk,14497
5
- egglog/builtins.py,sha256=ZLXp5txd7CD_Wlb137DFdy_qGbvmvzbfb54tc_KbRfY,30692
7
+ egglog/builtins.py,sha256=su57iYmxpWNt14S9Dw1CgBfSBUYiTLCS6h1ksShZUMk,30691
6
8
  egglog/config.py,sha256=mALVaxh7zmGrbuyzaVKVmYKcu1lF703QsKJw8AF7gSM,176
7
9
  egglog/conversion.py,sha256=o6iE32taKz-PBX8aDo5i4jGELdEai-wrzMEZUC1lqsU,10257
8
- egglog/declarations.py,sha256=R4U8JhM6ChOMmPEgG6tL2sJ8wJGsIEEVVN5lVY-6k2w,23011
9
- egglog/egraph.py,sha256=ssy2UHt8weA8GXzomqTWMKB389HzMo62k826gas5Fng,64537
10
+ egglog/declarations.py,sha256=7tT7RXHEKVoZtm14hT-Va_1jKuwOMPGFWg8VdRYhT88,23015
11
+ egglog/egraph.py,sha256=BnLyNXJ6UqMIM2gqYBgeMXvqjbX5OAwnMTRudOUyxtU,64497
10
12
  egglog/egraph_state.py,sha256=wkuHoXmEzcUFspvNl8ZG7_xS1J7XZTK3RPnlZEuvk9k,28720
13
+ egglog/examples/README.rst,sha256=QrbfmivODBvUvmY3-dHarcbC6bEvwoqAfTDhiI-aJxU,237
14
+ egglog/examples/__init__.py,sha256=KuhaJFOyz_rpUvEqZubsgLnv6rhQNE_AVFXA6bUnpdY,34
11
15
  egglog/examples/bignum.py,sha256=r4UeVwpKK2iSZiT5MK4qqTWhWu76CAtSJ5YGDboO9tk,568
12
16
  egglog/examples/bool.py,sha256=pWZTjfXR1cFy3KcihLBU5AF5rn83ImORlhUUJ1YiAXc,733
13
17
  egglog/examples/eqsat_basic.py,sha256=ivYHFD52sjYyl5rWQ60ScxmvcbABYUBlPobDMu6HvN4,913
14
18
  egglog/examples/fib.py,sha256=wAn-PjazxgHDkXAU4o2xTk_GtM_iGL0biV66vWM1st4,520
15
- egglog/examples/higher_order_functions.py,sha256=5P-_10y8eTh-z3bze5GVzKHyFTeefTM774haF8KYGig,1164
16
- egglog/examples/lambda_.py,sha256=hQBOaSw_yorNcbkQVu2EhgSc0IZNWIny7asaOlcUk9s,8496
19
+ egglog/examples/higher_order_functions.py,sha256=z8HgCi057k7Rt6Ms4xDz_tsmVj_Czx8JMUSWqd0HlvM,1105
20
+ egglog/examples/lambda_.py,sha256=y0HrgtmF2Ml2h2crRvqd1fYRtJGPP_n91o-fiWfyCLM,8481
17
21
  egglog/examples/matrix.py,sha256=_zmjgfFr2O_LjTcsTD-45_38Y_M1sP3AV39K6oFxAdw,5136
18
22
  egglog/examples/multiset.py,sha256=kSUFiN4qs8WXvexPCecqk3o5DzdywXacDmIiC5IDKCM,1507
19
23
  egglog/examples/ndarrays.py,sha256=T-wwef-n-3LDSjaO35zA8AZH5DXFFqq0XBSCQKEXV6E,4186
20
- egglog/examples/README.rst,sha256=QrbfmivODBvUvmY3-dHarcbC6bEvwoqAfTDhiI-aJxU,237
21
24
  egglog/examples/resolution.py,sha256=sKkbRI_v9XkQM0DriacKLINqKKDqYGFhvMCAS9tZbTA,2203
22
25
  egglog/examples/schedule_demo.py,sha256=iJtIbcLaZ7zK8UalY0z7KAKMqYjQx0MKTsNF24lKtik,652
23
- egglog/examples/__init__.py,sha256=KuhaJFOyz_rpUvEqZubsgLnv6rhQNE_AVFXA6bUnpdY,34
24
- egglog/exp/array_api.py,sha256=Y-mG8tC8ihFkeIbNDsDyZl7-7zP6YFxZGS4rfsWOG-8,65661
26
+ egglog/exp/__init__.py,sha256=G9zeKUcPBgIhgUg1meC86OfZVFETYIugyHWseTcCe_0,52
27
+ egglog/exp/array_api.py,sha256=0bqgi2nigiW5uLEa35JBOh9hFM5-oRMGYpoknzS60Jw,65828
25
28
  egglog/exp/array_api_jit.py,sha256=c0lN-411M9LmEz8uM0ELXTtfUPMJDZFmy81-x3ck6PY,1591
26
29
  egglog/exp/array_api_loopnest.py,sha256=1KZ8kWtv00TVCbzqzWG92vz8Y1pBlPOLRIrJfxyDs9s,2518
27
30
  egglog/exp/array_api_numba.py,sha256=g0Yb7auB2MtJHgSzn7iVnsxn6ffL4FHggKvbEuuDwZs,2765
28
31
  egglog/exp/array_api_program_gen.py,sha256=qXaaW_Koz4P-KmQcyRHY1NDLCJL3O7NnE6iq2NX4yZU,22252
29
- egglog/exp/program_gen.py,sha256=XqL9e-TWcpDkkrSvrjO4cT7GI1br--KKkeK1B87Ivzw,13451
32
+ egglog/exp/program_gen.py,sha256=obqPocwY9LpmXyjIRtONvafkJm84HKWDsR_fME0gns4,13438
30
33
  egglog/exp/siu_examples.py,sha256=nPV1IaA2NfIczpJPg3l8diUhoyio02KQUu-O55Pj1EQ,751
31
- egglog/exp/__init__.py,sha256=G9zeKUcPBgIhgUg1meC86OfZVFETYIugyHWseTcCe_0,52
32
34
  egglog/functionalize.py,sha256=7yBi5rlYS56lP4Fz_2REyOyj56Tag5R80bXkUXfj5pk,3938
33
35
  egglog/ipython_magic.py,sha256=QDw45CA2wKi9vrBbvHZXLeMaRtoHSGLBJdqyNFtvD7o,1230
34
36
  egglog/pretty.py,sha256=8ErTOWGHDY96W5B1ekctKNwRm0fqPHUrqLlX-h1fSJM,20986
35
37
  egglog/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
- egglog/runtime.py,sha256=4bDRE2iK51mOHCRAfxYSbYegVP54ZPAda5zEf0KCczw,26374
37
- egglog/thunk.py,sha256=t71q_SIRSpYh6oqOQ-TEDqMByrrwp5xvSJbVy3XONbQ,2263
38
- egglog/type_constraint_solver.py,sha256=kSJf8S1CxkicpPy_B2cNP9XiTf-d4TQNd7_IwfG-_-k,4629
38
+ egglog/runtime.py,sha256=zxcgUR5N_-qHs12vcH4r0oANY-9ra16jwlCAsNxZyC4,26465
39
+ egglog/thunk.py,sha256=97JH5VVrr5m3yaua40StfDsQYEvACXirBzZv9CHHLbY,2368
40
+ egglog/type_constraint_solver.py,sha256=uRLho3KQUtMn3ncugXADN5SfNqmqekduOl5CuWhhx4M,4631
41
+ egglog/version_compat.py,sha256=axYHagkkErdrW1aW6OyWyHUqjpdKNZQ9N4U1KpL4x3s,3595
39
42
  egglog/visualizer.css,sha256=DDmxZfLmFygwVkQwel0gGUiM5BZqgunawWeSfaRYBr8,259399
40
43
  egglog/visualizer.js,sha256=kDkYzE5cLLhmpNaWqSfQWzD0SlSsNe9KzT_GpNqhWgo,3789092
41
44
  egglog/visualizer_widget.py,sha256=TGkf61P_f4EvCFcyqwQC_8XYUkujFhcQnEG9vHWLPC4,1358
42
- egglog/__init__.py,sha256=TZ3IMVKoz5Qr97VFe-YT7oyT2NACikTis21PpVlSCmg,326
43
- egglog/bindings.cp311-win_amd64.pyd,sha256=lydYMT5DJB3jAsg_IpweX1BgjWbVm5Z7cPQDaakldrY,4500992
44
- egglog-10.0.0.dist-info/RECORD,,
45
+ egglog-10.0.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.8.3)
2
+ Generator: maturin (1.8.7)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp311-cp311-win_amd64