11from typing import Optional , Union , Callable , Iterable
2-
3- from z3 import z3
4-
52from .jingle_types import State , ModeledBlock , ResolvedVarNode
6- from ._internal .crackers import CrackersLogLevel
7- from ._internal .crackers import SynthesisSelectionStrategy
3+ from z3 import z3 # type: ignore
4+
5+ __all__ = [
6+ "AssignmentModel" ,
7+ "ConstraintConfig" ,
8+ "CrackersConfig" ,
9+ "CrackersLogLevel" ,
10+ "DecisionResult" ,
11+ "GadgetLibraryConfig" ,
12+ "MemoryEqualityConstraint" ,
13+ "MetaConfig" ,
14+ "PointerRange" ,
15+ "PointerRangeConstraints" ,
16+ "SleighConfig" ,
17+ "SpecificationConfig" ,
18+ "StateEqualityConstraint" ,
19+ "SynthesisConfig" ,
20+ "SynthesisParams" ,
21+ "SynthesisSelectionStrategy" ,
22+ "DecisionResultType" ,
23+ "StateConstraintGenerator" ,
24+ "TransitionConstraintGenerator"
25+ ]
826
927class AssignmentModel :
1028 def eval_bv (self , bv : z3 .BitVecRef , model_completion : bool ) -> z3 .BitVecRef : ...
@@ -42,11 +60,11 @@ class CrackersConfig:
4260
4361
4462class CrackersLogLevel :
45- Debug = CrackersLogLevel . Debug
46- Error = CrackersLogLevel . Error
47- Info = CrackersLogLevel . Info
48- Trace = CrackersLogLevel . Trace
49- Warn = CrackersLogLevel . Warn
63+ Debug : int
64+ Error : int
65+ Info : int
66+ Trace : int
67+ Warn : int
5068
5169
5270
@@ -92,8 +110,8 @@ class StateEqualityConstraint:
92110 memory : Optional [MemoryEqualityConstraint ]
93111
94112class SynthesisSelectionStrategy :
95- SatStrategy = SynthesisSelectionStrategy . SatStrategy
96- OptimizeStrategy = SynthesisSelectionStrategy . OptimizeStrategy
113+ SatStrategy : int
114+ OptimizeStrategy : int
97115
98116class SynthesisConfig :
99117 strategy : SynthesisSelectionStrategy
@@ -118,13 +136,13 @@ class DecisionResult:
118136 Unsat : PythonDecisionResult_Unsat
119137
120138
121- DecisionResultType = Union [DecisionResult . AssignmentFound , DecisionResult . Unsat ]
139+ DecisionResultType = Union ["PythonDecisionResult_AssignmentFound" , "PythonDecisionResult_Unsat" ]
122140
123141StateConstraintGenerator = Callable [[State , int ], z3 .BitVecRef ]
124142TransitionConstraintGenerator = Callable [[ModeledBlock ], z3 .BitVecRef ]
125143
126144class SynthesisParams :
127- def run (self ) -> DecisionResultType : ...
145+ def run (self ) -> " DecisionResultType" : ...
128146 def add_precondition (self , fn : StateConstraintGenerator ): ...
129147 def add_postcondition (self , fn : StateConstraintGenerator ): ...
130148 def add_transition_constraint (self , fn : TransitionConstraintGenerator ): ...
0 commit comments