PySMT 0.9.7.dev464__tar.gz → 0.9.7.dev470__tar.gz
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.
- {pysmt-0.9.7.dev464/PySMT.egg-info → pysmt-0.9.7.dev470}/PKG-INFO +1 -1
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470/PySMT.egg-info}/PKG-INFO +1 -1
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/__init__.py +1 -1
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/environment.py +17 -10
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/oracles.py +7 -3
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/rewritings.py +3 -6
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/simplifier.py +1 -2
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/smtlib/printers.py +1 -2
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/msat.py +6 -2
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/substituter.py +1 -2
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_dwf.py +47 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_rewritings.py +4 -4
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_walkers.py +22 -20
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/walkers/dag.py +2 -6
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/walkers/generic.py +29 -36
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/walkers/tree.py +4 -13
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/LICENSE +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/MANIFEST.in +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/NOTICE +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/PySMT.egg-info/SOURCES.txt +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/PySMT.egg-info/dependency_links.txt +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/PySMT.egg-info/entry_points.txt +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/PySMT.egg-info/top_level.txt +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/README.rst +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/docs/CHANGES.rst +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/docs/api_ref.rst +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/docs/development.rst +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/docs/getting_started.rst +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/docs/index.rst +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/docs/tutorials/boolean_logic.rst +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/docs/tutorials.rst +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/__main__.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/__init__.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/check_version.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/install.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/__init__.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/base.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/bdd.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/btor.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/cvcfive.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/cvcfour.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/msat.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/optimsat.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/pico.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/yices.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/installers/z3.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/cmd/shell.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/configuration.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/constants.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/decorators.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/exceptions.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/factory.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/fnode.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/formula.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/logics.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/operators.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/optimization/__init__.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/optimization/goal.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/optimization/msat.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/optimization/optimizer.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/optimization/optimsat.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/optimization/yices.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/optimization/z3.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/parsing.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/printers.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/shortcuts.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/smtlib/__init__.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/smtlib/annotations.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/smtlib/commands.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/smtlib/parser/__init__.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/smtlib/parser/parser.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/smtlib/script.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/smtlib/solver.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/smtlib/utils.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/__init__.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/bdd.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/btor.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/cvcfive.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/cvcfour.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/dynmsat.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/eager.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/interpolation.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/options.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/pico.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/portfolio.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/qelim.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/smtlib.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/solver.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/yices.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/solvers/z3.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/__init__.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/configs/config1.ini +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/configs/config_bad.ini +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/examples.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/omt_examples.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/optimization_utils.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/__init__.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/parser_utils.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_annotations.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_fuzzed.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_generic_wrapper.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_griggio.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_model_validation.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_omt_lib_solver.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_examples.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_extensibility.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_lra.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_omt.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_qf_arrays.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_qf_lia.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_qf_lira.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_qf_lra.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_qf_nia.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_qf_nra.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_qf_uf.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_qf_ufbv.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_parser_type_error.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/smtlib/test_smtlibscript.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_array.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_back.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_bdd.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_bv.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_bv_simplification.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_cnf.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_configuration.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_constants.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_cvc_quantifiers.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_eager_model.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_env.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_euf.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_formula.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_hr_parsing.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_imports.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_int.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_interpolation.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_lira.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_logics.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_models.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_native_qe.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_nia.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_nlira.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_optimization.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_optimizing.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_oracles.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_portfolio.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_printing.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_qe.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_regressions.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_shannon_expansion.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_simplify.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_size.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_solving.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_sorts.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_string.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_typechecker.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_unsat_cores.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/test/test_walker_ext.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/type_checker.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/typing.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/utils.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/walkers/__init__.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/pysmt/walkers/identitydag.py +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/setup.cfg +0 -0
- {pysmt-0.9.7.dev464 → pysmt-0.9.7.dev470}/setup.py +0 -0
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
from typing import Tuple, Union
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
VERSION: Union[Tuple[int, int, int], Tuple[int, int, int, str, int]] = (0, 9, 7, "dev",
|
|
22
|
+
VERSION: Union[Tuple[int, int, int], Tuple[int, int, int, str, int]] = (0, 9, 7, "dev", 470)
|
|
23
23
|
|
|
24
24
|
# Try to provide human-readable version of latest commit for dev versions
|
|
25
25
|
# E.g. v0.5.1-4-g49a49f2-wip
|
|
@@ -21,7 +21,7 @@ singleton objects that are used throughout the system, such as the
|
|
|
21
21
|
FormulaManager, Simplifier, HRSerializer, SimpleTypeChecker.
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
|
-
from typing import List, Optional
|
|
24
|
+
from typing import Callable, Dict, List, Optional, Tuple, Type
|
|
25
25
|
|
|
26
26
|
import pysmt.simplifier
|
|
27
27
|
import pysmt.printers
|
|
@@ -87,9 +87,11 @@ class Environment(object):
|
|
|
87
87
|
# (e.g. substitution and simplification).
|
|
88
88
|
self.allow_empty_var_names = False
|
|
89
89
|
|
|
90
|
-
# Dynamic Walker
|
|
90
|
+
# Dynamic Walker Functions: handlers for custom node types,
|
|
91
|
+
# keyed by (nodetype, walker_class). Kept local to this
|
|
92
|
+
# environment so registrations never leak across environments.
|
|
91
93
|
# See: add_dynamic_walker_function
|
|
92
|
-
self.dwf = {}
|
|
94
|
+
self.dwf: Dict[Tuple[int, Type], Callable] = {}
|
|
93
95
|
|
|
94
96
|
@property
|
|
95
97
|
def formula_manager(self) -> pysmt.formula.FormulaManager:
|
|
@@ -154,15 +156,20 @@ class Environment(object):
|
|
|
154
156
|
function to a given walker, so that the walker will be able to
|
|
155
157
|
handle the new nodetype.
|
|
156
158
|
|
|
157
|
-
See :py:meth:`pysmt.walkers.generic.Walker.
|
|
158
|
-
|
|
159
|
+
See :py:meth:`pysmt.walkers.generic.Walker.super` for more
|
|
160
|
+
information on how the handler is dispatched.
|
|
159
161
|
"""
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
key = (nodetype, walker)
|
|
163
|
+
assert key not in self.dwf, "Dynamic Walker Redefinition!"
|
|
164
|
+
self.dwf[key] = function
|
|
163
165
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
def get_dynamic_walker_function(self, nodetype, walker_class):
|
|
167
|
+
"""Return the handler registered for (nodetype, walker_class), or None.
|
|
168
|
+
|
|
169
|
+
Used by :py:meth:`pysmt.walkers.generic.Walker.super` to
|
|
170
|
+
dispatch custom node types without mutating the walker class.
|
|
171
|
+
"""
|
|
172
|
+
return self.dwf.get((nodetype, walker_class))
|
|
166
173
|
|
|
167
174
|
@property
|
|
168
175
|
def factory(self) -> "pysmt.factory.Factory":
|
|
@@ -27,7 +27,7 @@ properties of formulae.
|
|
|
27
27
|
"""
|
|
28
28
|
|
|
29
29
|
from itertools import chain
|
|
30
|
-
from typing import FrozenSet, Iterable, List, Any, Optional, Union, cast
|
|
30
|
+
from typing import FrozenSet, Iterable, List, Any, Optional, Union, cast, Callable, Dict
|
|
31
31
|
|
|
32
32
|
import pysmt
|
|
33
33
|
import pysmt.walkers as walkers
|
|
@@ -60,7 +60,7 @@ class SizeOracle(walkers.DagWalker):
|
|
|
60
60
|
def __init__(self, env: Optional["pysmt.environment.Environment"]=None):
|
|
61
61
|
walkers.DagWalker.__init__(self, env=env)
|
|
62
62
|
|
|
63
|
-
self.measure_to_fun = \
|
|
63
|
+
self.measure_to_fun: Dict[int, Callable] = \
|
|
64
64
|
{SizeOracle.MEASURE_TREE_NODES: self.walk_count_tree,
|
|
65
65
|
SizeOracle.MEASURE_DAG_NODES: self.walk_count_dag,
|
|
66
66
|
SizeOracle.MEASURE_LEAVES: self.walk_count_leaves,
|
|
@@ -68,12 +68,16 @@ class SizeOracle(walkers.DagWalker):
|
|
|
68
68
|
SizeOracle.MEASURE_SYMBOLS: self.walk_count_symbols,
|
|
69
69
|
SizeOracle.MEASURE_BOOL_DAG: self.walk_count_bool_dag,
|
|
70
70
|
}
|
|
71
|
+
self._walking_fun: Optional[Callable] = None
|
|
71
72
|
|
|
73
|
+
@walkers.handles(*op.ALL_TYPES)
|
|
74
|
+
def walk_measure(self, formula, args, **kwargs):
|
|
75
|
+
return assert_not_none(self._walking_fun)(formula, args, **kwargs)
|
|
72
76
|
|
|
73
77
|
def set_walking_measure(self, measure: int):
|
|
74
78
|
if measure not in self.measure_to_fun:
|
|
75
79
|
raise NotImplementedError
|
|
76
|
-
self.
|
|
80
|
+
self._walking_fun = self.measure_to_fun[measure]
|
|
77
81
|
|
|
78
82
|
def _get_key(self, formula, measure, **kwargs):
|
|
79
83
|
"""Memoize using a tuple (measure, formula)."""
|
|
@@ -268,15 +268,12 @@ class PolarityCNFizer(CNFizer):
|
|
|
268
268
|
def _compute_node_result(self, formula, pol=None, **kwargs):
|
|
269
269
|
key = self._get_key(formula, pol, **kwargs)
|
|
270
270
|
if key not in self.memoization:
|
|
271
|
-
try:
|
|
272
|
-
f = self.functions[formula.node_type()]
|
|
273
|
-
except KeyError:
|
|
274
|
-
f = self.walk_error
|
|
275
|
-
|
|
276
271
|
args = [self.memoization[self._get_key(s, p, **kwargs)] \
|
|
277
272
|
for s, p in self._get_children(formula, pol)]
|
|
278
273
|
|
|
279
|
-
self.memoization[key] =
|
|
274
|
+
self.memoization[key] = self.__class__.super(self, formula,
|
|
275
|
+
args=args, pol=pol,
|
|
276
|
+
**kwargs)
|
|
280
277
|
else:
|
|
281
278
|
pass
|
|
282
279
|
|
|
@@ -74,8 +74,7 @@ class Simplifier(pysmt.walkers.DagWalker):
|
|
|
74
74
|
|
|
75
75
|
args = [self.walk(s, **kwargs) for s in formula.args()]
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
res = f(formula, args=args, **kwargs)
|
|
77
|
+
res = self.__class__.super(self, formula, args=args, **kwargs)
|
|
79
78
|
ltype = get_type(formula)
|
|
80
79
|
rtype = get_type(res)
|
|
81
80
|
test = Equals(formula, res) if ltype != BOOL else Iff(formula, res)
|
|
@@ -346,8 +346,7 @@ class SmtDagPrinter(DagWalker):
|
|
|
346
346
|
if formula.is_quantifier():
|
|
347
347
|
# 1. We invoke the relevant function (walk_exists or
|
|
348
348
|
# walk_forall) to print the formula
|
|
349
|
-
|
|
350
|
-
res = fun(formula, args=None, **kwargs)
|
|
349
|
+
res = self.__class__.super(self, formula, args=None, **kwargs)
|
|
351
350
|
|
|
352
351
|
# 2. We memoize the result
|
|
353
352
|
key = self._get_key(formula, **kwargs)
|
|
@@ -41,6 +41,7 @@ from pysmt.decorators import clear_pending_pop, catch_conversion_error
|
|
|
41
41
|
from pysmt.solvers.qelim import QuantifierEliminator
|
|
42
42
|
from pysmt.solvers.interpolation import Interpolator
|
|
43
43
|
from pysmt.walkers.identitydag import IdentityDagWalker
|
|
44
|
+
from pysmt.walkers.generic import handles
|
|
44
45
|
from pysmt.environment import Environment
|
|
45
46
|
from pysmt.fnode import FNode
|
|
46
47
|
from pysmt.formula import FormulaManager
|
|
@@ -1183,8 +1184,6 @@ class MSatQuantifierEliminator(QuantifierEliminator, IdentityDagWalker):
|
|
|
1183
1184
|
self.msat_env = MSATCreateEnv(self.__class__.__lib_name__, self.msat_config)
|
|
1184
1185
|
self._msat_lib.msat_destroy_config(self.msat_config)
|
|
1185
1186
|
|
|
1186
|
-
self.set_function(self.walk_identity, op.SYMBOL, op.REAL_CONSTANT,
|
|
1187
|
-
op.BOOL_CONSTANT, op.INT_CONSTANT)
|
|
1188
1187
|
self.logic = logic
|
|
1189
1188
|
|
|
1190
1189
|
self.algorithm = algorithm
|
|
@@ -1243,6 +1242,11 @@ class MSatQuantifierEliminator(QuantifierEliminator, IdentityDagWalker):
|
|
|
1243
1242
|
subf = args[0]
|
|
1244
1243
|
return self.exist_elim(variables, subf)
|
|
1245
1244
|
|
|
1245
|
+
@handles(op.SYMBOL, op.REAL_CONSTANT, op.BOOL_CONSTANT, op.INT_CONSTANT)
|
|
1246
|
+
def walk_identity(self, formula, args, **kwargs):
|
|
1247
|
+
# Leaves are unchanged by quantifier elimination.
|
|
1248
|
+
return formula
|
|
1249
|
+
|
|
1246
1250
|
def _exit(self):
|
|
1247
1251
|
del self.msat_env
|
|
1248
1252
|
|
|
@@ -157,8 +157,7 @@ class Substituter(pysmt.walkers.IdentityDagWalker):
|
|
|
157
157
|
|
|
158
158
|
# 3. We invoke the relevant function (walk_exists or
|
|
159
159
|
# walk_forall) to compute the substitution
|
|
160
|
-
|
|
161
|
-
res = fun(formula, args=[res_formula], **kwargs)
|
|
160
|
+
res = self.__class__.super(self, formula, args=[res_formula], **kwargs)
|
|
162
161
|
|
|
163
162
|
# 4. We memoize the result
|
|
164
163
|
key = self._get_key(formula, **kwargs)
|
|
@@ -73,3 +73,50 @@ class TestDwf(TestCase):
|
|
|
73
73
|
new_t = new_node_type()
|
|
74
74
|
new_types_set = set(all_types())
|
|
75
75
|
self.assertEqual(new_types_set - old_types_set, set([new_t]))
|
|
76
|
+
|
|
77
|
+
def test_03_dwf_is_environment_local(self):
|
|
78
|
+
# A DWF registered in one environment must not leak into another.
|
|
79
|
+
# Handlers are dispatched via Walker.super through the walker's
|
|
80
|
+
# own env, not by mutating the (process-global) walker class.
|
|
81
|
+
from pysmt.environment import Environment
|
|
82
|
+
from pysmt.printers import HRPrinter
|
|
83
|
+
|
|
84
|
+
def make_printer(sep):
|
|
85
|
+
def hrprinter_walk_XOR(self, formula):
|
|
86
|
+
self.stream.write("(")
|
|
87
|
+
yield formula.arg(0)
|
|
88
|
+
self.stream.write(sep)
|
|
89
|
+
yield formula.arg(1)
|
|
90
|
+
self.stream.write(")")
|
|
91
|
+
return hrprinter_walk_XOR
|
|
92
|
+
|
|
93
|
+
XOR = new_node_type()
|
|
94
|
+
env1 = Environment()
|
|
95
|
+
env2 = Environment()
|
|
96
|
+
|
|
97
|
+
# Both envs must be able to build the node, so both get a
|
|
98
|
+
# type-checker handler. Only env1 gets a printer handler.
|
|
99
|
+
for env in (env1, env2):
|
|
100
|
+
env.add_dynamic_walker_function(
|
|
101
|
+
XOR, SimpleTypeChecker, SimpleTypeChecker.walk_bool_to_bool)
|
|
102
|
+
env1.add_dynamic_walker_function(XOR, HRPrinter, make_printer(" *+* "))
|
|
103
|
+
|
|
104
|
+
x1 = env1.formula_manager.Symbol("x")
|
|
105
|
+
f1 = env1.formula_manager.create_node(node_type=XOR, args=(x1, x1))
|
|
106
|
+
self.assertEqual(env1.serializer.serialize(f1), "(x *+* x)")
|
|
107
|
+
|
|
108
|
+
# The handler registered on env1 must NOT leak into env2.
|
|
109
|
+
x2 = env2.formula_manager.Symbol("x")
|
|
110
|
+
f2 = env2.formula_manager.create_node(node_type=XOR, args=(x2, x2))
|
|
111
|
+
with self.assertRaises(UnsupportedOperatorError):
|
|
112
|
+
env2.serializer.serialize(f2)
|
|
113
|
+
|
|
114
|
+
# env2 can register its own, independent handler for the same
|
|
115
|
+
# (nodetype, walker) pair, and env1 stays unaffected.
|
|
116
|
+
env2.add_dynamic_walker_function(XOR, HRPrinter, make_printer(" XOR "))
|
|
117
|
+
self.assertEqual(env2.serializer.serialize(f2), "(x XOR x)")
|
|
118
|
+
self.assertEqual(env1.serializer.serialize(f1), "(x *+* x)")
|
|
119
|
+
|
|
120
|
+
# Redefining the same (nodetype, walker) within one env is caught.
|
|
121
|
+
with self.assertRaises(AssertionError):
|
|
122
|
+
env1.add_dynamic_walker_function(XOR, HRPrinter, make_printer("!"))
|
|
@@ -166,7 +166,7 @@ class TestRewritings(TestCase):
|
|
|
166
166
|
for (f, _, _, logic) in get_example_formulae():
|
|
167
167
|
if not logic.is_quantified() and logic.theory.uninterpreted:
|
|
168
168
|
if self.env.factory.has_solvers(logic=logic):
|
|
169
|
-
self._verify_ackermannization(f)
|
|
169
|
+
self._verify_ackermannization(f, logic)
|
|
170
170
|
|
|
171
171
|
def test_ackermannization_dictionaries(self):
|
|
172
172
|
self.env.enable_infix_notation = True
|
|
@@ -192,7 +192,7 @@ class TestRewritings(TestCase):
|
|
|
192
192
|
if atom.is_function_application():
|
|
193
193
|
self.assertIsNotNone(terms_to_consts[atom])
|
|
194
194
|
|
|
195
|
-
def _verify_ackermannization(self, formula):
|
|
195
|
+
def _verify_ackermannization(self, formula, logic=None):
|
|
196
196
|
ackermannization = Ackermannizer()
|
|
197
197
|
ack = ackermannization.do_ackermannization(formula)
|
|
198
198
|
#verify that there are no functions in ack
|
|
@@ -201,8 +201,8 @@ class TestRewritings(TestCase):
|
|
|
201
201
|
for arg in atom.args():
|
|
202
202
|
self.assertFalse(arg.is_function_application())
|
|
203
203
|
#verify that ack and formula are equisat
|
|
204
|
-
formula_sat = is_sat(formula)
|
|
205
|
-
ack_sat = is_sat(ack)
|
|
204
|
+
formula_sat = is_sat(formula, logic=logic)
|
|
205
|
+
ack_sat = is_sat(ack, logic=logic)
|
|
206
206
|
self.assertTrue(formula_sat == ack_sat)
|
|
207
207
|
|
|
208
208
|
def test_nnf_examples(self):
|
|
@@ -21,7 +21,8 @@ from pysmt.shortcuts import And, Or, Iff, Not, Function, Real
|
|
|
21
21
|
from pysmt.shortcuts import LT, GT, Plus, Minus, Equals
|
|
22
22
|
from pysmt.shortcuts import get_env, substitute, TRUE
|
|
23
23
|
from pysmt.typing import INT, BOOL, REAL, FunctionType
|
|
24
|
-
from pysmt.walkers import TreeWalker, DagWalker, IdentityDagWalker
|
|
24
|
+
from pysmt.walkers import TreeWalker, DagWalker, IdentityDagWalker, handles
|
|
25
|
+
from pysmt.walkers.generic import nt_to_fun
|
|
25
26
|
from pysmt.test import TestCase, main
|
|
26
27
|
from pysmt.formula import FormulaManager
|
|
27
28
|
from pysmt.test.examples import get_example_formulae
|
|
@@ -105,36 +106,36 @@ class TestWalkers(TestCase):
|
|
|
105
106
|
tree_walker.walk(varA)
|
|
106
107
|
|
|
107
108
|
def test_walker_new_operators_complete(self):
|
|
108
|
-
walkerA = IdentityDagWalker(env=self.env)
|
|
109
109
|
idx = op.new_node_type(node_str="fancy_new_node")
|
|
110
|
-
|
|
111
|
-
with self.assertRaises(KeyError):
|
|
112
|
-
walkerA.functions[idx]
|
|
113
|
-
self.assertEqual(walkerB.functions[idx], walkerB.walk_error)
|
|
110
|
+
fun_name = nt_to_fun(idx)
|
|
114
111
|
|
|
115
|
-
#
|
|
112
|
+
# A node type introduced after the class was defined has no
|
|
113
|
+
# dedicated walk_* method: dispatch falls back to walk_error.
|
|
114
|
+
self.assertFalse(hasattr(IdentityDagWalker, fun_name))
|
|
115
|
+
|
|
116
|
+
# Use a mixin to handle the node type (the method name matches
|
|
117
|
+
# nt_to_fun, so it is picked up by class-based dispatch).
|
|
116
118
|
class FancyNewNodeWalkerMixin(object):
|
|
117
|
-
def walk_fancy_new_node(self, args, **kwargs):
|
|
119
|
+
def walk_fancy_new_node(self, formula, args, **kwargs):
|
|
118
120
|
raise UnsupportedOperatorError
|
|
119
121
|
|
|
120
122
|
class IdentityDagWalker2(IdentityDagWalker, FancyNewNodeWalkerMixin):
|
|
121
123
|
pass
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
walkerC.walk_fancy_new_node)
|
|
124
|
+
self.assertEqual(getattr(IdentityDagWalker2, fun_name),
|
|
125
|
+
FancyNewNodeWalkerMixin.walk_fancy_new_node)
|
|
125
126
|
|
|
126
127
|
def test_identity_walker_simple(self):
|
|
127
128
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return And(args)
|
|
129
|
+
class MyWalker(IdentityDagWalker):
|
|
130
|
+
@handles(op.AND)
|
|
131
|
+
def walk_and_to_or(self, formula, args, **kwargs):
|
|
132
|
+
return Or(args)
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
@handles(op.OR)
|
|
135
|
+
def walk_or_to_and(self, formula, args, **kwargs):
|
|
136
|
+
return And(args)
|
|
135
137
|
|
|
136
|
-
walker
|
|
137
|
-
walker.set_function(walk_or_to_and, op.OR)
|
|
138
|
+
walker = MyWalker(env=get_env())
|
|
138
139
|
|
|
139
140
|
x, y, z = Symbol('x'), Symbol('y'), Symbol('z')
|
|
140
141
|
|
|
@@ -240,8 +241,9 @@ class TestWalkers(TestCase):
|
|
|
240
241
|
x = Symbol("x")
|
|
241
242
|
w = DagWalker()
|
|
242
243
|
for o in op.ALL_TYPES:
|
|
244
|
+
f = getattr(w, nt_to_fun(o))
|
|
243
245
|
with self.assertRaises(UnsupportedOperatorError):
|
|
244
|
-
|
|
246
|
+
f(x)
|
|
245
247
|
|
|
246
248
|
def test_walker_super(self):
|
|
247
249
|
from pysmt.walkers import DagWalker
|
|
@@ -68,14 +68,10 @@ class DagWalker(Walker):
|
|
|
68
68
|
"""
|
|
69
69
|
key = self._get_key(formula, **kwargs)
|
|
70
70
|
if key not in self.memoization:
|
|
71
|
-
try:
|
|
72
|
-
f = self.functions[formula.node_type()]
|
|
73
|
-
except KeyError:
|
|
74
|
-
f = self.walk_error
|
|
75
|
-
|
|
76
71
|
args = [self.memoization[self._get_key(s, **kwargs)] \
|
|
77
72
|
for s in self._get_children(formula)]
|
|
78
|
-
self.memoization[key] =
|
|
73
|
+
self.memoization[key] = self.__class__.super(self, formula,
|
|
74
|
+
args=args, **kwargs)
|
|
79
75
|
else:
|
|
80
76
|
pass
|
|
81
77
|
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
# See the License for the specific language governing permissions and
|
|
16
16
|
# limitations under the License.
|
|
17
17
|
#
|
|
18
|
-
from functools import partial
|
|
19
|
-
|
|
20
18
|
import sys
|
|
21
19
|
from pysmt.fnode import FNode
|
|
22
20
|
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union, cast, Iterable
|
|
@@ -83,24 +81,15 @@ class Walker(object, metaclass=MetaNodeTypeHandler):
|
|
|
83
81
|
env = pysmt.environment.get_env()
|
|
84
82
|
self.env: "pysmt.environment.Environment" = env
|
|
85
83
|
|
|
86
|
-
self.functions = {}
|
|
87
|
-
for o in op.all_types():
|
|
88
|
-
try:
|
|
89
|
-
# getattr will raise an AttributeError exception if a
|
|
90
|
-
# method does not exist
|
|
91
|
-
self.functions[o] = getattr(self, nt_to_fun(o))
|
|
92
|
-
except AttributeError:
|
|
93
|
-
self.functions[o] = self.walk_error
|
|
94
|
-
|
|
95
84
|
def set_function(self, function, *node_types):
|
|
96
|
-
"""
|
|
97
|
-
|
|
85
|
+
"""Instance-based walkers (<=0.6.0) are no longer supported.
|
|
86
|
+
|
|
87
|
+
Use class-based walkers instead: define walk_* methods (or use
|
|
88
|
+
the ``@handles`` decorator) on a subclass.
|
|
98
89
|
"""
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
for nt in node_types:
|
|
103
|
-
self.functions[nt] = function
|
|
90
|
+
raise NotImplementedError(
|
|
91
|
+
"Instance-based walkers (<=0.6.0) are deprecated. "
|
|
92
|
+
"You should use new-style/class based walkers.")
|
|
104
93
|
|
|
105
94
|
@classmethod
|
|
106
95
|
def set_handler(cls, function: Callable, *node_types):
|
|
@@ -109,28 +98,32 @@ class Walker(object, metaclass=MetaNodeTypeHandler):
|
|
|
109
98
|
setattr(cls, nt_to_fun(nt), function)
|
|
110
99
|
|
|
111
100
|
@classmethod
|
|
112
|
-
def super(cls, self, formula: FNode, *args, **kwargs) ->
|
|
113
|
-
"""Call the correct walk_* function of cls for the given formula.
|
|
114
|
-
|
|
101
|
+
def super(cls, self, formula: FNode, *args, **kwargs) -> Any:
|
|
102
|
+
"""Call the correct walk_* function of cls for the given formula.
|
|
103
|
+
|
|
104
|
+
The return type depends on the walker: an FNode for rewriting
|
|
105
|
+
walkers, but a generator (TreeWalker), a set or an int (oracles),
|
|
106
|
+
etc. for others; hence Any.
|
|
107
|
+
"""
|
|
108
|
+
nt = formula.node_type()
|
|
109
|
+
try:
|
|
110
|
+
f = getattr(cls, nt_to_fun(nt))
|
|
111
|
+
except AttributeError:
|
|
112
|
+
# Custom node types (see new_node_type) have no walk_* method
|
|
113
|
+
# on the class. Look for a handler registered on this walker's
|
|
114
|
+
# environment via add_dynamic_walker_function; keeping the
|
|
115
|
+
# lookup env-local is what stops registrations from leaking
|
|
116
|
+
# across environments.
|
|
117
|
+
fun = self.env.get_dynamic_walker_function(nt, cls)
|
|
118
|
+
if fun is None:
|
|
119
|
+
raise pysmt.exceptions.UnsupportedOperatorError(
|
|
120
|
+
node_type=nt, expression=formula)
|
|
121
|
+
return fun(self, formula, *args, **kwargs)
|
|
115
122
|
return f(self, formula, *args, **kwargs)
|
|
116
123
|
|
|
117
124
|
@handles(op.ALL_TYPES)
|
|
118
125
|
def walk_error(self, formula, **kwargs):
|
|
119
|
-
"""Default function for a node that is not handled by the Walker.
|
|
120
|
-
|
|
121
|
-
This tries to handle the node using the Dynamic Walker
|
|
122
|
-
Function information from the environment. If this fails, then
|
|
123
|
-
an UnsupportedOperatorError exception is given.
|
|
124
|
-
|
|
125
|
-
"""
|
|
126
|
-
node_type = formula.node_type()
|
|
127
|
-
if node_type in self.env.dwf:
|
|
128
|
-
dwf = self.env.dwf[node_type]
|
|
129
|
-
walker_class = type(self)
|
|
130
|
-
if type(self) in dwf:
|
|
131
|
-
self.functions[node_type] = partial(dwf[walker_class], self)
|
|
132
|
-
return self.functions[node_type](formula, **kwargs)
|
|
133
|
-
|
|
126
|
+
"""Default function for a node that is not handled by the Walker."""
|
|
134
127
|
node_type = formula.node_type()
|
|
135
128
|
raise pysmt.exceptions.UnsupportedOperatorError(node_type=node_type,
|
|
136
129
|
expression=formula)
|
|
@@ -41,19 +41,14 @@ class TreeWalker(Walker):
|
|
|
41
41
|
return
|
|
42
42
|
|
|
43
43
|
def walk(self, formula: FNode, threshold: Optional[int]=None):
|
|
44
|
-
"""Generic walk method, will apply the function
|
|
45
|
-
|
|
44
|
+
"""Generic walk method, will apply the function associated with
|
|
45
|
+
the node.
|
|
46
46
|
|
|
47
47
|
If threshold parameter is specified, the walk_threshold
|
|
48
48
|
function will be called for all nodes with depth >= threshold.
|
|
49
49
|
"""
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
f = self.functions[formula.node_type()]
|
|
53
|
-
except KeyError:
|
|
54
|
-
f = self.walk_error
|
|
55
|
-
|
|
56
|
-
iterator = f(formula)
|
|
51
|
+
iterator = self.__class__.super(self, formula)
|
|
57
52
|
if iterator is None:
|
|
58
53
|
return
|
|
59
54
|
|
|
@@ -67,11 +62,7 @@ class TreeWalker(Walker):
|
|
|
67
62
|
if iterator is not None:
|
|
68
63
|
stack.append(iterator)
|
|
69
64
|
else:
|
|
70
|
-
|
|
71
|
-
cf = self.functions[child.node_type()]
|
|
72
|
-
except KeyError:
|
|
73
|
-
cf = self.walk_error
|
|
74
|
-
iterator = cf(child)
|
|
65
|
+
iterator = self.__class__.super(self, child)
|
|
75
66
|
if iterator is not None:
|
|
76
67
|
stack.append(iterator)
|
|
77
68
|
except StopIteration:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|