PySMT 0.9.7.dev139__py2.py3-none-any.whl → 0.9.7.dev337__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.
Files changed (55) hide show
  1. {PySMT-0.9.7.dev139.dist-info → PySMT-0.9.7.dev337.dist-info}/METADATA +1 -1
  2. {PySMT-0.9.7.dev139.dist-info → PySMT-0.9.7.dev337.dist-info}/RECORD +55 -40
  3. pysmt/__init__.py +1 -1
  4. pysmt/cmd/check_version.py +11 -3
  5. pysmt/cmd/install.py +5 -2
  6. pysmt/cmd/installers/__init__.py +2 -0
  7. pysmt/cmd/installers/cvcfive.py +0 -1
  8. pysmt/cmd/installers/optimsat.py +89 -0
  9. pysmt/cmd/shell.py +61 -24
  10. pysmt/configuration.py +1 -1
  11. pysmt/decorators.py +1 -1
  12. pysmt/exceptions.py +45 -0
  13. pysmt/factory.py +158 -38
  14. pysmt/fnode.py +2 -8
  15. pysmt/formula.py +30 -8
  16. pysmt/optimization/__init__.py +17 -0
  17. pysmt/optimization/goal.py +267 -0
  18. pysmt/optimization/msat.py +26 -0
  19. pysmt/optimization/optimizer.py +716 -0
  20. pysmt/optimization/optimsat.py +287 -0
  21. pysmt/optimization/yices.py +26 -0
  22. pysmt/optimization/z3.py +178 -0
  23. pysmt/shortcuts.py +10 -1
  24. pysmt/smtlib/commands.py +18 -1
  25. pysmt/smtlib/parser/parser.py +242 -132
  26. pysmt/smtlib/printers.py +2 -2
  27. pysmt/smtlib/script.py +259 -59
  28. pysmt/solvers/dynmsat.py +66 -0
  29. pysmt/solvers/eager.py +3 -2
  30. pysmt/solvers/msat.py +392 -373
  31. pysmt/solvers/solver.py +1 -1
  32. pysmt/solvers/z3.py +61 -5
  33. pysmt/substituter.py +2 -2
  34. pysmt/test/__init__.py +15 -0
  35. pysmt/test/omt_examples.py +302 -0
  36. pysmt/test/optimization_utils.py +305 -0
  37. pysmt/test/smtlib/parser_utils.py +128 -6
  38. pysmt/test/smtlib/test_annotations.py +4 -2
  39. pysmt/test/smtlib/test_omt_lib_solver.py +359 -0
  40. pysmt/test/smtlib/test_parser_omt.py +144 -0
  41. pysmt/test/smtlib/test_smtlibscript.py +5 -4
  42. pysmt/test/test_cnf.py +1 -1
  43. pysmt/test/test_configuration.py +2 -4
  44. pysmt/test/test_env.py +3 -4
  45. pysmt/test/test_formula.py +14 -0
  46. pysmt/test/test_imports.py +1 -1
  47. pysmt/test/test_nlira.py +1 -1
  48. pysmt/test/test_optimization.py +607 -0
  49. pysmt/test/test_optimizing.py +50 -0
  50. pysmt/test/test_unsat_cores.py +1 -1
  51. {PySMT-0.9.7.dev139.dist-info → PySMT-0.9.7.dev337.dist-info}/LICENSE +0 -0
  52. {PySMT-0.9.7.dev139.dist-info → PySMT-0.9.7.dev337.dist-info}/NOTICE +0 -0
  53. {PySMT-0.9.7.dev139.dist-info → PySMT-0.9.7.dev337.dist-info}/WHEEL +0 -0
  54. {PySMT-0.9.7.dev139.dist-info → PySMT-0.9.7.dev337.dist-info}/entry_points.txt +0 -0
  55. {PySMT-0.9.7.dev139.dist-info → PySMT-0.9.7.dev337.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySMT
3
- Version: 0.9.7.dev139
3
+ Version: 0.9.7.dev337
4
4
  Summary: A solver-agnostic library for SMT Formulae manipulation and solving
5
5
  Home-page: http://www.pysmt.org
6
6
  Author: PySMT Team
@@ -1,82 +1,93 @@
1
- pysmt/__init__.py,sha256=TInSxfWcyOvOjWolifr5wkcgO_x3CexLgUIQtJ1qrCg,1598
1
+ pysmt/__init__.py,sha256=4qoWpE_YchHcFrvD6jeWloG3_PgCmssRGEMDiaBtTtY,1598
2
2
  pysmt/__main__.py,sha256=rR-MV1QtLYqtVoJyY3m5B5Iz-lua0-5o6YSB0W4lKy8,1085
3
- pysmt/configuration.py,sha256=q4Ncd6f2d0VZUpyQAOR8sTPlTodgDnYhUBeRgYYXqTE,4539
3
+ pysmt/configuration.py,sha256=Iq_46QZ9z_jpBMk76euJWTqGEwHad2qyiEDPix5sXsA,4538
4
4
  pysmt/constants.py,sha256=QelM9r5fGWSq8UNjjYoEJK2FaLHRr4Z9NZxzjeajEWA,5249
5
- pysmt/decorators.py,sha256=hBIKVkHlT0QD7H5yGmJIqn2MOafAZM-S2wPLvS2eB4c,3964
5
+ pysmt/decorators.py,sha256=DWX6JrQ0BTp-COFKeFW9szBuQzoaauqcNO18Yps2KXQ,3965
6
6
  pysmt/environment.py,sha256=rdaxQ0uwmMPmcW4d5WnTYAyHNSCpRTgzRLaXQccG5-4,6522
7
- pysmt/exceptions.py,sha256=uG3FochPO1Y18cv1lXUjQtNbW-qZKd68zqs8oo2OEF4,4420
8
- pysmt/factory.py,sha256=6QFbob7LV3x8uT4w2nG_rHqXWCqbwNg5oCUMPhpnwmY,24107
9
- pysmt/fnode.py,sha256=zKZP4yda8JxK6AXW3vCasRLYsLH5NzK_2Bjiy5ogtqo,33256
10
- pysmt/formula.py,sha256=gmK3b9481aI6rvHJTPZVOsw-YsIBFpeqKZ1-gdWHE2k,43371
7
+ pysmt/exceptions.py,sha256=P11C4a9CedUbHNTa1V2YJ1nfxpfUw4eH1smHCgoUYl4,5570
8
+ pysmt/factory.py,sha256=zaFtDQ1elODdimIzMZ12BIOK_g02ISIAK86_guBYDYo,29420
9
+ pysmt/fnode.py,sha256=ZHqr09GQAmgQP7r27kpCNBbDYeeI4WFJYIsDEmHIwNA,32927
10
+ pysmt/formula.py,sha256=OklEfVvzYGq3S1uL9HPxcohLYxMhCCDfrQ4tsQaFGKk,44243
11
11
  pysmt/logics.py,sha256=yJ1Yv24dVj4LlpnbspgcRT1t5e65RmvGas_bdHOGCAA,28774
12
12
  pysmt/operators.py,sha256=RU4H9E5eVjPgAar_9hIoCexq-Yc5v0xdHAMM69FcYX8,8132
13
13
  pysmt/oracles.py,sha256=lfRbPoiX4SXuJZktwmKUqA1FJ-7lRyP49LRIH8C7VoQ,19461
14
14
  pysmt/parsing.py,sha256=cT2cEgm31_3au4xD-F3_QvXtvq5aVHaEBbLWB17OKZY,20729
15
15
  pysmt/printers.py,sha256=ZtV0j7jVcOGJxzKELtKJIJh1T6m_4xv1dc_3lwinHbs,13389
16
16
  pysmt/rewritings.py,sha256=e0sgEhw5NHHLFAm6AMBk2mdncLiep2FTvVnHpUITz4U,33379
17
- pysmt/shortcuts.py,sha256=p-xDS69rMr_uDoBoVzXYJuXdyBWbMxb3JAeLjfcvY1U,39378
17
+ pysmt/shortcuts.py,sha256=ic6deAlSZMi8g2FO0_m5u0Qh4Fr1TXng85uhqLS7ZTY,39675
18
18
  pysmt/simplifier.py,sha256=igDczAkE5f3ctDxN_Hh2iP54ZFj_ezKRucPtgrodGzo,41464
19
- pysmt/substituter.py,sha256=rzdZos9zYNzq3DSKFkLR2Gu6ktwBCjdPEPM48tIzUwk,13811
19
+ pysmt/substituter.py,sha256=_0-YAuiCEqHqDGPZ_MhVnn0bBw997uKxOTJd1ss3Lpo,13779
20
20
  pysmt/type_checker.py,sha256=g5Mbh42ZxsjtLHnS0qizYLZ3kH3bMtNkIuyiZtTuinE,13273
21
21
  pysmt/typing.py,sha256=GioU08mUxqsjFmmAYfBYj51mmJoBcFZDunc-t99QKng,17714
22
22
  pysmt/utils.py,sha256=t13jG-E8kQNxG_JmS79GDy3SnBohSobwjJTjZHFf3fE,2302
23
23
  pysmt/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- pysmt/cmd/check_version.py,sha256=yeY_USo11j60iLjpNcAvq5gAj2i43IiOWcP1dwJS3Rw,2352
25
- pysmt/cmd/install.py,sha256=DTo_ANANJwqz_uGla4fupOk_EHStyZxmLcOX1aRDDZQ,10294
26
- pysmt/cmd/shell.py,sha256=ww1juthvLnJQciVHWxYvTJaA5W3-Np0ORfESyePF0bI,4333
27
- pysmt/cmd/installers/__init__.py,sha256=nHJaEXfCpsEkzBy0NL91P9extUda6jb0u88nwPYTvGo,1170
24
+ pysmt/cmd/check_version.py,sha256=FOumRpuGF1ntqm70QHJqZ6JEKeEamGMY-lp5XOqhPlo,2688
25
+ pysmt/cmd/install.py,sha256=2p5o6hdqnejcNfF4nv0vmoi-wkCdaTCMLu5nL-GU9Hw,10468
26
+ pysmt/cmd/shell.py,sha256=7vfFcEYNBueQVeOEW7r38PdEfAdL71xby03BF7XR9ec,6112
27
+ pysmt/cmd/installers/__init__.py,sha256=sJiTL66cCauRGJ6axZMJzSKM8io5DTzbWHaUpggSL1Q,1255
28
28
  pysmt/cmd/installers/base.py,sha256=1usHiBHrIBam9BlbVKG-6F52KPsIkJBeghkd_ckh-8U,12811
29
29
  pysmt/cmd/installers/bdd.py,sha256=Qq8YlYAVvxUqNXjoOlH9_Lhj4cj6WEt7HuhbSiF_L6k,2539
30
30
  pysmt/cmd/installers/btor.py,sha256=gUl_urKcWtbSYS_Vde_O7RJM0H-kRqh6hceTju-Sbcs,4995
31
- pysmt/cmd/installers/cvcfive.py,sha256=PRSuEd2_y2qQO0G3gUGtCsKB2PMV40C1WwjpgbJkefE,1493
31
+ pysmt/cmd/installers/cvcfive.py,sha256=vWqAm5xF7IMY0JWEeyx3_ochCqyHx0dlcZBo9QcQ-uk,1460
32
32
  pysmt/cmd/installers/cvcfour.py,sha256=uBZkKIX4gZEMfjrhrparUSDydMcvGIGZM2Y8JYD0GzE,3916
33
33
  pysmt/cmd/installers/msat.py,sha256=hNz7TbqYrEg9I0vvkSaBiKdy4v8RxH8oXGhXQhgNIVU,5409
34
+ pysmt/cmd/installers/optimsat.py,sha256=ijbFb8dl0t4ruzVH1mrgKWWpxvRoN_1ROY4KlvroPv4,3908
34
35
  pysmt/cmd/installers/pico.py,sha256=XJpVbY5YHboL3OEMBvjwv8QwKdJ7Y62Blb78tEGyMxU,3141
35
36
  pysmt/cmd/installers/yices.py,sha256=M99P641jqGtAWOgQpAQzt4T1KwmSClw1VDEETzsSZe0,3010
36
37
  pysmt/cmd/installers/z3.py,sha256=5wP6O-a602-y1cuEyr22bkdWnOWHx8bIaPQ24xDtxX8,1386
38
+ pysmt/optimization/__init__.py,sha256=JXBHtcb4Lv-Sb8whc9JuGbRH2EBLWwtLUh3PL9HhNE8,650
39
+ pysmt/optimization/goal.py,sha256=DTSWtAJFMh7jIRO_lHdxdybx0jxFoanttQqFZGoi1sM,8089
40
+ pysmt/optimization/msat.py,sha256=yj5-vqxQFJnK3zjVlYpxemZ2BWG-6IrCTDKvjl94xNY,937
41
+ pysmt/optimization/optimizer.py,sha256=aoBs_7UI4rFQIU7a3ig9MBxuGRLk5oN5MCaYlk9lBFE,27253
42
+ pysmt/optimization/optimsat.py,sha256=rGhDPGb6yPyC1rzX6bd5QffbG45F6SxQqZtwndH9_N4,10232
43
+ pysmt/optimization/yices.py,sha256=Ly48G5JpnOhJBkd25Vg21jGcCjLEeEQUrWsG2Xxl_KI,931
44
+ pysmt/optimization/z3.py,sha256=SrrnfEWoqBU7OFhwX-DaaGQr4ECyxxaw3voRk2hF5wk,6397
37
45
  pysmt/smtlib/__init__.py,sha256=JXBHtcb4Lv-Sb8whc9JuGbRH2EBLWwtLUh3PL9HhNE8,650
38
46
  pysmt/smtlib/annotations.py,sha256=BKL6CbUTVFxT-PojRNetfcPtor9ExAOzcxng0Ic25-k,4167
39
- pysmt/smtlib/commands.py,sha256=RG0swe9N0r4i7TuiivjKbalm8pBeULDLd5TG9lAdy0U,1940
40
- pysmt/smtlib/printers.py,sha256=BmBtmG9O7xq10wVOKYOj70BkC2fr5lLh4QRBuM0qOn8,24559
41
- pysmt/smtlib/script.py,sha256=4tATsRYDavjz1DVKXzfVVZxVXYOtBRhh4Ya0Ng4XxHY,13387
47
+ pysmt/smtlib/commands.py,sha256=hwWnXrzZxJmKtkIitHRtuin01WDUErT0VERR9h45t2A,2277
48
+ pysmt/smtlib/printers.py,sha256=ukPQQ4srfFOqICTleK_Xkif5GnRHOqCy3nPnHbHg2_E,24573
49
+ pysmt/smtlib/script.py,sha256=0NnYQGAbKsHzlDjwwGaLCJWBU2DMaM3Zdt79J_Q2K-M,21873
42
50
  pysmt/smtlib/solver.py,sha256=dWBzYBuYDVyCsQI1KlqndxpqX4xHQUDcHAuefwbHv24,7987
43
51
  pysmt/smtlib/utils.py,sha256=XNp7mW1DB6cZRtQhkAOTR-xrwYaGDBEcF3Q-edKDeU8,2043
44
52
  pysmt/smtlib/parser/__init__.py,sha256=Tgl8AAjZPmCrABGmKRSC4Yu634mn8r22qn18M3u-pfk,4771
45
- pysmt/smtlib/parser/parser.py,sha256=r-MSGQAWvRLAH_kGm9SjWl1hpRh5N-7ziS8kUWUJR-A,58534
53
+ pysmt/smtlib/parser/parser.py,sha256=jkxVWYKJWtB5Bct_Warif_bgQmiRfPhJNOhWFhl55Iw,63614
46
54
  pysmt/solvers/__init__.py,sha256=JXBHtcb4Lv-Sb8whc9JuGbRH2EBLWwtLUh3PL9HhNE8,650
47
55
  pysmt/solvers/bdd.py,sha256=my3398_-8Rkqy1pluzZa7_12qsA43ARbs8-YAPqdMWs,15938
48
56
  pysmt/solvers/btor.py,sha256=2oT1PfXSGTSTPaXQUwVy0M799slSH2FJ-3QNb3YQmGw,25953
49
57
  pysmt/solvers/cvcfive.py,sha256=z8o4VxrZBC6sdb_JYTWfRS3BXdWJPznakN3k7rD4EY8,21073
50
58
  pysmt/solvers/cvcfour.py,sha256=odWm_MAgoPlhOf6gaarZQAqQS4fN-8PH-xGIYaiErQE,24538
51
- pysmt/solvers/eager.py,sha256=Py2_XaFj7YIOotH3Zv14JhmyLiZPTxKwzLuLztFqNIs,3297
59
+ pysmt/solvers/dynmsat.py,sha256=RenEJwWD8qLWECnyq141_0qbw1GGB5uYKvzJ18_Fgbk,1917
60
+ pysmt/solvers/eager.py,sha256=dyUHR6hmBcqn83NR4kFVhrpfneEpb9Uz4llP1fSaYs4,3374
52
61
  pysmt/solvers/interpolation.py,sha256=PYvn81xp5or_p3wE4-ReI5OMY06s7nzuNvM0zs9_XyI,1851
53
- pysmt/solvers/msat.py,sha256=34PJPLIMZZmrhtq1N-L3qm38cI_I0kBWe-K_xMeDb5Q,54967
62
+ pysmt/solvers/msat.py,sha256=dFCRx6uv-sw8gRquoJG94TVBykTWfvoL3BCpTdvN_Qw,57725
54
63
  pysmt/solvers/options.py,sha256=05L2GcydstFDUVqZ2JSUt45_9q2Z6_2PjCMJOvE8ka8,3837
55
64
  pysmt/solvers/pico.py,sha256=SyYF_0VVsL9oMIInuytF6F_qOalpctDCwuv-lTF2gzs,10630
56
65
  pysmt/solvers/portfolio.py,sha256=OrWMzlFugE9wsKSKGolwsB6atadkt0nE_3e3TGg-3k8,9160
57
66
  pysmt/solvers/qelim.py,sha256=Fjy54lbyIKahAzGajhaihXYQyYn97h83Ud2er-zjwcw,4822
58
67
  pysmt/solvers/smtlib.py,sha256=6gGq-UdCVrrdmliCNl2RByyn5qMqBtVVDP_sB2jXiQ8,8998
59
- pysmt/solvers/solver.py,sha256=lOOdtGKWaWdqQDLSUDS-GunZ60EeKJAYIVfmeimzuy0,17663
68
+ pysmt/solvers/solver.py,sha256=Me-0lvKcXV5PEL4N0wk2u7R1hGi-6JtlbdFNL-PimzM,17678
60
69
  pysmt/solvers/yices.py,sha256=ZU3iqj29oKnqDnDnPnfKvS1QBAGEMecrQgZ14qRsoUQ,24489
61
- pysmt/solvers/z3.py,sha256=_XMiY04kJVdpyfBSN8p5qPaEsCjZ60uBr4na55Vcq1k,40768
62
- pysmt/test/__init__.py,sha256=9YsAQOuHVQ4N8MzKN9U0eAfRjPiKBVH_D_xV1MJZjkg,4985
70
+ pysmt/solvers/z3.py,sha256=XE388MLsnd5lipftzB5laDy4fOMxUsDBVAp0jX_pUzM,42679
71
+ pysmt/test/__init__.py,sha256=IwYjp7mgUeozyYHb8D-lRiZKHUJ_srsAiyYttuSWbj0,5492
63
72
  pysmt/test/examples.py,sha256=XymEXLmIZxMtS9qTfzrXYbi4DBaMTgPzd_ijKh1H2aM,39485
73
+ pysmt/test/omt_examples.py,sha256=f1DKD3dtxWEsMRFYdj_ZLMR6vezP9rSTzmb83weux0Q,9583
74
+ pysmt/test/optimization_utils.py,sha256=z1z3cbfUbCeExylK1rnsiYR_NJTIUi3Z-OGH3y-7kwg,14266
64
75
  pysmt/test/test_array.py,sha256=OypmqKf_ciigxK1X_W2b9sm0EWOA3wqH376QXt7oGCM,6237
65
76
  pysmt/test/test_back.py,sha256=3O7XTx4WfuizjT7-yueZq6oGG-uqovkie7R3A5GklTk,3372
66
77
  pysmt/test/test_bdd.py,sha256=GsFiq0YQd3exbN9k2fCurKZlvDl3H2VAucYc9tKGKEc,6195
67
78
  pysmt/test/test_bv.py,sha256=-pnOgslpMAeK9US4f_z4CU8LK0ZmDr-yceS1u1kwgps,12284
68
79
  pysmt/test/test_bv_simplification.py,sha256=gbXcSyjM9I9Zxlu5n43a66fW3RomarP2_DEj6IzYQTc,14637
69
- pysmt/test/test_cnf.py,sha256=kkZHu70f-GI9JscHm1e2XYcsyEIz6vPAo-GVzArxxqA,4420
70
- pysmt/test/test_configuration.py,sha256=uyCmS8-cdeI844TGqmzHBlFPtHBJhT_mKrrWJUF0AN0,3757
80
+ pysmt/test/test_cnf.py,sha256=Kbfe6-WUv2fWXmVaxFSPi-B4hIO9AvLitZxMySCvfes,4434
81
+ pysmt/test/test_configuration.py,sha256=qlY1K2ap4BMoPmbANg2y3391ndr7EophNd_UZNAOUko,3661
71
82
  pysmt/test/test_constants.py,sha256=wdqc9duJ8Ykt1LCxy2CL3Mt_7Gal5-bCVL7QT5GHS3s,4618
72
83
  pysmt/test/test_cvc_quantifiers.py,sha256=a40NDyPKNynVpqq9M5pDTR8qFL_EumR8whw8escxP4I,1850
73
84
  pysmt/test/test_dwf.py,sha256=nQubO2IYjW3NnRjNz3xkhpXgK_5coZp9uZ_U-ElmFRw,2850
74
85
  pysmt/test/test_eager_model.py,sha256=hF9V8wQYXVeyW2Bo4sACa98xeJtfOMYjMvjWMHQaGag,3662
75
- pysmt/test/test_env.py,sha256=tshVfiKotjMUNXl0RCo7-itTnVJimWGPyMkuGHX_B6I,4118
86
+ pysmt/test/test_env.py,sha256=EWKo9trUeUWwusSlnpzxhRO1_zveX904QwQPqJ25iXY,4084
76
87
  pysmt/test/test_euf.py,sha256=B0VRx1NwfKZZIG5Fc6gYPj7G6gNWMzYJvgbh-2q2E28,3455
77
- pysmt/test/test_formula.py,sha256=8KEBOfXVPa-oiX7j95ZFs-PWNqUt78TCR8UCyNwZMYw,40039
88
+ pysmt/test/test_formula.py,sha256=L28iN8suvs4AwzusA_pBdhneRlT0VzcdandhZ3IR0zU,40502
78
89
  pysmt/test/test_hr_parsing.py,sha256=bi-iTu7y1C7diMcWsQ7EI40MipDbzTKbMGPnLWX85A8,3118
79
- pysmt/test/test_imports.py,sha256=micwbKICxYXjEcKgc3eBEsnTKFRiLSBaso2l2cX0GDw,1561
90
+ pysmt/test/test_imports.py,sha256=f41EUBrlDItgQ_6SPhWW8-tuwMrdMFXHJzaxrHHB43Q,1583
80
91
  pysmt/test/test_int.py,sha256=dk72Q6viqRUs9XiPB40n6RrwiqsV6GbbKuSlYaQMU9k,1980
81
92
  pysmt/test/test_interpolation.py,sha256=WTodZtnxH5slIvUWbHbjjnI2o0naXgZwZawTGhh3E0o,3941
82
93
  pysmt/test/test_lira.py,sha256=1B4y1y2U-5CttF6h22tniJkAedUDIwjp1Ad0_Ha_s-8,2175
@@ -84,7 +95,9 @@ pysmt/test/test_logics.py,sha256=Nppv0G7z0XIE8wHyWI3F04Vy1PY2iMVwvjyDcYBeS8A,698
84
95
  pysmt/test/test_models.py,sha256=npqGoF-3DgAw0DTx6se32ZEZRFBJDcnkppzgyjLDbps,2748
85
96
  pysmt/test/test_native_qe.py,sha256=RGZgwbpAkPBTjIqcCbOkZ_nQXIDZ4Fznrr7Ldx6oA38,3439
86
97
  pysmt/test/test_nia.py,sha256=x51d0X5jnZnxTPvPLrlD0WilunZ5uNrDU4vWY78_xpU,6640
87
- pysmt/test/test_nlira.py,sha256=s2sTnkgYNxikMxyKkR9_0GJoRr017Dm7Bx8dbqgRpyw,4957
98
+ pysmt/test/test_nlira.py,sha256=_E1HeOarw4TN8AI1X7EQv-utjhwy8hJX3vx-05eHJk0,4969
99
+ pysmt/test/test_optimization.py,sha256=xU0gJbD2SSn5_lA7wF7IKcR54KF6NU0g-2_dDEqXmqA,24358
100
+ pysmt/test/test_optimizing.py,sha256=OetdtGabmFmXQxWzu3oqOWlokDw19GzxScbbxzeV0nI,2030
88
101
  pysmt/test/test_oracles.py,sha256=cHBPTUoi9cPmIvR-DG4bbzohOaBdUJzpKLoQXImxS_c,5615
89
102
  pysmt/test/test_portfolio.py,sha256=k0Jdrdr-EX-BVCxqYNUS3YjC77aCpzzdhezjB8U3OCM,7125
90
103
  pysmt/test/test_printing.py,sha256=glsnaMRungLc31JIJTmHlT69JnTPsC5pnYn1rZriV2s,8765
@@ -98,21 +111,23 @@ pysmt/test/test_solving.py,sha256=8x9dNHbICFzHmCLZDR_Nnm3ScRal6seGoRRA89uOB4w,24
98
111
  pysmt/test/test_sorts.py,sha256=erfInyPH91WVB8JBUYLteTo5X5skKKP3vEXdUUKC-YE,6033
99
112
  pysmt/test/test_string.py,sha256=Y6VBfkLNKuePo8-HIzcwBH3eaYj0i-k1Y8tpFyw03zw,8096
100
113
  pysmt/test/test_typechecker.py,sha256=S2O8HjN_bLN6sz86TnsWqpRtxHk2VcVsGDoRZCcQnzE,7309
101
- pysmt/test/test_unsat_cores.py,sha256=J-ip4SInZ9l96NCsLsKmvIiSI04hKpdyrPeKRh6b6aM,6563
114
+ pysmt/test/test_unsat_cores.py,sha256=-WFx7AsFY4DG5bfRUOYMb38lpVJ_I-7-WZFjsSFD5Aw,6565
102
115
  pysmt/test/test_walker_ext.py,sha256=4x6Ew522P_0fLpKRIL0_0igB4I3_VrWWA4juuqolhag,3522
103
116
  pysmt/test/test_walkers.py,sha256=AKVMvEUtMBht08bE1vCMaeMtdgGa6j_weDSHz_9Br3Q,9481
104
117
  pysmt/test/configs/config1.ini,sha256=MAXPN6VVW-S7jpWmglMPN5a3JYgorTqKAF6cmfohMpo,224
105
118
  pysmt/test/configs/config_bad.ini,sha256=AOiZPmUcmAjVXOd5Bp4_euaYJG8EfccBy5iKUEcbxz8,88
106
119
  pysmt/test/smtlib/__init__.py,sha256=JXBHtcb4Lv-Sb8whc9JuGbRH2EBLWwtLUh3PL9HhNE8,650
107
- pysmt/test/smtlib/parser_utils.py,sha256=1e1AnrVgHbjL-nKGz-vbJfvECMc2iNEnAwCEi1cia4o,8635
108
- pysmt/test/smtlib/test_annotations.py,sha256=AyL8tZUMySQgUOmT8UPB_dnEglWCOo5EXM6kQxL_I3o,6209
120
+ pysmt/test/smtlib/parser_utils.py,sha256=8pvCwJ0Ba_yGzC9wRmkuleAkSmdQnvxTm4rM5lD8bkQ,13678
121
+ pysmt/test/smtlib/test_annotations.py,sha256=Zmj3xvPt10If2_2y39hqJqqXbSK_5X_qmPkLUNgjRA4,6296
109
122
  pysmt/test/smtlib/test_fuzzed.py,sha256=pswc1F2ngXMZo-laFOs6pXnDg69JMfGPx1vMTsXdAX0,2124
110
123
  pysmt/test/smtlib/test_generic_wrapper.py,sha256=Gn_cWynRWAFqUcAWpRgmJlkkwHcqdnARZN0-blRwM-Q,7869
111
124
  pysmt/test/smtlib/test_griggio.py,sha256=oyMAlqdFoaDHxBRP7sWNRiQijowzLjRliJp3d0wLXQc,2893
112
125
  pysmt/test/smtlib/test_model_validation.py,sha256=xHHBkbANSNnxuc8HFUVcEANde0zsZZdTWPtIWVazw7c,3076
126
+ pysmt/test/smtlib/test_omt_lib_solver.py,sha256=8MzMvOmPYXXiA8wSJE4ZdqmTvAu4_K7HkcMHjvvbkNM,8735
113
127
  pysmt/test/smtlib/test_parser_examples.py,sha256=5e0pNN5rjgi5cLAJl4ZZuUiifCUgVaD__JfBlVJgMR4,10100
114
128
  pysmt/test/smtlib/test_parser_extensibility.py,sha256=C3erKM1HzUmKc7_zf6sIjXx43jXh0P4tSsp7rpNPeos,3659
115
129
  pysmt/test/smtlib/test_parser_lra.py,sha256=B2diWIu8B2ZRkCtO0nFbrYlKptUTarNFC3fm5mtcQUc,972
130
+ pysmt/test/smtlib/test_parser_omt.py,sha256=r_XQQ0quL0Rnaf4hFmdrim_YvaZjDwk9BdGouLsYW9k,4624
116
131
  pysmt/test/smtlib/test_parser_qf_arrays.py,sha256=B9p3rKoRgctL1C_2t_JiL86hLokutK8AVKU1jqiMkyQ,987
117
132
  pysmt/test/smtlib/test_parser_qf_lia.py,sha256=TPwvbAnb9m9872vi1zzblZ5TRdsYONe3r-18DjuXz4c,981
118
133
  pysmt/test/smtlib/test_parser_qf_lira.py,sha256=GZEQ4kc0OERbDayJ1OPH9tyaAaDpfnvum52ySQGQjJw,988
@@ -122,16 +137,16 @@ pysmt/test/smtlib/test_parser_qf_nra.py,sha256=a6VWFQtv_v2bqLe598NTdcK1v9cM9Q3lo
122
137
  pysmt/test/smtlib/test_parser_qf_uf.py,sha256=iKWadVfvZEKkjuP0lXo3BoEk3ISoDYyi_x4MhTt6Q_Q,978
123
138
  pysmt/test/smtlib/test_parser_qf_ufbv.py,sha256=G3Nnt4awK1A6nwDvKRv4zoFwtGHawvlf4KSVYJRltGA,984
124
139
  pysmt/test/smtlib/test_parser_type_error.py,sha256=cnil1KNDYkxc52pnqOC1ch8joGbaWWqepQmYABtTHLM,1129
125
- pysmt/test/smtlib/test_smtlibscript.py,sha256=pGNEPwCinr0oIAYbp0kx4dkczi5Z5frHKTzOdlwf350,11930
140
+ pysmt/test/smtlib/test_smtlibscript.py,sha256=Vj0ksQMd4UAAlmx6q2yNR8WUYS8cNTXqFLDW-lTl4q8,11955
126
141
  pysmt/walkers/__init__.py,sha256=D6iHibVpqaZFzcpgYnNf3NVMxPyouAeeonTDSwCToRg,1585
127
142
  pysmt/walkers/dag.py,sha256=pUdVTZx7CQyjrAb6jMfmsqS07J4kiDqHU8R4_9UvwkQ,5352
128
143
  pysmt/walkers/generic.py,sha256=q1j1T2RvCeJn1PM0H5d8vNV4FTYAEQgT7h8X5DJhDf8,4534
129
144
  pysmt/walkers/identitydag.py,sha256=f_D5qA198ayd3QO4u59fBX1RS_UiSBnPeV9O3ULvQv0,8737
130
145
  pysmt/walkers/tree.py,sha256=WIWN9IM0riWkaD40iP4Tt3BCN21iSdE1S7gRZqy56SU,2846
131
- PySMT-0.9.7.dev139.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
132
- PySMT-0.9.7.dev139.dist-info/METADATA,sha256=eW7kOfR-5RYzmIwiEXaUzz0_RifJMBeQ8y_a9PqnQ7A,1617
133
- PySMT-0.9.7.dev139.dist-info/NOTICE,sha256=Ns-Jsa6nbqZUiTEEAM6HqioSZIxQ2RCJzxoBlWQaUfc,601
134
- PySMT-0.9.7.dev139.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
135
- PySMT-0.9.7.dev139.dist-info/entry_points.txt,sha256=si0hIk-v3V35G3p8QGINoQ4QW-v4RYDRqj-asgyCgeM,58
136
- PySMT-0.9.7.dev139.dist-info/top_level.txt,sha256=NwHQbpTaZMEvjIUdC0bvvj-WUyULe-nt-opK3YQNRMk,6
137
- PySMT-0.9.7.dev139.dist-info/RECORD,,
146
+ PySMT-0.9.7.dev337.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
147
+ PySMT-0.9.7.dev337.dist-info/METADATA,sha256=llt-p3vZt1Ly6hCzRAlptfBz9gO3Bu2uXR4_kemWylE,1617
148
+ PySMT-0.9.7.dev337.dist-info/NOTICE,sha256=Ns-Jsa6nbqZUiTEEAM6HqioSZIxQ2RCJzxoBlWQaUfc,601
149
+ PySMT-0.9.7.dev337.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
150
+ PySMT-0.9.7.dev337.dist-info/entry_points.txt,sha256=si0hIk-v3V35G3p8QGINoQ4QW-v4RYDRqj-asgyCgeM,58
151
+ PySMT-0.9.7.dev337.dist-info/top_level.txt,sha256=NwHQbpTaZMEvjIUdC0bvvj-WUyULe-nt-opK3YQNRMk,6
152
+ PySMT-0.9.7.dev337.dist-info/RECORD,,
pysmt/__init__.py CHANGED
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- VERSION = (0, 9, 7, "dev", 139)
19
+ VERSION = (0, 9, 7, "dev", 337)
20
20
 
21
21
  # Try to provide human-readable version of latest commit for dev versions
22
22
  # E.g. v0.5.1-4-g49a49f2-wip
@@ -23,12 +23,20 @@ def check_version(module):
23
23
  (major, minor, ver, _) = z3.get_version()
24
24
  version = "%d.%d.%d" % (major, minor, ver)
25
25
 
26
- elif module == "msat":
27
- import mathsat
28
- version_str = mathsat.msat_get_version()
26
+ elif module in ("msat", "optimsat"):
27
+ if module == "msat":
28
+ import mathsat
29
+ version_str = mathsat.msat_get_version()
30
+ else:
31
+ import optimathsat
32
+ version_str = optimathsat.msat_get_version()
29
33
  m = re.match(r"^MathSAT5 version (\d+\.\d+\.\d+) .*$", version_str)
30
34
  if m is not None:
31
35
  version = m.group(1)
36
+ else:
37
+ m = re.match(r"^MathSAT5 version (\w+) .*$", version_str)
38
+ if m is not None:
39
+ version = m.group(1)
32
40
 
33
41
  elif module == "cudd":
34
42
  import repycudd
pysmt/cmd/install.py CHANGED
@@ -21,7 +21,7 @@ from collections import namedtuple
21
21
 
22
22
  from pysmt.cmd.installers import MSatInstaller, Z3Installer, PicoSATInstaller
23
23
  from pysmt.cmd.installers import CVC5Installer, YicesInstaller, BtorInstaller
24
- from pysmt.cmd.installers import CuddInstaller, CVC4Installer
24
+ from pysmt.cmd.installers import CuddInstaller, CVC4Installer, OptiMSatInstaller
25
25
  from pysmt.cmd.installers.base import solver_install_site
26
26
 
27
27
  from pysmt.environment import get_env
@@ -43,10 +43,10 @@ INSTALLERS = [
43
43
  {"pypicosat_minor_version" : "1708010052"}),
44
44
  Installer(CuddInstaller, "2.0.3",
45
45
  {"git_version" : "ecb03d6d231273343178f566cc4d7258dcce52b4"}),
46
+ Installer(OptiMSatInstaller, "1.7.3", {})
46
47
  ]
47
48
 
48
49
 
49
-
50
50
  def get_requested_solvers():
51
51
  """Parses the PYSMT_SOLVER env variable to extract requirements to fulfill"""
52
52
 
@@ -107,6 +107,9 @@ def check_installed(required_solvers, install_dir, bindings_dir, mirror_link):
107
107
  interps = get_env().factory.all_interpolators()
108
108
  print("Interpolators: %s" % ", ".join(name for name in interps))
109
109
 
110
+ opts = get_env().factory.all_optimizers()
111
+ print("Optimizers: %s" % ", ".join(name for name in opts))
112
+
110
113
 
111
114
 
112
115
  def parse_options():
@@ -20,6 +20,8 @@ from pysmt.cmd.installers.yices import YicesInstaller
20
20
  from pysmt.cmd.installers.btor import BtorInstaller
21
21
  from pysmt.cmd.installers.pico import PicoSATInstaller
22
22
  from pysmt.cmd.installers.bdd import CuddInstaller
23
+ from pysmt.cmd.installers.optimsat import OptiMSatInstaller
23
24
 
24
25
  assert MSatInstaller and Z3Installer and CVC5Installer and YicesInstaller
25
26
  assert BtorInstaller and PicoSATInstaller and CuddInstaller and CVC4Installer
27
+ assert OptiMSatInstaller
@@ -35,7 +35,6 @@ class CVC5Installer(SolverInstaller):
35
35
  pass
36
36
 
37
37
  def compile(self):
38
- print(self.bindings_dir)
39
38
  SolverInstaller.run_python("-m pip install --upgrade --target=%s cvc5==%s" % (self.bindings_dir, self.solver_version))
40
39
 
41
40
  def get_installed_version(self):
@@ -0,0 +1,89 @@
1
+ # Copyright 2014 Andrea Micheli and Marco Gario
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import os
16
+ import glob
17
+
18
+ from pysmt.cmd.installers.base import SolverInstaller
19
+
20
+
21
+ class OptiMSatInstaller(SolverInstaller):
22
+
23
+ SOLVER = "optimsat"
24
+
25
+ def __init__(self, install_dir, bindings_dir, solver_version,
26
+ mirror_link=None):
27
+ # Getting the right archive name
28
+ os_name = self.os_name
29
+ arch = str(self.bits) + "-bit"
30
+ ext = "tar.gz"
31
+ if os_name == "windows":
32
+ ext = "zip"
33
+ arch += "-mingw"
34
+ elif os_name == "darwin":
35
+ os_name = "macos"
36
+
37
+ archive_name = "optimathsat-%s-%s-%s.%s" % (solver_version, os_name,
38
+ arch, ext)
39
+
40
+ native_link = "http://optimathsat.disi.unitn.it/releases/optimathsat-%s/{archive_name}" % solver_version
41
+
42
+ SolverInstaller.__init__(self, install_dir=install_dir,
43
+ bindings_dir=bindings_dir,
44
+ solver_version=solver_version,
45
+ archive_name=archive_name,
46
+ native_link = native_link,
47
+ mirror_link=mirror_link)
48
+
49
+ self.python_bindings_dir = os.path.join(self.extract_path, "python")
50
+
51
+
52
+ def compile(self):
53
+ if self.os_name == "windows":
54
+ libdir = os.path.join(self.python_bindings_dir, "../lib")
55
+ incdir = os.path.join(self.python_bindings_dir, "../include")
56
+ gmp_h_url = "https://github.com/mikand/tamer-windows-deps/raw/master/gmp/include/gmp.h"
57
+ mpir_dll_url = "https://github.com/Legrandin/mpir-windows-builds/blob/master/mpir-2.6.0_VS2015_%s/mpir.dll?raw=true" % self.bits
58
+ mpir_lib_url = "https://github.com/Legrandin/mpir-windows-builds/blob/master/mpir-2.6.0_VS2015_%s/mpir.lib?raw=true" % self.bits
59
+
60
+ SolverInstaller.do_download(gmp_h_url, os.path.join(incdir, "gmp.h"))
61
+ SolverInstaller.do_download(mpir_dll_url, os.path.join(libdir, "mpir.dll"))
62
+ SolverInstaller.do_download(mpir_lib_url, os.path.join(libdir, "mpir.lib"))
63
+
64
+ if self.os_name in {"darwin"}:
65
+ SolverInstaller.run_python("./setup.py build_ext", self.python_bindings_dir)
66
+ else:
67
+ SolverInstaller.run_python("./setup.py build_ext -R $ORIGIN", self.python_bindings_dir)
68
+
69
+
70
+ def move(self):
71
+ pdir = self.python_bindings_dir
72
+ bdir = os.path.join(pdir, "build")
73
+ sodir = glob.glob(bdir + "/lib.*")[0]
74
+ libdir = os.path.join(self.python_bindings_dir, "../lib")
75
+
76
+ # First, we need the SWIG-generated wrapper
77
+ for f in os.listdir(sodir):
78
+ if f.endswith(".so") or f.endswith(".pyd"):
79
+ SolverInstaller.mv(os.path.join(sodir, f), self.bindings_dir)
80
+ SolverInstaller.mv(os.path.join(pdir, "optimathsat.py"), self.bindings_dir)
81
+
82
+ # Since MathSAT 5.5.0 we also need the SO/DLL/DYLIB of mathsat in the PATH
83
+ # Under Windows, we also need the DLLs of MPIR in the PATH
84
+ for f in os.listdir(libdir):
85
+ if f.endswith(".so") or f.endswith(".dll") or f.endswith(".dylib"):
86
+ SolverInstaller.mv(os.path.join(libdir, f), self.bindings_dir)
87
+
88
+ def get_installed_version(self):
89
+ return self.get_installed_version_script(self.bindings_dir, "optimsat")
pysmt/cmd/shell.py CHANGED
@@ -21,13 +21,14 @@ import sys
21
21
  import argparse
22
22
  from warnings import warn
23
23
 
24
- from pysmt import git_version
24
+ from pysmt import __version__
25
25
  from pysmt.shortcuts import *
26
26
  from pysmt.typing import INT, REAL, BOOL, BVType, BV32
27
27
 
28
28
  from pysmt.smtlib.parser import SmtLibParser
29
- from pysmt.smtlib.script import evaluate_command
30
- from pysmt.smtlib.commands import CHECK_SAT, GET_VALUE
29
+ from pysmt.smtlib.script import InterpreterOMT, InterpreterSMT
30
+ from pysmt.smtlib.commands import CHECK_SAT, GET_VALUE, GET_OBJECTIVES, ECHO
31
+ from pysmt.logics import PYSMT_LOGICS
31
32
 
32
33
  welcome_msg = \
33
34
  """Welcome to pySMT!!!
@@ -60,6 +61,7 @@ class PysmtShell(object):
60
61
  def __init__(self, argv):
61
62
  self.env = get_env()
62
63
  self.solvers = list(self.env.factory.all_solvers().keys())
64
+ self.optimizers = list(self.env.factory.all_optimizers().keys())
63
65
  self.parser = self.get_parser()
64
66
  self.args = self.parser.parse_args(argv)
65
67
 
@@ -68,7 +70,7 @@ class PysmtShell(object):
68
70
  parser = argparse.ArgumentParser(description="Command-line interface " \
69
71
  "for pySMT problems")
70
72
  parser.add_argument('--version', action='version',
71
- version='%(prog)s {version}'.format(version=git_version()))
73
+ version='%(prog)s {version}'.format(version=__version__))
72
74
  parser.add_argument('--file', '-f', metavar='filename', type=str,
73
75
  help='A script file to read from instead of stdin')
74
76
 
@@ -80,6 +82,14 @@ class PysmtShell(object):
80
82
  choices=['auto'] + self.solvers,
81
83
  default=None,
82
84
  help='The solver to use (default: auto)')
85
+ parser.add_argument('--optimizer', '-o', metavar='opt_name', type=str,
86
+ choices=['auto'] + self.optimizers,
87
+ default=None,
88
+ help='The OMT optimizer to use (default: auto)')
89
+ parser.add_argument('--logic', '-l', metavar='logic_name', type=str,
90
+ choices=['auto'] + [str(l) for l in PYSMT_LOGICS],
91
+ default=None,
92
+ help='The logic to use for solver/optimizer selection (default: auto)')
83
93
  return parser
84
94
 
85
95
 
@@ -95,31 +105,56 @@ class PysmtShell(object):
95
105
  code.interact(welcome_msg)
96
106
 
97
107
 
98
- def print_result(self, cmd, result):
108
+ def _print(self, val, stream_out):
109
+ stream_out.write(val)
110
+ stream_out.write("\n")
111
+ stream_out.flush()
112
+
113
+
114
+ def print_result(self, stream_out, cmd, result):
99
115
  name, _ = cmd
100
- if name == CHECK_SAT:
116
+ if name == ECHO:
117
+ self._print(result, stream_out)
118
+ elif name == CHECK_SAT:
101
119
  if result == True:
102
- print("sat")
120
+ self._print("sat", stream_out)
103
121
  else:
104
- print("unsat")
122
+ self._print("unsat", stream_out)
105
123
  elif name == GET_VALUE:
106
- print("(")
124
+ self._print("(", stream_out)
107
125
  for k, r in result.items():
108
- print(" (%s %s)" % (k,r))
109
- print(")")
126
+ self._print(" (%s %s)" % (k,r), stream_out)
127
+ self._print(")", stream_out)
128
+ elif name == GET_OBJECTIVES:
129
+ self._print("(objectives", stream_out)
130
+ for r in result:
131
+ self._print(" (%s %s)" % (r[0], r[1]), stream_out)
132
+ self._print(")", stream_out)
110
133
 
111
134
 
112
- def smtlib_solver(self, stream):
135
+ def smtlib_solver(self, stream_in, stream_out):
113
136
  smt_parser = SmtLibParser()
114
- name = self.args.solver
115
- if name == "auto":
116
- solver = Solver()
137
+ s_name = self.args.solver
138
+ opt_name = self.args.optimizer
139
+ logic = self.args.logic
140
+ if logic == "auto":
141
+ logic = None
142
+
143
+ if opt_name is not None:
144
+ if opt_name == "auto":
145
+ solver = Optimizer(logic=logic)
146
+ else:
147
+ solver = Optimizer(name=opt_name, logic=logic)
148
+ inter = InterpreterOMT()
117
149
  else:
118
- solver = Solver(name=name)
119
-
120
- for cmd in smt_parser.get_command_generator(stream):
121
- r = evaluate_command(cmd, solver)
122
- self.print_result(cmd, r)
150
+ if s_name == "auto":
151
+ solver = Solver(logic=logic)
152
+ else:
153
+ solver = Solver(name=s_name, logic=logic)
154
+ inter = InterpreterSMT()
155
+ for cmd in smt_parser.get_command_generator(stream_in):
156
+ r = inter.evaluate(cmd, solver)
157
+ self.print_result(stream_out, cmd, r)
123
158
 
124
159
 
125
160
  def main(self):
@@ -131,10 +166,12 @@ class PysmtShell(object):
131
166
  warn("The solver option will be ignored in interactive mode")
132
167
  self.interactive()
133
168
  else:
134
- input_stream = sys.stdin
135
- if self.args.file is not None:
136
- input_stream = open(self.args.file, "r")
137
- self.smtlib_solver(input_stream)
169
+ if self.args.file is None:
170
+ self.smtlib_solver(sys.stdin, sys.stdout)
171
+ else:
172
+ with open(self.args.file, "r") as input_stream:
173
+ self.smtlib_solver(input_stream, sys.stdout)
174
+
138
175
 
139
176
  def main_interactive():
140
177
  shell = PysmtShell(sys.argv[1:])
pysmt/configuration.py CHANGED
@@ -122,7 +122,7 @@ def write_environment_configuration(config_filename, environment):
122
122
 
123
123
  config.add_section("global")
124
124
  inf = "true" if environment.enable_infix_notation else "false"
125
- pl = " ".join(factory.solver_preference_list)
125
+ pl = " ".join(factory.preferences['Solver'])
126
126
  config.set("global", "use_infix_notation", inf)
127
127
  config.set("global", "solver_preference_list", pl)
128
128
 
pysmt/decorators.py CHANGED
@@ -49,7 +49,7 @@ def clear_pending_pop(f):
49
49
 
50
50
  Some functions (e.g., get_value) required the state of the solver
51
51
  to stay unchanged after a call to solve. Therefore, we can leave
52
- th solver in an intermediate state in which there is a formula
52
+ the solver in an intermediate state in which there is a formula
53
53
  asserted in the stack that is not needed (e.g., when solving under
54
54
  assumptions). In order to guarantee that methods operate on the
55
55
  correct set of formulae, all methods of the solver that rely on
pysmt/exceptions.py CHANGED
@@ -148,3 +148,48 @@ class PysmtSyntaxError(PysmtException, SyntaxError):
148
148
 
149
149
  class PysmtIOError(PysmtException, IOError):
150
150
  pass
151
+
152
+ class PysmtInfinityError(PysmtException):
153
+ """Infinite value in expressions."""
154
+ pass
155
+
156
+ class PysmtInfinitesimalError(PysmtException):
157
+ """Infinite value in expressions."""
158
+ pass
159
+
160
+ class PysmtUnboundedOptimizationError(PysmtException):
161
+ """Infinite optimal value in optimization."""
162
+ pass
163
+
164
+ class GoalNotSupportedError(PysmtException):
165
+ """
166
+ Goal not supported by the solver.
167
+
168
+ The possible modes are the optimization modes, in case a specific goal is
169
+ not supported by a specific mode.
170
+ The possible modes are:
171
+ - basic
172
+ - boxed
173
+ - lexicographic
174
+ - pareto
175
+ """
176
+ def __init__(self, solver, goal, mode=None):
177
+ self._solver = solver
178
+ self._goal = goal
179
+ self._mode = mode
180
+
181
+ @property
182
+ def solver(self):
183
+ return self._solver
184
+
185
+ @property
186
+ def goal(self):
187
+ return self._goal
188
+
189
+ @property
190
+ def mode(self):
191
+ return self._mode
192
+
193
+ def __str__(self):
194
+ mode_str = (" in mode '%s'" % self.mode) if self.mode else ""
195
+ return "Optimizer '%s' does not support goal '%s'%s" % tuple(map(str, (type(self.solver).__name__, self.goal, mode_str)))