|
1 |
| -from typing import ClassVar, Literal, Protocol, TypeAlias, final |
| 1 | +from typing import ClassVar, Literal, TypeAlias, final |
2 | 2 |
|
3 | 3 | from typing_extensions import Self
|
4 | 4 |
|
5 |
| -class NumExpr(Protocol): |
| 5 | +def parse_expr(expr_str: str) -> Expr: ... |
| 6 | + |
| 7 | +class Expr: ... |
| 8 | + |
| 9 | +class NumExpr(Expr): |
6 | 10 | def __ge__(self, other: Self) -> NumExpr: ...
|
7 | 11 | def __gt__(self, other: Self) -> NumExpr: ...
|
8 | 12 | def __le__(self, other: Self) -> NumExpr: ...
|
@@ -64,7 +68,7 @@ class Div(NumExpr):
|
64 | 68 | class Abs(NumExpr):
|
65 | 69 | def __init__(self, arg: NumExpr) -> None: ...
|
66 | 70 |
|
67 |
| -class BoolExpr(Protocol): |
| 71 | +class BoolExpr(Expr): |
68 | 72 | def __and__(self, other: Self) -> BoolExpr: ...
|
69 | 73 | def __invert__(self) -> BoolExpr: ...
|
70 | 74 | def __or__(self, other: Self) -> BoolExpr: ...
|
@@ -192,5 +196,9 @@ class FloatSignal(Signal):
|
192 | 196 | @final
|
193 | 197 | class Trace: ...
|
194 | 198 |
|
195 |
| -def eval_bool_semantics(expr: BoolExpr, trace: Trace) -> BoolSignal: ... |
196 |
| -def eval_robust_semantics(expr: BoolExpr, trace: Trace) -> BoolSignal: ... |
| 199 | +def eval_bool_semantics( |
| 200 | + expr: BoolExpr, trace: Trace, *, interpolation_method: _InterpolationMethod = "linear" |
| 201 | +) -> BoolSignal: ... |
| 202 | +def eval_robust_semantics( |
| 203 | + expr: BoolExpr, trace: Trace, *, interpolation_method: _InterpolationMethod = "linear" |
| 204 | +) -> BoolSignal: ... |
0 commit comments