PySMT 0.9.7.dev474__py2.py3-none-any.whl → 0.9.7.dev477__py2.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.
- pysmt/__init__.py +1 -1
- pysmt/smtlib/parser/parser.py +4 -0
- pysmt/test/smtlib/test_model_validation.py +23 -0
- {pysmt-0.9.7.dev474.dist-info → pysmt-0.9.7.dev477.dist-info}/METADATA +1 -1
- {pysmt-0.9.7.dev474.dist-info → pysmt-0.9.7.dev477.dist-info}/RECORD +10 -10
- {pysmt-0.9.7.dev474.dist-info → pysmt-0.9.7.dev477.dist-info}/WHEEL +0 -0
- {pysmt-0.9.7.dev474.dist-info → pysmt-0.9.7.dev477.dist-info}/entry_points.txt +0 -0
- {pysmt-0.9.7.dev474.dist-info → pysmt-0.9.7.dev477.dist-info}/licenses/LICENSE +0 -0
- {pysmt-0.9.7.dev474.dist-info → pysmt-0.9.7.dev477.dist-info}/licenses/NOTICE +0 -0
- {pysmt-0.9.7.dev474.dist-info → pysmt-0.9.7.dev477.dist-info}/top_level.txt +0 -0
pysmt/__init__.py
CHANGED
|
@@ -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", 477)
|
|
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
|
pysmt/smtlib/parser/parser.py
CHANGED
|
@@ -561,6 +561,10 @@ class SmtLibParser(object):
|
|
|
561
561
|
return res
|
|
562
562
|
stack[-1].append(handler)
|
|
563
563
|
else:
|
|
564
|
+
# pySMT binds one type per symbol name, but SMT-LIB model values
|
|
565
|
+
# reuse the same @name across sorts, so we qualify it with the sort
|
|
566
|
+
if what.startswith('@'):
|
|
567
|
+
what += "_" + str(ty)
|
|
564
568
|
def handler():
|
|
565
569
|
return self.env.formula_manager.Symbol(what, ty)
|
|
566
570
|
stack[-1].append(handler)
|
|
@@ -97,6 +97,29 @@ class TestModelValidation(TestCase):
|
|
|
97
97
|
simp = simplifier.simplify(formula.substitute(model, interpretations))
|
|
98
98
|
self.assertEqual(simp, self.fm.TRUE())
|
|
99
99
|
|
|
100
|
+
def test_same_value_name_different_sorts(self):
|
|
101
|
+
# SMT-COMP/postprocessors#10: solvers reuse @0 across sorts
|
|
102
|
+
model_source ="""\
|
|
103
|
+
(model
|
|
104
|
+
(define-fun a () U (as @0 U))
|
|
105
|
+
(define-fun c () U (as @1 U))
|
|
106
|
+
(define-fun b () V (as @0 V))
|
|
107
|
+
(define-fun d () V (as @0 V))
|
|
108
|
+
)
|
|
109
|
+
"""
|
|
110
|
+
U = self.tm.Type('U', 0)
|
|
111
|
+
V = self.tm.Type('V', 0)
|
|
112
|
+
a = self.fm.Symbol('a', U)
|
|
113
|
+
b = self.fm.Symbol('b', V)
|
|
114
|
+
c = self.fm.Symbol('c', U)
|
|
115
|
+
d = self.fm.Symbol('d', V)
|
|
116
|
+
formula = self.fm.And(self.fm.Not(self.fm.Equals(a, c)),
|
|
117
|
+
self.fm.Equals(b, d))
|
|
118
|
+
|
|
119
|
+
model, interpretations = SmtLibParser().parse_model(StringIO(model_source))
|
|
120
|
+
simp = SmtLibModelValidationSimplifier(self.env).simplify(
|
|
121
|
+
formula.substitute(model, interpretations))
|
|
122
|
+
self.assertEqual(simp, self.fm.TRUE())
|
|
100
123
|
|
|
101
124
|
|
|
102
125
|
if __name__ == '__main__':
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pysmt/__init__.py,sha256=
|
|
1
|
+
pysmt/__init__.py,sha256=D4wKbKbyKykOKhdJR9zJPcu0mML4q9kKVXFpLzvfvxc,1701
|
|
2
2
|
pysmt/__main__.py,sha256=rR-MV1QtLYqtVoJyY3m5B5Iz-lua0-5o6YSB0W4lKy8,1085
|
|
3
3
|
pysmt/configuration.py,sha256=Iq_46QZ9z_jpBMk76euJWTqGEwHad2qyiEDPix5sXsA,4538
|
|
4
4
|
pysmt/constants.py,sha256=pulb6NvROY_X8BePeyyX8T9MJLB79HZ_1FUYSlZ7Jfg,5769
|
|
@@ -50,7 +50,7 @@ pysmt/smtlib/script.py,sha256=S3HIWTqRTckTEDIp1KFkYy69yC65hbqSKbbIYUroAZs,24630
|
|
|
50
50
|
pysmt/smtlib/solver.py,sha256=bvJVut5vrreqe_gM7a8qY3re9l12jwxoe03W1SSvaUk,8109
|
|
51
51
|
pysmt/smtlib/utils.py,sha256=C-P8RPgR8RDRQnrB8xfLGc5aFso11u0sEtFw04NMbKQ,2126
|
|
52
52
|
pysmt/smtlib/parser/__init__.py,sha256=Pfdm6pv9hwOv8D9NbAaHEokDZXkRg3CwYLN5Ny7UNyY,5055
|
|
53
|
-
pysmt/smtlib/parser/parser.py,sha256=
|
|
53
|
+
pysmt/smtlib/parser/parser.py,sha256=pgxnUw_0vV43P4_2VpQawRk0I9WsWHqxH2V7lQBhaYg,69698
|
|
54
54
|
pysmt/solvers/__init__.py,sha256=JXBHtcb4Lv-Sb8whc9JuGbRH2EBLWwtLUh3PL9HhNE8,650
|
|
55
55
|
pysmt/solvers/bdd.py,sha256=tIW85N-iJbYUGCKucPhAsoXqo9G9bIcdBnCitzUmYTQ,15997
|
|
56
56
|
pysmt/solvers/btor.py,sha256=zRjBTwnEeXurHMDGVDpSmTI9Iw3IDlte-q8aS3_A-3w,26316
|
|
@@ -122,7 +122,7 @@ pysmt/test/smtlib/test_annotations.py,sha256=U2UVLgokS0nidsAvTnWy7JWA7dQzaxndmCT
|
|
|
122
122
|
pysmt/test/smtlib/test_fuzzed.py,sha256=pNKXmb57NO8hvBwo1yc1FbzATmgS0efaRTkEJs-jGGo,2190
|
|
123
123
|
pysmt/test/smtlib/test_generic_wrapper.py,sha256=UOVNZ8dWqUJNfNkFsXp0fz4CNMFvyblfPpUy1m2NQTk,7913
|
|
124
124
|
pysmt/test/smtlib/test_griggio.py,sha256=W8C5SWABwUeAQdnslQoU_6pxFokaz2cT5sAfJLo1cKw,2959
|
|
125
|
-
pysmt/test/smtlib/test_model_validation.py,sha256=
|
|
125
|
+
pysmt/test/smtlib/test_model_validation.py,sha256=sfWHILkTl_H3MzofSeYLrIYCCNeap7jzBCM6Ure9aJY,3942
|
|
126
126
|
pysmt/test/smtlib/test_omt_lib_solver.py,sha256=xZZWDSB0eDBsmzu7R8AqRN0fSCvFRW6x4Cq9MmTAfos,8177
|
|
127
127
|
pysmt/test/smtlib/test_parser_examples.py,sha256=fNRVEY3zy5NDTq1WyvAcliCwTHnosKQm-x8C7Fe6fpk,15782
|
|
128
128
|
pysmt/test/smtlib/test_parser_extensibility.py,sha256=MgEVUU-icDEryKh54sW9VC59e8CuC6Q_5Sw65FtxBgo,3933
|
|
@@ -143,10 +143,10 @@ pysmt/walkers/dag.py,sha256=hw9qUfadQTpihX685YQobfxKv9XA84ffiA8XRMUQEfU,5694
|
|
|
143
143
|
pysmt/walkers/generic.py,sha256=2oMr_MDr7FswSlyx2ulbJ9ke5FsTCKABURnCsMeg4fc,5093
|
|
144
144
|
pysmt/walkers/identitydag.py,sha256=EAxSneEW91Z8GphlkbMPsPdlac7_FDcVj-_6_aunU2s,10902
|
|
145
145
|
pysmt/walkers/tree.py,sha256=1vquhaChRMSG_pvbz16wqKOFnsQAkzLvjh_xbB3dg5c,2730
|
|
146
|
-
pysmt-0.9.7.
|
|
147
|
-
pysmt-0.9.7.
|
|
148
|
-
pysmt-0.9.7.
|
|
149
|
-
pysmt-0.9.7.
|
|
150
|
-
pysmt-0.9.7.
|
|
151
|
-
pysmt-0.9.7.
|
|
152
|
-
pysmt-0.9.7.
|
|
146
|
+
pysmt-0.9.7.dev477.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
147
|
+
pysmt-0.9.7.dev477.dist-info/licenses/NOTICE,sha256=Ns-Jsa6nbqZUiTEEAM6HqioSZIxQ2RCJzxoBlWQaUfc,601
|
|
148
|
+
pysmt-0.9.7.dev477.dist-info/METADATA,sha256=tdxWAclomTF5eGcgBisQL5Q0BhBBG3B9Sbjd_jSQmK0,1774
|
|
149
|
+
pysmt-0.9.7.dev477.dist-info/WHEEL,sha256=4YBfCYNH4wlLpv3pzq1hbEuIlXA4WJabKLFurZ7eTL0,109
|
|
150
|
+
pysmt-0.9.7.dev477.dist-info/entry_points.txt,sha256=gDc1XM0xTJJMDGC_nXd0kfbX-Omjke9Dn9F3awMLYIU,57
|
|
151
|
+
pysmt-0.9.7.dev477.dist-info/top_level.txt,sha256=NwHQbpTaZMEvjIUdC0bvvj-WUyULe-nt-opK3YQNRMk,6
|
|
152
|
+
pysmt-0.9.7.dev477.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|