python-sat 1.9.dev21__cp315-cp315-win_amd64.whl → 1.9.dev22__cp315-cp315-win_amd64.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 (27) hide show
  1. pycard.cp315-win_amd64.pyd +0 -0
  2. pyformula.cp315-win_amd64.pyd +0 -0
  3. pysat/__init__.py +1 -1
  4. pysat/engines.py +20 -10
  5. pysolvers.cp315-win_amd64.pyd +0 -0
  6. python_sat-1.9.dev22.dist-info/DELVEWHEEL +2 -0
  7. {python_sat-1.9.dev21.dist-info → python_sat-1.9.dev22.dist-info}/METADATA +1 -1
  8. {python_sat-1.9.dev21.dist-info → python_sat-1.9.dev22.dist-info}/RECORD +26 -26
  9. python_sat-1.9.dev21.dist-info/DELVEWHEEL +0 -2
  10. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/platlib/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll +0 -0
  11. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/approxmc.py +0 -0
  12. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/bbscan.py +0 -0
  13. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/bica.py +0 -0
  14. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/fm.py +0 -0
  15. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/genhard.py +0 -0
  16. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/lbx.py +0 -0
  17. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/lsu.py +0 -0
  18. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/mcsls.py +0 -0
  19. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/models.py +0 -0
  20. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/musx.py +0 -0
  21. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/optux.py +0 -0
  22. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/primer.py +0 -0
  23. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/rc2.py +0 -0
  24. {python_sat-1.9.dev21.data → python_sat-1.9.dev22.data}/scripts/unigen.py +0 -0
  25. {python_sat-1.9.dev21.dist-info → python_sat-1.9.dev22.dist-info}/WHEEL +0 -0
  26. {python_sat-1.9.dev21.dist-info → python_sat-1.9.dev22.dist-info}/licenses/LICENSE.txt +0 -0
  27. {python_sat-1.9.dev21.dist-info → python_sat-1.9.dev22.dist-info}/top_level.txt +0 -0
Binary file
Binary file
pysat/__init__.py CHANGED
@@ -22,7 +22,7 @@ del _delvewheel_patch_1_13_2
22
22
 
23
23
  # current version
24
24
  #==============================================================================
25
- VERSION = (1, 9, 'dev', 21)
25
+ VERSION = (1, 9, 'dev', 22)
26
26
 
27
27
 
28
28
  # PEP440 Format
pysat/engines.py CHANGED
@@ -141,7 +141,7 @@ class LinearConstraint:
141
141
  Constraint initialiser.
142
142
  """
143
143
 
144
- if not weights or type(weights) == dict:
144
+ if not weights or isinstance(weights, dict):
145
145
  # the same literal may appear multiple times in the list
146
146
  # so we need to calculate it's actual weight
147
147
  cntr = Counter(lits)
@@ -378,7 +378,7 @@ class ParityConstraint:
378
378
  for lit in lits:
379
379
  if lit < 0:
380
380
  lit = -lit
381
- value ^= value
381
+ value ^= 1
382
382
  self.lits.append(lit)
383
383
 
384
384
  # right-hand side, current value, and variable counter
@@ -1038,6 +1038,9 @@ class BooleanEngine(Propagator):
1038
1038
 
1039
1039
  # forward simplification
1040
1040
  for i, csi in enumerate(self.xors):
1041
+ if not csi.lits: # eliminated as redundant (0 = 0)
1042
+ continue
1043
+
1041
1044
  v = csi.lits[0] # pivot variable
1042
1045
 
1043
1046
  # going over all the other constraints and eliminating the pivot
@@ -1091,6 +1094,13 @@ class BooleanEngine(Propagator):
1091
1094
  Update the propagator's state given a new assignment.
1092
1095
  """
1093
1096
 
1097
+ if fixed:
1098
+ self.fixed[abs(lit)] = True
1099
+
1100
+ # the solver may notify us again when an assigned literal gets fixed
1101
+ if self.level[abs(lit)] is not None:
1102
+ return
1103
+
1094
1104
  self.level[abs(lit)] = self.decision_level
1095
1105
 
1096
1106
  if self.qhead is None:
@@ -1100,9 +1110,6 @@ class BooleanEngine(Propagator):
1100
1110
 
1101
1111
  self.trail.append(lit)
1102
1112
 
1103
- if fixed:
1104
- self.fixed[abs(lit)] = True
1105
-
1106
1113
  def on_new_level(self):
1107
1114
  """
1108
1115
  Keep track of decision level updates.
@@ -1116,6 +1123,8 @@ class BooleanEngine(Propagator):
1116
1123
  Cancel all the decisions up to a certain level.
1117
1124
  """
1118
1125
 
1126
+ cursor = self.qhead
1127
+
1119
1128
  # undoing the assignments
1120
1129
  while len(self.trlim) > to:
1121
1130
  while len(self.trail) > self.trlim[-1]:
@@ -1142,8 +1151,8 @@ class BooleanEngine(Propagator):
1142
1151
  # updating decision level
1143
1152
  self.decision_level = to
1144
1153
 
1145
- # updating queue head
1146
- self.qhead = None
1154
+ # updating queue head (some assignments have not been processed)
1155
+ self.qhead = min(cursor if cursor is not None else 0, len(self.trail))
1147
1156
 
1148
1157
  def check_model(self, model):
1149
1158
  """
@@ -1204,8 +1213,9 @@ class BooleanEngine(Propagator):
1204
1213
  lit = self.trail[self.qhead]
1205
1214
 
1206
1215
  # if we have just propagated an opposite value,
1207
- # we stop and expect conflict analysis to be performed
1216
+ # this is a conflict that needs proper treatment
1208
1217
  if self.origin[-lit] is not None:
1218
+ result.append(-lit)
1209
1219
  break
1210
1220
 
1211
1221
  self.value[abs(lit)] = lit # actually setting the value
@@ -1277,7 +1287,7 @@ class BooleanEngine(Propagator):
1277
1287
 
1278
1288
  if nid is not None:
1279
1289
  # this one has a negative counterpart
1280
- if pid < len(self.wlst[lit]):
1290
+ if pid < len(self.wlst[lit]) and isinstance(self.wlst[lit][pid], ParityConstraint):
1281
1291
  # and it's affected
1282
1292
  self.wlst[lit][pid].wopp[-lit] = pid
1283
1293
 
@@ -1288,7 +1298,7 @@ class BooleanEngine(Propagator):
1288
1298
  self.wlst[-lit][nid] = self.wlst[-lit][-1]
1289
1299
  self.wlst[-lit].pop()
1290
1300
 
1291
- if nid < len(self.wlst[-lit]):
1301
+ if nid < len(self.wlst[-lit]) and isinstance(self.wlst[-lit][nid], ParityConstraint):
1292
1302
  self.wlst[-lit][nid].wopp[lit] = nid
1293
1303
 
1294
1304
  def provide_reason(self, lit):
Binary file
@@ -0,0 +1,2 @@
1
+ Version: 1.13.2
2
+ Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-aoldlhez\\cp315-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-aoldlhez\\cp315-win_amd64\\repaired_wheel', '-v', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-aoldlhez\\cp315-win_amd64\\built_wheel\\python_sat-1.9.dev22-cp315-cp315-win_amd64.whl']
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-sat
3
- Version: 1.9.dev21
3
+ Version: 1.9.dev22
4
4
  Summary: A Python library for prototyping with SAT oracles
5
5
  Home-page: https://github.com/pysathq/pysat
6
6
  Author: Alexey Ignatiev, Joao Marques-Silva, Antonio Morgado
@@ -1,8 +1,8 @@
1
- pycard.cp315-win_amd64.pyd,sha256=xvNvX969Gbsf-i_J3gstag2q0GJQk1dnUKnpeGc16co,77312
2
- pyformula.cp315-win_amd64.pyd,sha256=d9kuLnGCu18vHzxAAbVrHA0oV_XyAdJXXgOw0GYv4mA,33792
3
- pysolvers.cp315-win_amd64.pyd,sha256=m-wD6Augo5yKLRfSJ-aHAZjoMOhoftr5SLjwbUibCRc,3663360
1
+ pycard.cp315-win_amd64.pyd,sha256=tef7CM3MyAIB0svbhn20WpE_xsIcCjBLDF0xNy4kdJE,77312
2
+ pyformula.cp315-win_amd64.pyd,sha256=jVWzixCKAeF-ZNecwRm2YUqDsJXklovIb5euB_9EceQ,33792
3
+ pysolvers.cp315-win_amd64.pyd,sha256=Pvzd9Dj4MBKmTGsk4DtSyxLJN4qrv1BGyag8JsguqMU,3663360
4
4
  pysat/card.py,sha256=JufbOKVdVrxABb3oKci3869eQytso58gLTqISac4H58,39252
5
- pysat/engines.py,sha256=K4B9HrI6ni3qN9EW6siXhYZ6Gows5Z0ReQvl4Ks_-p0,47692
5
+ pysat/engines.py,sha256=G3hAOFuqc_GGf8ow5gKRLvNh48jiLInnQtIZSRwYuhs,48202
6
6
  pysat/formula.py,sha256=GCTvBA9TI7Q2klIaa6R1Suz2IwilNK4-31o8ADLXJaE,221485
7
7
  pysat/integer.py,sha256=McihZOmelBRKfw6Ng0A86_D_vLbXSvxla05tVWNyowk,99859
8
8
  pysat/pb.py,sha256=DjsHXwu5TG1FSbHg11DOV7kyZvtXHxknwHIL-z7udxQ,17974
@@ -10,7 +10,7 @@ pysat/process.py,sha256=W0_Sm5rqas0SwZd5KgTuB35j2dA-WCg1Y4yqmIwLA9U,16255
10
10
  pysat/solvers.py,sha256=RTmMGLW6jeA0zOTzJWRpHTQEI1lLZAVHOg7w5BbysqI,332387
11
11
  pysat/_fileio.py,sha256=FxmRrrmCDay-2Guhdy0YhDlmVDAsCNaqfHzz18n_O5I,6924
12
12
  pysat/_utils.py,sha256=8mNX5XUKd9Bha99-jfvYgX2z2_CsE9z0DdEXCScSdCE,1398
13
- pysat/__init__.py,sha256=u6jC4wotdwtlBgLvhzHgKt-Xu4XfY_FhnLQNGoDSumQ,1018
13
+ pysat/__init__.py,sha256=XG9iEubRItEdWdIvVpLAuEouzOynzprhtFWYtKRhS20,1018
14
14
  pysat/allies/approxmc.py,sha256=OV2nCeOKN69wXzGwHS9MH7exxYKW3wjMCwLD3GQ0Xqg,13971
15
15
  pysat/allies/unigen.py,sha256=d3uMDKiJzA7RLwfuZL4aniYbHPo28SqQd-h3jpmoOxU,17153
16
16
  pysat/allies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -29,24 +29,24 @@ pysat/examples/primer.py,sha256=zSC3mx1I-t2yeo-Yn1bAK42rXi4VtFIgSJT-oiozUiU,2399
29
29
  pysat/examples/rc2.py,sha256=OkGxvQ8ufZME1GlDjmxB55hVHT5J526TWIncEBMWkn8,81083
30
30
  pysat/examples/usage.py,sha256=9IBfW4lBHoZVBEFURW73jhc12zSeFg8_-to9o3gc5nM,2246
31
31
  pysat/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- python_sat-1.9.dev21.data/platlib/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll,sha256=pMIim9wqKmMKzcCVtNhgCOXD47x3cxdDVPPaT1vrnN4,575056
33
- python_sat-1.9.dev21.data/scripts/approxmc.py,sha256=h6aMnSpIaYXkTMq-tCSzNWwKb0AG-vTH4vuLWGn5Q4s,13958
34
- python_sat-1.9.dev21.data/scripts/bbscan.py,sha256=xGxklG6Gc_UBaM8QvEJDOtQhEamxAncfsd65E-0JcAc,22696
35
- python_sat-1.9.dev21.data/scripts/bica.py,sha256=659K6gdRBgYeNiLjQc_VnulXhbTHxnUljNYhXx-frwk,28413
36
- python_sat-1.9.dev21.data/scripts/fm.py,sha256=ek1QDsuxiq1zm1PBLbrSXXEE89RP9_DYwVNnyB3eO4s,18650
37
- python_sat-1.9.dev21.data/scripts/genhard.py,sha256=YswufT272W4xTJrSBlOC2ucJx4RK4ntfRv73rASrx30,19520
38
- python_sat-1.9.dev21.data/scripts/lbx.py,sha256=1wAyfFjQQkhHte1OnSVhJviVmSEwWc0DaLro8fs6eik,24083
39
- python_sat-1.9.dev21.data/scripts/lsu.py,sha256=EpXQCu8ZdYoNgi70Uc1b8drOwp1fo82mhGbpjonjIzw,16687
40
- python_sat-1.9.dev21.data/scripts/mcsls.py,sha256=wetecyPhjfgu-jkjoZ4nrg3PiR2tCtLWLnQeiDCX5UU,22899
41
- python_sat-1.9.dev21.data/scripts/models.py,sha256=UmMmklExzyXAIhh-0i038nQb7hTK6CbdV1M6m2GxxSI,5917
42
- python_sat-1.9.dev21.data/scripts/musx.py,sha256=LwK10YuQ8pIf1TJwp0HKp54O0hdk8zBy3TIfGsF1yW0,11277
43
- python_sat-1.9.dev21.data/scripts/optux.py,sha256=9-4ynzXVYq7y67vy-emMbMx_gSlOBMDBX4VWkjSyHgE,30508
44
- python_sat-1.9.dev21.data/scripts/primer.py,sha256=iE9Vy0XyeySIY-7-L_VMwRahsIVCEmm9k04OhLwDvuw,23982
45
- python_sat-1.9.dev21.data/scripts/rc2.py,sha256=vIzgJEHSleKl45B_eENP31avWORuhaP5ogbLbf_N1HY,81070
46
- python_sat-1.9.dev21.data/scripts/unigen.py,sha256=e-HC2UxWA8MTN90VslkHX1ZlTPjdhI4etzkn6G8YAX4,17140
47
- python_sat-1.9.dev21.dist-info/DELVEWHEEL,sha256=4dIXObG4FoGyrwrGR93jfJeqXyoqVTQX-AYDhxlpuvU,413
48
- python_sat-1.9.dev21.dist-info/METADATA,sha256=bYprHqRIHNVa5DV2wUJbFAVoddVEPjO6Cvak6w839kI,1854
49
- python_sat-1.9.dev21.dist-info/RECORD,,
50
- python_sat-1.9.dev21.dist-info/top_level.txt,sha256=0SLg3yVqNpeiqOwFcAo3OxXhqAnflCmb5Fjl6gsl-Do,33
51
- python_sat-1.9.dev21.dist-info/WHEEL,sha256=0gLwYZa0C2fhgCxWR2c8HahwUiopqonVCV0wVwEg6fE,101
52
- python_sat-1.9.dev21.dist-info/licenses/LICENSE.txt,sha256=q-8zFb06i-6m_ueuQhkc1J4Ew2QByvODVIgm6fZYdTY,1130
32
+ python_sat-1.9.dev22.data/platlib/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll,sha256=pMIim9wqKmMKzcCVtNhgCOXD47x3cxdDVPPaT1vrnN4,575056
33
+ python_sat-1.9.dev22.data/scripts/approxmc.py,sha256=h6aMnSpIaYXkTMq-tCSzNWwKb0AG-vTH4vuLWGn5Q4s,13958
34
+ python_sat-1.9.dev22.data/scripts/bbscan.py,sha256=xGxklG6Gc_UBaM8QvEJDOtQhEamxAncfsd65E-0JcAc,22696
35
+ python_sat-1.9.dev22.data/scripts/bica.py,sha256=659K6gdRBgYeNiLjQc_VnulXhbTHxnUljNYhXx-frwk,28413
36
+ python_sat-1.9.dev22.data/scripts/fm.py,sha256=ek1QDsuxiq1zm1PBLbrSXXEE89RP9_DYwVNnyB3eO4s,18650
37
+ python_sat-1.9.dev22.data/scripts/genhard.py,sha256=YswufT272W4xTJrSBlOC2ucJx4RK4ntfRv73rASrx30,19520
38
+ python_sat-1.9.dev22.data/scripts/lbx.py,sha256=1wAyfFjQQkhHte1OnSVhJviVmSEwWc0DaLro8fs6eik,24083
39
+ python_sat-1.9.dev22.data/scripts/lsu.py,sha256=EpXQCu8ZdYoNgi70Uc1b8drOwp1fo82mhGbpjonjIzw,16687
40
+ python_sat-1.9.dev22.data/scripts/mcsls.py,sha256=wetecyPhjfgu-jkjoZ4nrg3PiR2tCtLWLnQeiDCX5UU,22899
41
+ python_sat-1.9.dev22.data/scripts/models.py,sha256=UmMmklExzyXAIhh-0i038nQb7hTK6CbdV1M6m2GxxSI,5917
42
+ python_sat-1.9.dev22.data/scripts/musx.py,sha256=LwK10YuQ8pIf1TJwp0HKp54O0hdk8zBy3TIfGsF1yW0,11277
43
+ python_sat-1.9.dev22.data/scripts/optux.py,sha256=9-4ynzXVYq7y67vy-emMbMx_gSlOBMDBX4VWkjSyHgE,30508
44
+ python_sat-1.9.dev22.data/scripts/primer.py,sha256=iE9Vy0XyeySIY-7-L_VMwRahsIVCEmm9k04OhLwDvuw,23982
45
+ python_sat-1.9.dev22.data/scripts/rc2.py,sha256=vIzgJEHSleKl45B_eENP31avWORuhaP5ogbLbf_N1HY,81070
46
+ python_sat-1.9.dev22.data/scripts/unigen.py,sha256=e-HC2UxWA8MTN90VslkHX1ZlTPjdhI4etzkn6G8YAX4,17140
47
+ python_sat-1.9.dev22.dist-info/DELVEWHEEL,sha256=OVayoru_cuO5FCImHSOpRh8ZXCELyBN41oehf3dMm_8,413
48
+ python_sat-1.9.dev22.dist-info/METADATA,sha256=_U0sZZ114kavqtqiooA_JEYZg9-B7ZfFHSsnoLzEWrE,1854
49
+ python_sat-1.9.dev22.dist-info/RECORD,,
50
+ python_sat-1.9.dev22.dist-info/top_level.txt,sha256=0SLg3yVqNpeiqOwFcAo3OxXhqAnflCmb5Fjl6gsl-Do,33
51
+ python_sat-1.9.dev22.dist-info/WHEEL,sha256=0gLwYZa0C2fhgCxWR2c8HahwUiopqonVCV0wVwEg6fE,101
52
+ python_sat-1.9.dev22.dist-info/licenses/LICENSE.txt,sha256=q-8zFb06i-6m_ueuQhkc1J4Ew2QByvODVIgm6fZYdTY,1130
@@ -1,2 +0,0 @@
1
- Version: 1.13.2
2
- Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-_8pjchug\\cp315-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-_8pjchug\\cp315-win_amd64\\repaired_wheel', '-v', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-_8pjchug\\cp315-win_amd64\\built_wheel\\python_sat-1.9.dev21-cp315-cp315-win_amd64.whl']