unsat 0.1.0__py3-none-any.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.
Files changed (54) hide show
  1. unsat/__init__.py +160 -0
  2. unsat/__main__.py +11 -0
  3. unsat/api.py +625 -0
  4. unsat/cli.py +147 -0
  5. unsat/model/__init__.py +25 -0
  6. unsat/model/converters.py +102 -0
  7. unsat/model/eval.py +578 -0
  8. unsat/model/values.py +219 -0
  9. unsat/parser/__init__.py +34 -0
  10. unsat/parser/dimacs.py +151 -0
  11. unsat/parser/smt2/__init__.py +21 -0
  12. unsat/parser/smt2/format.py +101 -0
  13. unsat/parser/smt2/lexer.py +242 -0
  14. unsat/parser/smt2/runner.py +1364 -0
  15. unsat/py.typed +0 -0
  16. unsat/quantifiers/__init__.py +28 -0
  17. unsat/quantifiers/base.py +76 -0
  18. unsat/quantifiers/ematch.py +376 -0
  19. unsat/quantifiers/mbqi.py +334 -0
  20. unsat/sat/__init__.py +49 -0
  21. unsat/sat/heap.py +106 -0
  22. unsat/sat/solver.py +862 -0
  23. unsat/sat/trail.py +89 -0
  24. unsat/sat/types.py +140 -0
  25. unsat/smt/__init__.py +14 -0
  26. unsat/smt/encoder.py +737 -0
  27. unsat/smt/propagator.py +456 -0
  28. unsat/smt/solver.py +583 -0
  29. unsat/syntax/__init__.py +58 -0
  30. unsat/syntax/bv_eval.py +80 -0
  31. unsat/syntax/context.py +1029 -0
  32. unsat/syntax/context_arith.py +228 -0
  33. unsat/syntax/context_bv.py +620 -0
  34. unsat/syntax/expr.py +657 -0
  35. unsat/syntax/kinds.py +72 -0
  36. unsat/syntax/walk.py +618 -0
  37. unsat/tactics/__init__.py +51 -0
  38. unsat/tactics/base.py +40 -0
  39. unsat/tactics/bitblast.py +1209 -0
  40. unsat/tactics/ctx_simplify.py +254 -0
  41. unsat/tactics/elim.py +586 -0
  42. unsat/tactics/nnf.py +229 -0
  43. unsat/tactics/simplify.py +198 -0
  44. unsat/tactics/skolem.py +191 -0
  45. unsat/theories/__init__.py +32 -0
  46. unsat/theories/arrays.py +619 -0
  47. unsat/theories/base.py +131 -0
  48. unsat/theories/euf.py +1069 -0
  49. unsat/theories/lia.py +349 -0
  50. unsat/theories/lra.py +1171 -0
  51. unsat-0.1.0.dist-info/METADATA +134 -0
  52. unsat-0.1.0.dist-info/RECORD +54 -0
  53. unsat-0.1.0.dist-info/WHEEL +4 -0
  54. unsat-0.1.0.dist-info/entry_points.txt +3 -0
unsat/__init__.py ADDED
@@ -0,0 +1,160 @@
1
+ """unsat: A Z3-inspired SMT solver in Python.
2
+
3
+ Public library entry point. Re-exports the curated user-facing DSL from
4
+ ``unsat.api`` via ``__all__`` (direct re-exports initially; can switch to
5
+ PEP 562 lazy loading later without breaking public API compatibility).
6
+
7
+ Depends on: ``api``.
8
+ """
9
+
10
+ from unsat.api import (
11
+ SAT,
12
+ UGE,
13
+ UGT,
14
+ ULE,
15
+ ULT,
16
+ UNKNOWN,
17
+ UNSAT,
18
+ And,
19
+ App,
20
+ Array,
21
+ ArraySort,
22
+ BitVec,
23
+ BitVecs,
24
+ BitVecSort,
25
+ BitVecVal,
26
+ Bool,
27
+ Bools,
28
+ BoolSort,
29
+ BoolVal,
30
+ BoundVar,
31
+ Concat,
32
+ Const,
33
+ Constant,
34
+ Constants,
35
+ Context,
36
+ DeclareSort,
37
+ Distinct,
38
+ Eq,
39
+ Exists,
40
+ Expr,
41
+ Extract,
42
+ ForAll,
43
+ FuncDecl,
44
+ FuncInterp,
45
+ Function,
46
+ If,
47
+ Implies,
48
+ Int,
49
+ Ints,
50
+ IntSort,
51
+ IntVal,
52
+ K,
53
+ LShR,
54
+ Model,
55
+ MultiPattern,
56
+ Not,
57
+ Or,
58
+ Quantifier,
59
+ Real,
60
+ Reals,
61
+ RealSort,
62
+ RealVal,
63
+ Repeat,
64
+ RotateLeft,
65
+ RotateRight,
66
+ SDiv,
67
+ Select,
68
+ SignExt,
69
+ SMod,
70
+ Solver,
71
+ SolveResult,
72
+ Sort,
73
+ SRem,
74
+ Store,
75
+ Sum,
76
+ ToReal,
77
+ UDiv,
78
+ URem,
79
+ Xor,
80
+ ZeroExt,
81
+ default_context,
82
+ reset_default_context,
83
+ set_default_context,
84
+ )
85
+
86
+ __all__ = [
87
+ "SAT",
88
+ "UGE",
89
+ "UGT",
90
+ "ULE",
91
+ "ULT",
92
+ "UNKNOWN",
93
+ "UNSAT",
94
+ "And",
95
+ "App",
96
+ "Array",
97
+ "ArraySort",
98
+ "BitVec",
99
+ "BitVecSort",
100
+ "BitVecVal",
101
+ "BitVecs",
102
+ "Bool",
103
+ "BoolSort",
104
+ "BoolVal",
105
+ "Bools",
106
+ "BoundVar",
107
+ "Concat",
108
+ "Const",
109
+ "Constant",
110
+ "Constants",
111
+ "Context",
112
+ "DeclareSort",
113
+ "Distinct",
114
+ "Eq",
115
+ "Exists",
116
+ "Expr",
117
+ "Extract",
118
+ "ForAll",
119
+ "FuncDecl",
120
+ "FuncInterp",
121
+ "Function",
122
+ "If",
123
+ "Implies",
124
+ "Int",
125
+ "IntSort",
126
+ "IntVal",
127
+ "Ints",
128
+ "K",
129
+ "LShR",
130
+ "Model",
131
+ "MultiPattern",
132
+ "Not",
133
+ "Or",
134
+ "Quantifier",
135
+ "Real",
136
+ "RealSort",
137
+ "RealVal",
138
+ "Reals",
139
+ "Repeat",
140
+ "RotateLeft",
141
+ "RotateRight",
142
+ "SDiv",
143
+ "SMod",
144
+ "SRem",
145
+ "Select",
146
+ "SignExt",
147
+ "SolveResult",
148
+ "Solver",
149
+ "Sort",
150
+ "Store",
151
+ "Sum",
152
+ "ToReal",
153
+ "UDiv",
154
+ "URem",
155
+ "Xor",
156
+ "ZeroExt",
157
+ "default_context",
158
+ "reset_default_context",
159
+ "set_default_context",
160
+ ]
unsat/__main__.py ADDED
@@ -0,0 +1,11 @@
1
+ """Allow running the CLI via ``python -m unsat``.
2
+
3
+ Delegates exclusively to ``unsat.cli:main``.
4
+
5
+ Depends on: ``cli``.
6
+ """
7
+
8
+ from unsat.cli import main
9
+
10
+ if __name__ == "__main__":
11
+ raise SystemExit(main())