PySMT 0.9.7.dev139__tar.gz → 0.9.7.dev333__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.
Files changed (164) hide show
  1. {PySMT-0.9.7.dev139/PySMT.egg-info → PySMT-0.9.7.dev333}/PKG-INFO +1 -1
  2. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333/PySMT.egg-info}/PKG-INFO +1 -1
  3. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/PySMT.egg-info/SOURCES.txt +15 -0
  4. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/__init__.py +1 -1
  5. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/check_version.py +11 -3
  6. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/install.py +5 -2
  7. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/__init__.py +2 -0
  8. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/cvcfive.py +0 -1
  9. PySMT-0.9.7.dev333/pysmt/cmd/installers/optimsat.py +89 -0
  10. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/shell.py +61 -24
  11. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/configuration.py +1 -1
  12. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/decorators.py +1 -1
  13. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/exceptions.py +45 -0
  14. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/factory.py +153 -38
  15. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/fnode.py +2 -8
  16. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/formula.py +30 -8
  17. PySMT-0.9.7.dev333/pysmt/optimization/goal.py +267 -0
  18. PySMT-0.9.7.dev333/pysmt/optimization/msat.py +26 -0
  19. PySMT-0.9.7.dev333/pysmt/optimization/optimizer.py +716 -0
  20. PySMT-0.9.7.dev333/pysmt/optimization/optimsat.py +287 -0
  21. PySMT-0.9.7.dev333/pysmt/optimization/yices.py +26 -0
  22. PySMT-0.9.7.dev333/pysmt/optimization/z3.py +178 -0
  23. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/shortcuts.py +10 -1
  24. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/commands.py +18 -1
  25. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/parser/parser.py +242 -132
  26. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/printers.py +2 -2
  27. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/script.py +259 -59
  28. PySMT-0.9.7.dev333/pysmt/solvers/dynmsat.py +66 -0
  29. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/eager.py +3 -2
  30. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/msat.py +392 -373
  31. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/solver.py +1 -1
  32. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/z3.py +61 -5
  33. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/substituter.py +2 -2
  34. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/__init__.py +15 -0
  35. PySMT-0.9.7.dev333/pysmt/test/omt_examples.py +302 -0
  36. PySMT-0.9.7.dev333/pysmt/test/optimization_utils.py +305 -0
  37. PySMT-0.9.7.dev333/pysmt/test/smtlib/__init__.py +17 -0
  38. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/parser_utils.py +128 -6
  39. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_annotations.py +4 -2
  40. PySMT-0.9.7.dev333/pysmt/test/smtlib/test_omt_lib_solver.py +359 -0
  41. PySMT-0.9.7.dev333/pysmt/test/smtlib/test_parser_omt.py +144 -0
  42. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_smtlibscript.py +5 -4
  43. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_cnf.py +1 -1
  44. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_configuration.py +2 -4
  45. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_env.py +3 -4
  46. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_formula.py +14 -0
  47. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_imports.py +1 -1
  48. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_nlira.py +1 -1
  49. PySMT-0.9.7.dev333/pysmt/test/test_optimization.py +607 -0
  50. PySMT-0.9.7.dev333/pysmt/test/test_optimizing.py +50 -0
  51. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_unsat_cores.py +1 -1
  52. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/LICENSE +0 -0
  53. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/MANIFEST.in +0 -0
  54. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/NOTICE +0 -0
  55. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/PySMT.egg-info/dependency_links.txt +0 -0
  56. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/PySMT.egg-info/entry_points.txt +0 -0
  57. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/PySMT.egg-info/top_level.txt +0 -0
  58. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/README.rst +0 -0
  59. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/CHANGES.rst +0 -0
  60. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/api_ref.rst +0 -0
  61. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/development.rst +0 -0
  62. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/getting_started.rst +0 -0
  63. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/index.rst +0 -0
  64. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/tutorials/boolean_logic.rst +0 -0
  65. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/tutorials.rst +0 -0
  66. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/__main__.py +0 -0
  67. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/__init__.py +0 -0
  68. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/base.py +0 -0
  69. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/bdd.py +0 -0
  70. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/btor.py +0 -0
  71. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/cvcfour.py +0 -0
  72. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/msat.py +0 -0
  73. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/pico.py +0 -0
  74. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/yices.py +0 -0
  75. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/z3.py +0 -0
  76. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/constants.py +0 -0
  77. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/environment.py +0 -0
  78. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/logics.py +0 -0
  79. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/operators.py +0 -0
  80. {PySMT-0.9.7.dev139/pysmt/smtlib → PySMT-0.9.7.dev333/pysmt/optimization}/__init__.py +0 -0
  81. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/oracles.py +0 -0
  82. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/parsing.py +0 -0
  83. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/printers.py +0 -0
  84. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/rewritings.py +0 -0
  85. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/simplifier.py +0 -0
  86. {PySMT-0.9.7.dev139/pysmt/solvers → PySMT-0.9.7.dev333/pysmt/smtlib}/__init__.py +0 -0
  87. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/annotations.py +0 -0
  88. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/parser/__init__.py +0 -0
  89. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/solver.py +0 -0
  90. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/utils.py +0 -0
  91. {PySMT-0.9.7.dev139/pysmt/test/smtlib → PySMT-0.9.7.dev333/pysmt/solvers}/__init__.py +0 -0
  92. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/bdd.py +0 -0
  93. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/btor.py +0 -0
  94. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/cvcfive.py +0 -0
  95. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/cvcfour.py +0 -0
  96. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/interpolation.py +0 -0
  97. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/options.py +0 -0
  98. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/pico.py +0 -0
  99. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/portfolio.py +0 -0
  100. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/qelim.py +0 -0
  101. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/smtlib.py +0 -0
  102. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/yices.py +0 -0
  103. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/configs/config1.ini +0 -0
  104. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/configs/config_bad.ini +0 -0
  105. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/examples.py +0 -0
  106. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_fuzzed.py +0 -0
  107. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_generic_wrapper.py +0 -0
  108. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_griggio.py +0 -0
  109. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_model_validation.py +0 -0
  110. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_examples.py +0 -0
  111. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_extensibility.py +0 -0
  112. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_lra.py +0 -0
  113. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_arrays.py +0 -0
  114. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_lia.py +0 -0
  115. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_lira.py +0 -0
  116. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_lra.py +0 -0
  117. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_nia.py +0 -0
  118. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_nra.py +0 -0
  119. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_uf.py +0 -0
  120. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_ufbv.py +0 -0
  121. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_type_error.py +0 -0
  122. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_array.py +0 -0
  123. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_back.py +0 -0
  124. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_bdd.py +0 -0
  125. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_bv.py +0 -0
  126. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_bv_simplification.py +0 -0
  127. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_constants.py +0 -0
  128. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_cvc_quantifiers.py +0 -0
  129. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_dwf.py +0 -0
  130. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_eager_model.py +0 -0
  131. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_euf.py +0 -0
  132. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_hr_parsing.py +0 -0
  133. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_int.py +0 -0
  134. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_interpolation.py +0 -0
  135. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_lira.py +0 -0
  136. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_logics.py +0 -0
  137. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_models.py +0 -0
  138. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_native_qe.py +0 -0
  139. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_nia.py +0 -0
  140. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_oracles.py +0 -0
  141. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_portfolio.py +0 -0
  142. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_printing.py +0 -0
  143. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_qe.py +0 -0
  144. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_regressions.py +0 -0
  145. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_rewritings.py +0 -0
  146. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_shannon_expansion.py +0 -0
  147. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_simplify.py +0 -0
  148. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_size.py +0 -0
  149. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_solving.py +0 -0
  150. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_sorts.py +0 -0
  151. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_string.py +0 -0
  152. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_typechecker.py +0 -0
  153. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_walker_ext.py +0 -0
  154. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_walkers.py +0 -0
  155. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/type_checker.py +0 -0
  156. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/typing.py +0 -0
  157. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/utils.py +0 -0
  158. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/walkers/__init__.py +0 -0
  159. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/walkers/dag.py +0 -0
  160. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/walkers/generic.py +0 -0
  161. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/walkers/identitydag.py +0 -0
  162. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/walkers/tree.py +0 -0
  163. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/setup.cfg +0 -0
  164. {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: PySMT
3
- Version: 0.9.7.dev139
3
+ Version: 0.9.7.dev333
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,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: PySMT
3
- Version: 0.9.7.dev139
3
+ Version: 0.9.7.dev333
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
@@ -48,9 +48,17 @@ pysmt/cmd/installers/btor.py
48
48
  pysmt/cmd/installers/cvcfive.py
49
49
  pysmt/cmd/installers/cvcfour.py
50
50
  pysmt/cmd/installers/msat.py
51
+ pysmt/cmd/installers/optimsat.py
51
52
  pysmt/cmd/installers/pico.py
52
53
  pysmt/cmd/installers/yices.py
53
54
  pysmt/cmd/installers/z3.py
55
+ pysmt/optimization/__init__.py
56
+ pysmt/optimization/goal.py
57
+ pysmt/optimization/msat.py
58
+ pysmt/optimization/optimizer.py
59
+ pysmt/optimization/optimsat.py
60
+ pysmt/optimization/yices.py
61
+ pysmt/optimization/z3.py
54
62
  pysmt/smtlib/__init__.py
55
63
  pysmt/smtlib/annotations.py
56
64
  pysmt/smtlib/commands.py
@@ -65,6 +73,7 @@ pysmt/solvers/bdd.py
65
73
  pysmt/solvers/btor.py
66
74
  pysmt/solvers/cvcfive.py
67
75
  pysmt/solvers/cvcfour.py
76
+ pysmt/solvers/dynmsat.py
68
77
  pysmt/solvers/eager.py
69
78
  pysmt/solvers/interpolation.py
70
79
  pysmt/solvers/msat.py
@@ -78,6 +87,8 @@ pysmt/solvers/yices.py
78
87
  pysmt/solvers/z3.py
79
88
  pysmt/test/__init__.py
80
89
  pysmt/test/examples.py
90
+ pysmt/test/omt_examples.py
91
+ pysmt/test/optimization_utils.py
81
92
  pysmt/test/test_array.py
82
93
  pysmt/test/test_back.py
83
94
  pysmt/test/test_bdd.py
@@ -102,6 +113,8 @@ pysmt/test/test_models.py
102
113
  pysmt/test/test_native_qe.py
103
114
  pysmt/test/test_nia.py
104
115
  pysmt/test/test_nlira.py
116
+ pysmt/test/test_optimization.py
117
+ pysmt/test/test_optimizing.py
105
118
  pysmt/test/test_oracles.py
106
119
  pysmt/test/test_portfolio.py
107
120
  pysmt/test/test_printing.py
@@ -127,9 +140,11 @@ pysmt/test/smtlib/test_fuzzed.py
127
140
  pysmt/test/smtlib/test_generic_wrapper.py
128
141
  pysmt/test/smtlib/test_griggio.py
129
142
  pysmt/test/smtlib/test_model_validation.py
143
+ pysmt/test/smtlib/test_omt_lib_solver.py
130
144
  pysmt/test/smtlib/test_parser_examples.py
131
145
  pysmt/test/smtlib/test_parser_extensibility.py
132
146
  pysmt/test/smtlib/test_parser_lra.py
147
+ pysmt/test/smtlib/test_parser_omt.py
133
148
  pysmt/test/smtlib/test_parser_qf_arrays.py
134
149
  pysmt/test/smtlib/test_parser_qf_lia.py
135
150
  pysmt/test/smtlib/test_parser_qf_lira.py
@@ -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", 333)
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
@@ -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")
@@ -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:])
@@ -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
 
@@ -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
@@ -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)))