z3 0.0.20181229 → 0.0.20220320

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +0 -0
  3. data/README.md +0 -2
  4. data/Rakefile +8 -1
  5. data/examples/abc_path +187 -0
  6. data/examples/abc_path-1.txt +7 -0
  7. data/examples/algebra_problems +12 -12
  8. data/examples/aquarium +133 -0
  9. data/examples/aquarium-1.txt +11 -0
  10. data/examples/bridges +2 -2
  11. data/examples/bridges-1.txt +0 -0
  12. data/examples/cats_organized_neatly +133 -0
  13. data/examples/cats_organized_neatly-10.txt +15 -0
  14. data/examples/cats_organized_neatly-3.txt +8 -0
  15. data/examples/cats_organized_neatly-48.txt +32 -0
  16. data/examples/circuit_problems +4 -4
  17. data/examples/clogic_puzzle +2 -2
  18. data/examples/color_nonogram +150 -0
  19. data/examples/color_nonogram-1.txt +23 -0
  20. data/examples/crossflip +2 -4
  21. data/examples/dominion +153 -0
  22. data/examples/dominion-1.txt +8 -0
  23. data/examples/dominosa +133 -0
  24. data/examples/dominosa-1.txt +8 -0
  25. data/examples/eulero +99 -0
  26. data/examples/eulero-1.txt +5 -0
  27. data/examples/four_hackers_puzzle +2 -2
  28. data/examples/futoshiki +128 -0
  29. data/examples/futoshiki-1.txt +17 -0
  30. data/examples/kakurasu +73 -0
  31. data/examples/kakurasu-1.txt +2 -0
  32. data/examples/kakuro +2 -2
  33. data/examples/kakuro-1.txt +0 -0
  34. data/examples/killer_sudoku +88 -0
  35. data/examples/killer_sudoku-1.txt +17 -0
  36. data/examples/killer_sudoku-2.txt +53 -0
  37. data/examples/kinematics_problems +20 -20
  38. data/examples/knights_puzzle +2 -2
  39. data/examples/kropki +100 -0
  40. data/examples/kropki-1.txt +13 -0
  41. data/examples/letter_connections +2 -2
  42. data/examples/letter_connections-1.txt +0 -0
  43. data/examples/light_up +2 -2
  44. data/examples/light_up-1.txt +0 -0
  45. data/examples/minisudoku +2 -2
  46. data/examples/minisudoku-1.txt +0 -0
  47. data/examples/miracle_sudoku +135 -0
  48. data/examples/miracle_sudoku-1.txt +9 -0
  49. data/examples/mortal_coil_puzzle +2 -2
  50. data/examples/mortal_coil_puzzle-9.txt +0 -0
  51. data/examples/nanro +245 -0
  52. data/examples/nanro-1.txt +8 -0
  53. data/examples/nine_clocks +106 -0
  54. data/examples/nonogram +2 -2
  55. data/examples/pyramid_nonogram +2 -2
  56. data/examples/regexp_crossword/beginner-1.txt +0 -0
  57. data/examples/regexp_crossword/beginner-2.txt +0 -0
  58. data/examples/regexp_crossword/beginner-3.txt +0 -0
  59. data/examples/regexp_crossword/beginner-4.txt +0 -0
  60. data/examples/regexp_crossword/beginner-5.txt +0 -0
  61. data/examples/regexp_crossword/experienced-1.txt +0 -0
  62. data/examples/regexp_crossword/experienced-2.txt +0 -0
  63. data/examples/regexp_crossword/experienced-3.txt +0 -0
  64. data/examples/regexp_crossword/experienced-4.txt +0 -0
  65. data/examples/regexp_crossword/experienced-5.txt +0 -0
  66. data/examples/regexp_crossword/tutorial-1.txt +0 -0
  67. data/examples/regexp_crossword/tutorial-2.txt +0 -0
  68. data/examples/regexp_crossword/tutorial-3.txt +0 -0
  69. data/examples/regexp_crossword/tutorial-4.txt +0 -0
  70. data/examples/regexp_crossword/tutorial-5.txt +0 -0
  71. data/examples/regexp_crossword/tutorial-6.txt +0 -0
  72. data/examples/regexp_crossword/tutorial-7.txt +0 -0
  73. data/examples/regexp_crossword/tutorial-8.txt +0 -0
  74. data/examples/regexp_crossword/tutorial-9.txt +0 -0
  75. data/examples/regexp_crossword_solver +2 -2
  76. data/examples/regexp_solver +2 -2
  77. data/examples/regexp_string_matcher.rb +0 -0
  78. data/examples/renzoku +124 -0
  79. data/examples/renzoku-1.txt +17 -0
  80. data/examples/sandwich_sudoku +101 -0
  81. data/examples/sandwich_sudoku-1.txt +10 -0
  82. data/examples/selfref +2 -2
  83. data/examples/simple_regexp_parser.rb +0 -0
  84. data/examples/skyscrapers +118 -0
  85. data/examples/skyscrapers-1.txt +6 -0
  86. data/examples/skyscrapers-2.txt +11 -0
  87. data/examples/star_battle +134 -0
  88. data/examples/star_battle-1.txt +10 -0
  89. data/examples/stitches +180 -0
  90. data/examples/stitches-1.txt +11 -0
  91. data/examples/sudoku +2 -2
  92. data/examples/sudoku-1.txt +0 -0
  93. data/examples/suguru +199 -0
  94. data/examples/suguru-1.txt +17 -0
  95. data/examples/verbal_arithmetic +2 -2
  96. data/examples/yajilin +268 -0
  97. data/examples/yajilin-1.txt +10 -0
  98. data/lib/z3/ast.rb +0 -0
  99. data/lib/z3/context.rb +0 -0
  100. data/lib/z3/exception.rb +0 -0
  101. data/lib/z3/expr/arith_expr.rb +0 -0
  102. data/lib/z3/expr/array_expr.rb +0 -0
  103. data/lib/z3/expr/bitvec_expr.rb +47 -2
  104. data/lib/z3/expr/bool_expr.rb +0 -0
  105. data/lib/z3/expr/expr.rb +3 -3
  106. data/lib/z3/expr/float_expr.rb +0 -0
  107. data/lib/z3/expr/int_expr.rb +0 -0
  108. data/lib/z3/expr/real_expr.rb +0 -0
  109. data/lib/z3/expr/rounding_mode_expr.rb +0 -0
  110. data/lib/z3/expr/set_expr.rb +0 -0
  111. data/lib/z3/func_decl.rb +0 -0
  112. data/lib/z3/goal.rb +0 -0
  113. data/lib/z3/hacks.rb +0 -0
  114. data/lib/z3/interface.rb +0 -0
  115. data/lib/z3/low_level.rb +0 -0
  116. data/lib/z3/low_level_auto.rb +138 -10
  117. data/lib/z3/model.rb +0 -0
  118. data/lib/z3/optimize.rb +0 -0
  119. data/lib/z3/printer.rb +0 -0
  120. data/lib/z3/probe.rb +0 -0
  121. data/lib/z3/solver.rb +0 -0
  122. data/lib/z3/sort/array_sort.rb +0 -0
  123. data/lib/z3/sort/bitvec_sort.rb +0 -0
  124. data/lib/z3/sort/bool_sort.rb +0 -0
  125. data/lib/z3/sort/float_sort.rb +0 -0
  126. data/lib/z3/sort/int_sort.rb +0 -0
  127. data/lib/z3/sort/real_sort.rb +0 -0
  128. data/lib/z3/sort/rounding_mode_sort.rb +0 -0
  129. data/lib/z3/sort/set_sort.rb +0 -0
  130. data/lib/z3/sort/sort.rb +0 -0
  131. data/lib/z3/tactic.rb +0 -0
  132. data/lib/z3/very_low_level.rb +5 -1
  133. data/lib/z3/very_low_level_auto.rb +35 -3
  134. data/lib/z3.rb +0 -0
  135. data/spec/array_expr_spec.rb +0 -0
  136. data/spec/array_sort_spec.rb +0 -0
  137. data/spec/bitvec_expr_spec.rb +13 -0
  138. data/spec/bitvec_sort_spec.rb +0 -0
  139. data/spec/bool_expr_spec.rb +0 -0
  140. data/spec/bool_sort_spec.rb +0 -0
  141. data/spec/coverage_helper.rb +0 -0
  142. data/spec/expr_spec.rb +0 -0
  143. data/spec/float_expr_spec.rb +0 -0
  144. data/spec/float_sort_spec.rb +0 -0
  145. data/spec/goal_spec.rb +0 -0
  146. data/spec/int_expr_spec.rb +0 -0
  147. data/spec/int_sort_spec.rb +0 -0
  148. data/spec/integration/abc_path_spec.rb +21 -0
  149. data/spec/integration/algebra_problems_spec.rb +0 -0
  150. data/spec/integration/aquarium_spec.rb +27 -0
  151. data/spec/integration/basic_int_math_spec.rb +0 -0
  152. data/spec/integration/basic_logic_spec.rb +0 -0
  153. data/spec/integration/bit_tricks_spec.rb +0 -0
  154. data/spec/integration/bridges_spec.rb +0 -0
  155. data/spec/integration/cats_organized_neatly_spec.rb +14 -0
  156. data/spec/integration/cicruit_problem_spec.rb +0 -0
  157. data/spec/integration/color_nonogram_spec.rb +28 -0
  158. data/spec/integration/crossflip_spec.rb +0 -0
  159. data/spec/integration/dominion_spec.rb +14 -0
  160. data/spec/integration/dominosa_spec.rb +21 -0
  161. data/spec/integration/eulero_spec.rb +11 -0
  162. data/spec/integration/four_hackers_puzzle_spec.rb +0 -0
  163. data/spec/integration/futoshiki_spec.rb +23 -0
  164. data/spec/integration/geometry_problem_spec.rb +0 -0
  165. data/spec/integration/kakurasu_spec.rb +18 -0
  166. data/spec/integration/kakuro_spec.rb +0 -0
  167. data/spec/integration/killer_sudoku_spec.rb +10 -0
  168. data/spec/integration/kinematics_problems_spec.rb +0 -0
  169. data/spec/integration/knights_puzzle_spec.rb +11 -11
  170. data/spec/integration/kropki_spec.rb +19 -0
  171. data/spec/integration/letter_connections_spec.rb +0 -0
  172. data/spec/integration/light_up_spec.rb +0 -0
  173. data/spec/integration/minisudoku_spec.rb +0 -0
  174. data/spec/integration/miracle_sudoku_spec.rb +15 -0
  175. data/spec/integration/mortal_coil_puzzle_spec.rb +8 -6
  176. data/spec/integration/nanro_spec.rb +39 -0
  177. data/spec/integration/nine_clocks_spec.rb +30 -0
  178. data/spec/integration/nonogram_spec.rb +0 -0
  179. data/spec/integration/oneofus_spec.rb +0 -0
  180. data/spec/integration/pyramid_nonogram_spec.rb +0 -0
  181. data/spec/integration/regexp_crossword_solver_spec.rb +1 -1
  182. data/spec/integration/regexp_solver_spec.rb +0 -0
  183. data/spec/integration/renzoku_spec.rb +23 -0
  184. data/spec/integration/sandwich_sudoku_spec.rb +15 -0
  185. data/spec/integration/selfref_spec.rb +0 -0
  186. data/spec/integration/skyscraper_spec.rb +10 -0
  187. data/spec/integration/star_battle_spec.rb +27 -0
  188. data/spec/integration/stitches_spec.rb +25 -0
  189. data/spec/integration/sudoku_spec.rb +0 -0
  190. data/spec/integration/suguru_spec.rb +23 -0
  191. data/spec/integration/verbal_arithmetic_spec.rb +0 -0
  192. data/spec/integration/yajilin_spec.rb +25 -0
  193. data/spec/integration/zebra_puzzle_spec.rb +0 -0
  194. data/spec/interface_spec.rb +0 -0
  195. data/spec/model_spec.rb +0 -0
  196. data/spec/optimize_spec.rb +3 -1
  197. data/spec/printer_spec.rb +0 -0
  198. data/spec/probe_spec.rb +0 -0
  199. data/spec/real_expr_spec.rb +0 -0
  200. data/spec/real_sort_spec.rb +0 -0
  201. data/spec/rounding_mode_expr_spec.rb +0 -0
  202. data/spec/rounding_mode_sort_spec.rb +0 -0
  203. data/spec/set_expr_spec.rb +15 -9
  204. data/spec/set_sort_spec.rb +0 -0
  205. data/spec/solver_spec.rb +1 -2
  206. data/spec/sort_spec.rb +0 -0
  207. data/spec/spec_helper.rb +15 -0
  208. data/spec/tactic_spec.rb +0 -0
  209. data/spec/z3_spec.rb +0 -0
  210. metadata +85 -5
data/lib/z3/context.rb CHANGED
File without changes
data/lib/z3/exception.rb CHANGED
File without changes
File without changes
File without changes
@@ -49,11 +49,31 @@ module Z3
49
49
  end
50
50
 
51
51
  def /(other)
52
- raise "Use signed_div or unsigned_div"
52
+ raise Z3::Exception, "Use signed_div or unsigned_div"
53
+ end
54
+
55
+ def signed_div(other)
56
+ BitvecExpr.SignedDiv(self, other)
57
+ end
58
+
59
+ def unsigned_div(other)
60
+ BitvecExpr.UnsignedDiv(self, other)
53
61
  end
54
62
 
55
63
  def %(other)
56
- raise "Use signed_mod or signed_rem or unsigned_rem"
64
+ raise Z3::Exception, "Use signed_mod or signed_rem or unsigned_rem"
65
+ end
66
+
67
+ def signed_mod(other)
68
+ BitvecExpr.SignedMod(self, other)
69
+ end
70
+
71
+ def signed_rem(other)
72
+ BitvecExpr.SignedRem(self, other)
73
+ end
74
+
75
+ def unsigned_rem(other)
76
+ BitvecExpr.UnsignedRem(self, other)
57
77
  end
58
78
 
59
79
  def rotate_left(num)
@@ -257,6 +277,31 @@ module Z3
257
277
  a.sort.new(LowLevel.mk_bvshl(a, b))
258
278
  end
259
279
 
280
+ def SignedDiv(a, b)
281
+ a, b = coerce_to_same_bv_sort(a, b)
282
+ a.sort.new(LowLevel.mk_bvsdiv(a, b))
283
+ end
284
+
285
+ def UnsignedDiv(a, b)
286
+ a, b = coerce_to_same_bv_sort(a, b)
287
+ a.sort.new(LowLevel.mk_bvudiv(a, b))
288
+ end
289
+
290
+ def SignedMod(a, b)
291
+ a, b = coerce_to_same_bv_sort(a, b)
292
+ a.sort.new(LowLevel.mk_bvsmod(a, b))
293
+ end
294
+
295
+ def SignedRem(a, b)
296
+ a, b = coerce_to_same_bv_sort(a, b)
297
+ a.sort.new(LowLevel.mk_bvsrem(a, b))
298
+ end
299
+
300
+ def UnsignedRem(a, b)
301
+ a, b = coerce_to_same_bv_sort(a, b)
302
+ a.sort.new(LowLevel.mk_bvurem(a, b))
303
+ end
304
+
260
305
  def Xnor(*args)
261
306
  args = coerce_to_same_bv_sort(*args)
262
307
  args.inject do |a,b|
File without changes
data/lib/z3/expr/expr.rb CHANGED
@@ -115,7 +115,7 @@ module Z3
115
115
  a.sort.new(Z3::LowLevel.mk_bvand(a, b))
116
116
  end
117
117
  else
118
- raise Z3::Exception, "Can't perform logic operations on #{a.sort} exprs, only Bool and Bitvec"
118
+ raise Z3::Exception, "Can't perform logic operations on #{args[0].sort} exprs, only Bool and Bitvec"
119
119
  end
120
120
  end
121
121
 
@@ -129,7 +129,7 @@ module Z3
129
129
  a.sort.new(Z3::LowLevel.mk_bvor(a, b))
130
130
  end
131
131
  else
132
- raise Z3::Exception, "Can't perform logic operations on #{a.sort} exprs, only Bool and Bitvec"
132
+ raise Z3::Exception, "Can't perform logic operations on #{args[0].sort} exprs, only Bool and Bitvec"
133
133
  end
134
134
  end
135
135
 
@@ -145,7 +145,7 @@ module Z3
145
145
  a.sort.new(Z3::LowLevel.mk_bvxor(a, b))
146
146
  end
147
147
  else
148
- raise Z3::Exception, "Can't perform logic operations on #{a.sort} exprs, only Bool and Bitvec"
148
+ raise Z3::Exception, "Can't perform logic operations on #{args[0].sort} exprs, only Bool and Bitvec"
149
149
  end
150
150
  end
151
151
 
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/z3/func_decl.rb CHANGED
File without changes
data/lib/z3/goal.rb CHANGED
File without changes
data/lib/z3/hacks.rb CHANGED
File without changes
data/lib/z3/interface.rb CHANGED
File without changes
data/lib/z3/low_level.rb CHANGED
File without changes
@@ -25,6 +25,14 @@ module Z3
25
25
  VeryLowLevel.Z3_algebraic_ge(_ctx_pointer, ast1._ast, ast2._ast)
26
26
  end
27
27
 
28
+ def algebraic_get_i(ast) #=> :uint
29
+ VeryLowLevel.Z3_algebraic_get_i(_ctx_pointer, ast._ast)
30
+ end
31
+
32
+ def algebraic_get_poly(ast) #=> :ast_vector_pointer
33
+ VeryLowLevel.Z3_algebraic_get_poly(_ctx_pointer, ast._ast)
34
+ end
35
+
28
36
  def algebraic_gt(ast1, ast2) #=> :bool
29
37
  VeryLowLevel.Z3_algebraic_gt(_ctx_pointer, ast1._ast, ast2._ast)
30
38
  end
@@ -301,14 +309,6 @@ module Z3
301
309
  VeryLowLevel.Z3_fixedpoint_inc_ref(_ctx_pointer, fixedpoint._fixedpoint)
302
310
  end
303
311
 
304
- def fixedpoint_pop(fixedpoint) #=> :void
305
- VeryLowLevel.Z3_fixedpoint_pop(_ctx_pointer, fixedpoint._fixedpoint)
306
- end
307
-
308
- def fixedpoint_push(fixedpoint) #=> :void
309
- VeryLowLevel.Z3_fixedpoint_push(_ctx_pointer, fixedpoint._fixedpoint)
310
- end
311
-
312
312
  def fixedpoint_query(fixedpoint, ast) #=> :int
313
313
  VeryLowLevel.Z3_fixedpoint_query(_ctx_pointer, fixedpoint._fixedpoint, ast._ast)
314
314
  end
@@ -589,10 +589,18 @@ module Z3
589
589
  VeryLowLevel.Z3_get_num_tactics(_ctx_pointer)
590
590
  end
591
591
 
592
+ def get_numeral_binary_string(ast) #=> :string
593
+ VeryLowLevel.Z3_get_numeral_binary_string(_ctx_pointer, ast._ast)
594
+ end
595
+
592
596
  def get_numeral_decimal_string(ast, num) #=> :string
593
597
  VeryLowLevel.Z3_get_numeral_decimal_string(_ctx_pointer, ast._ast, num)
594
598
  end
595
599
 
600
+ def get_numeral_double(ast) #=> :double
601
+ VeryLowLevel.Z3_get_numeral_double(_ctx_pointer, ast._ast)
602
+ end
603
+
596
604
  def get_numeral_string(ast) #=> :string
597
605
  VeryLowLevel.Z3_get_numeral_string(_ctx_pointer, ast._ast)
598
606
  end
@@ -653,6 +661,10 @@ module Z3
653
661
  VeryLowLevel.Z3_get_range(_ctx_pointer, func_decl._ast)
654
662
  end
655
663
 
664
+ def get_re_sort_basis(sort) #=> :sort_pointer
665
+ VeryLowLevel.Z3_get_re_sort_basis(_ctx_pointer, sort._ast)
666
+ end
667
+
656
668
  def get_relation_arity(sort) #=> :uint
657
669
  VeryLowLevel.Z3_get_relation_arity(_ctx_pointer, sort._ast)
658
670
  end
@@ -661,6 +673,10 @@ module Z3
661
673
  VeryLowLevel.Z3_get_relation_column(_ctx_pointer, sort._ast, num)
662
674
  end
663
675
 
676
+ def get_seq_sort_basis(sort) #=> :sort_pointer
677
+ VeryLowLevel.Z3_get_seq_sort_basis(_ctx_pointer, sort._ast)
678
+ end
679
+
664
680
  def get_sort(ast) #=> :sort_pointer
665
681
  VeryLowLevel.Z3_get_sort(_ctx_pointer, ast._ast)
666
682
  end
@@ -677,6 +693,10 @@ module Z3
677
693
  VeryLowLevel.Z3_get_sort_name(_ctx_pointer, sort._ast)
678
694
  end
679
695
 
696
+ def get_string_length(ast) #=> :uint
697
+ VeryLowLevel.Z3_get_string_length(_ctx_pointer, ast._ast)
698
+ end
699
+
680
700
  def get_symbol_int(sym) #=> :int
681
701
  VeryLowLevel.Z3_get_symbol_int(_ctx_pointer, sym)
682
702
  end
@@ -765,8 +785,8 @@ module Z3
765
785
  VeryLowLevel.Z3_goal_size(_ctx_pointer, goal._goal)
766
786
  end
767
787
 
768
- def goal_to_dimacs_string(goal) #=> :string
769
- VeryLowLevel.Z3_goal_to_dimacs_string(_ctx_pointer, goal._goal)
788
+ def goal_to_dimacs_string(goal, bool) #=> :string
789
+ VeryLowLevel.Z3_goal_to_dimacs_string(_ctx_pointer, goal._goal, bool)
770
790
  end
771
791
 
772
792
  def goal_to_string(goal) #=> :string
@@ -797,6 +817,10 @@ module Z3
797
817
  VeryLowLevel.Z3_is_as_array(_ctx_pointer, ast._ast)
798
818
  end
799
819
 
820
+ def is_char_sort(sort) #=> :bool
821
+ VeryLowLevel.Z3_is_char_sort(_ctx_pointer, sort._ast)
822
+ end
823
+
800
824
  def is_eq_ast(ast1, ast2) #=> :bool
801
825
  VeryLowLevel.Z3_is_eq_ast(_ctx_pointer, ast1._ast, ast2._ast)
802
826
  end
@@ -1013,6 +1037,30 @@ module Z3
1013
1037
  VeryLowLevel.Z3_mk_bvxor(_ctx_pointer, ast1._ast, ast2._ast)
1014
1038
  end
1015
1039
 
1040
+ def mk_char_from_bv(ast) #=> :ast_pointer
1041
+ VeryLowLevel.Z3_mk_char_from_bv(_ctx_pointer, ast._ast)
1042
+ end
1043
+
1044
+ def mk_char_is_digit(ast) #=> :ast_pointer
1045
+ VeryLowLevel.Z3_mk_char_is_digit(_ctx_pointer, ast._ast)
1046
+ end
1047
+
1048
+ def mk_char_le(ast1, ast2) #=> :ast_pointer
1049
+ VeryLowLevel.Z3_mk_char_le(_ctx_pointer, ast1._ast, ast2._ast)
1050
+ end
1051
+
1052
+ def mk_char_sort #=> :sort_pointer
1053
+ VeryLowLevel.Z3_mk_char_sort(_ctx_pointer)
1054
+ end
1055
+
1056
+ def mk_char_to_bv(ast) #=> :ast_pointer
1057
+ VeryLowLevel.Z3_mk_char_to_bv(_ctx_pointer, ast._ast)
1058
+ end
1059
+
1060
+ def mk_char_to_int(ast) #=> :ast_pointer
1061
+ VeryLowLevel.Z3_mk_char_to_int(_ctx_pointer, ast._ast)
1062
+ end
1063
+
1016
1064
  def mk_concat(ast1, ast2) #=> :ast_pointer
1017
1065
  VeryLowLevel.Z3_mk_concat(_ctx_pointer, ast1._ast, ast2._ast)
1018
1066
  end
@@ -1037,6 +1085,10 @@ module Z3
1037
1085
  VeryLowLevel.Z3_mk_div(_ctx_pointer, ast1._ast, ast2._ast)
1038
1086
  end
1039
1087
 
1088
+ def mk_divides(ast1, ast2) #=> :ast_pointer
1089
+ VeryLowLevel.Z3_mk_divides(_ctx_pointer, ast1._ast, ast2._ast)
1090
+ end
1091
+
1040
1092
  def mk_empty_set(sort) #=> :ast_pointer
1041
1093
  VeryLowLevel.Z3_mk_empty_set(_ctx_pointer, sort._ast)
1042
1094
  end
@@ -1365,6 +1417,14 @@ module Z3
1365
1417
  VeryLowLevel.Z3_mk_le(_ctx_pointer, ast1._ast, ast2._ast)
1366
1418
  end
1367
1419
 
1420
+ def mk_linear_order(sort, num) #=> :func_decl_pointer
1421
+ VeryLowLevel.Z3_mk_linear_order(_ctx_pointer, sort._ast, num)
1422
+ end
1423
+
1424
+ def mk_lstring(num, str) #=> :ast_pointer
1425
+ VeryLowLevel.Z3_mk_lstring(_ctx_pointer, num, str)
1426
+ end
1427
+
1368
1428
  def mk_lt(ast1, ast2) #=> :ast_pointer
1369
1429
  VeryLowLevel.Z3_mk_lt(_ctx_pointer, ast1._ast, ast2._ast)
1370
1430
  end
@@ -1393,6 +1453,14 @@ module Z3
1393
1453
  VeryLowLevel.Z3_mk_params(_ctx_pointer)
1394
1454
  end
1395
1455
 
1456
+ def mk_partial_order(sort, num) #=> :func_decl_pointer
1457
+ VeryLowLevel.Z3_mk_partial_order(_ctx_pointer, sort._ast, num)
1458
+ end
1459
+
1460
+ def mk_piecewise_linear_order(sort, num) #=> :func_decl_pointer
1461
+ VeryLowLevel.Z3_mk_piecewise_linear_order(_ctx_pointer, sort._ast, num)
1462
+ end
1463
+
1396
1464
  def mk_power(ast1, ast2) #=> :ast_pointer
1397
1465
  VeryLowLevel.Z3_mk_power(_ctx_pointer, ast1._ast, ast2._ast)
1398
1466
  end
@@ -1401,6 +1469,10 @@ module Z3
1401
1469
  VeryLowLevel.Z3_mk_probe(_ctx_pointer, str)
1402
1470
  end
1403
1471
 
1472
+ def mk_re_allchar(sort) #=> :ast_pointer
1473
+ VeryLowLevel.Z3_mk_re_allchar(_ctx_pointer, sort._ast)
1474
+ end
1475
+
1404
1476
  def mk_re_complement(ast) #=> :ast_pointer
1405
1477
  VeryLowLevel.Z3_mk_re_complement(_ctx_pointer, ast._ast)
1406
1478
  end
@@ -1449,10 +1521,22 @@ module Z3
1449
1521
  VeryLowLevel.Z3_mk_rotate_right(_ctx_pointer, num, ast._ast)
1450
1522
  end
1451
1523
 
1524
+ def mk_sbv_to_str(ast) #=> :ast_pointer
1525
+ VeryLowLevel.Z3_mk_sbv_to_str(_ctx_pointer, ast._ast)
1526
+ end
1527
+
1452
1528
  def mk_select(ast1, ast2) #=> :ast_pointer
1453
1529
  VeryLowLevel.Z3_mk_select(_ctx_pointer, ast1._ast, ast2._ast)
1454
1530
  end
1455
1531
 
1532
+ def mk_seq_last_index(ast1, ast2) #=> :ast_pointer
1533
+ VeryLowLevel.Z3_mk_seq_last_index(_ctx_pointer, ast1._ast, ast2._ast)
1534
+ end
1535
+
1536
+ def mk_seq_nth(ast1, ast2) #=> :ast_pointer
1537
+ VeryLowLevel.Z3_mk_seq_nth(_ctx_pointer, ast1._ast, ast2._ast)
1538
+ end
1539
+
1456
1540
  def mk_set_add(ast1, ast2) #=> :ast_pointer
1457
1541
  VeryLowLevel.Z3_mk_set_add(_ctx_pointer, ast1._ast, ast2._ast)
1458
1542
  end
@@ -1469,6 +1553,10 @@ module Z3
1469
1553
  VeryLowLevel.Z3_mk_set_difference(_ctx_pointer, ast1._ast, ast2._ast)
1470
1554
  end
1471
1555
 
1556
+ def mk_set_has_size(ast1, ast2) #=> :ast_pointer
1557
+ VeryLowLevel.Z3_mk_set_has_size(_ctx_pointer, ast1._ast, ast2._ast)
1558
+ end
1559
+
1472
1560
  def mk_set_member(ast1, ast2) #=> :ast_pointer
1473
1561
  VeryLowLevel.Z3_mk_set_member(_ctx_pointer, ast1._ast, ast2._ast)
1474
1562
  end
@@ -1505,6 +1593,14 @@ module Z3
1505
1593
  VeryLowLevel.Z3_mk_store(_ctx_pointer, ast1._ast, ast2._ast, ast3._ast)
1506
1594
  end
1507
1595
 
1596
+ def mk_str_le(ast1, ast2) #=> :ast_pointer
1597
+ VeryLowLevel.Z3_mk_str_le(_ctx_pointer, ast1._ast, ast2._ast)
1598
+ end
1599
+
1600
+ def mk_str_lt(ast1, ast2) #=> :ast_pointer
1601
+ VeryLowLevel.Z3_mk_str_lt(_ctx_pointer, ast1._ast, ast2._ast)
1602
+ end
1603
+
1508
1604
  def mk_str_to_int(ast) #=> :ast_pointer
1509
1605
  VeryLowLevel.Z3_mk_str_to_int(_ctx_pointer, ast._ast)
1510
1606
  end
@@ -1517,10 +1613,22 @@ module Z3
1517
1613
  VeryLowLevel.Z3_mk_tactic(_ctx_pointer, str)
1518
1614
  end
1519
1615
 
1616
+ def mk_transitive_closure(func_decl) #=> :func_decl_pointer
1617
+ VeryLowLevel.Z3_mk_transitive_closure(_ctx_pointer, func_decl._ast)
1618
+ end
1619
+
1620
+ def mk_tree_order(sort, num) #=> :func_decl_pointer
1621
+ VeryLowLevel.Z3_mk_tree_order(_ctx_pointer, sort._ast, num)
1622
+ end
1623
+
1520
1624
  def mk_true #=> :ast_pointer
1521
1625
  VeryLowLevel.Z3_mk_true(_ctx_pointer)
1522
1626
  end
1523
1627
 
1628
+ def mk_ubv_to_str(ast) #=> :ast_pointer
1629
+ VeryLowLevel.Z3_mk_ubv_to_str(_ctx_pointer, ast._ast)
1630
+ end
1631
+
1524
1632
  def mk_unary_minus(ast) #=> :ast_pointer
1525
1633
  VeryLowLevel.Z3_mk_unary_minus(_ctx_pointer, ast._ast)
1526
1634
  end
@@ -1609,6 +1717,10 @@ module Z3
1609
1717
  VeryLowLevel.Z3_optimize_assert(_ctx_pointer, optimize._optimize, ast._ast)
1610
1718
  end
1611
1719
 
1720
+ def optimize_assert_and_track(optimize, ast1, ast2) #=> :void
1721
+ VeryLowLevel.Z3_optimize_assert_and_track(_ctx_pointer, optimize._optimize, ast1._ast, ast2._ast)
1722
+ end
1723
+
1612
1724
  def optimize_assert_soft(optimize, ast, str, sym) #=> :uint
1613
1725
  VeryLowLevel.Z3_optimize_assert_soft(_ctx_pointer, optimize._optimize, ast._ast, str, sym)
1614
1726
  end
@@ -1997,6 +2109,10 @@ module Z3
1997
2109
  VeryLowLevel.Z3_solver_get_statistics(_ctx_pointer, solver._solver)
1998
2110
  end
1999
2111
 
2112
+ def solver_get_trail(solver) #=> :ast_vector_pointer
2113
+ VeryLowLevel.Z3_solver_get_trail(_ctx_pointer, solver._solver)
2114
+ end
2115
+
2000
2116
  def solver_get_units(solver) #=> :ast_vector_pointer
2001
2117
  VeryLowLevel.Z3_solver_get_units(_ctx_pointer, solver._solver)
2002
2118
  end
@@ -2013,10 +2129,18 @@ module Z3
2013
2129
  VeryLowLevel.Z3_solver_inc_ref(_ctx_pointer, solver._solver)
2014
2130
  end
2015
2131
 
2132
+ def solver_interrupt(solver) #=> :void
2133
+ VeryLowLevel.Z3_solver_interrupt(_ctx_pointer, solver._solver)
2134
+ end
2135
+
2016
2136
  def solver_pop(solver, num) #=> :void
2017
2137
  VeryLowLevel.Z3_solver_pop(_ctx_pointer, solver._solver, num)
2018
2138
  end
2019
2139
 
2140
+ def solver_propagate_register(solver, ast) #=> :uint
2141
+ VeryLowLevel.Z3_solver_propagate_register(_ctx_pointer, solver._solver, ast._ast)
2142
+ end
2143
+
2020
2144
  def solver_push(solver) #=> :void
2021
2145
  VeryLowLevel.Z3_solver_push(_ctx_pointer, solver._solver)
2022
2146
  end
@@ -2029,6 +2153,10 @@ module Z3
2029
2153
  VeryLowLevel.Z3_solver_set_params(_ctx_pointer, solver._solver, params._params)
2030
2154
  end
2031
2155
 
2156
+ def solver_to_dimacs_string(solver, bool) #=> :string
2157
+ VeryLowLevel.Z3_solver_to_dimacs_string(_ctx_pointer, solver._solver, bool)
2158
+ end
2159
+
2032
2160
  def solver_to_string(solver) #=> :string
2033
2161
  VeryLowLevel.Z3_solver_to_string(_ctx_pointer, solver._solver)
2034
2162
  end
data/lib/z3/model.rb CHANGED
File without changes
data/lib/z3/optimize.rb CHANGED
File without changes
data/lib/z3/printer.rb CHANGED
File without changes
data/lib/z3/probe.rb CHANGED
File without changes
data/lib/z3/solver.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/z3/sort/sort.rb CHANGED
File without changes
data/lib/z3/tactic.rb CHANGED
File without changes
@@ -4,7 +4,7 @@ require "ffi"
4
4
  module Z3
5
5
  module VeryLowLevel
6
6
  extend FFI::Library
7
- ffi_lib "z3"
7
+ ffi_lib ["libz3.so.4.8", "libz3.so", "z3"]
8
8
 
9
9
  class << self
10
10
  # Aliases defined just to make APIs below look nicer
@@ -12,6 +12,10 @@ module Z3
12
12
  arg_types = arg_types.map { |t| map_type(t) }
13
13
  return_type = map_type(return_type)
14
14
  super(name, arg_types, return_type)
15
+ rescue FFI::NotFoundError
16
+ define_singleton_method(name) do |*args|
17
+ raise Z3::Exception, "Could not find #{name} in the Z3 library. It is likely that the Z3 library has wrong version."
18
+ end
15
19
  end
16
20
 
17
21
  def map_type(t)
@@ -6,6 +6,8 @@ module Z3
6
6
  attach_function :Z3_algebraic_div, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
7
7
  attach_function :Z3_algebraic_eq, [:ctx_pointer, :ast_pointer, :ast_pointer], :bool
8
8
  attach_function :Z3_algebraic_ge, [:ctx_pointer, :ast_pointer, :ast_pointer], :bool
9
+ attach_function :Z3_algebraic_get_i, [:ctx_pointer, :ast_pointer], :uint
10
+ attach_function :Z3_algebraic_get_poly, [:ctx_pointer, :ast_pointer], :ast_vector_pointer
9
11
  attach_function :Z3_algebraic_gt, [:ctx_pointer, :ast_pointer, :ast_pointer], :bool
10
12
  attach_function :Z3_algebraic_is_neg, [:ctx_pointer, :ast_pointer], :bool
11
13
  attach_function :Z3_algebraic_is_pos, [:ctx_pointer, :ast_pointer], :bool
@@ -75,8 +77,6 @@ module Z3
75
77
  attach_function :Z3_fixedpoint_get_rules_along_trace, [:ctx_pointer, :fixedpoint_pointer], :ast_vector_pointer
76
78
  attach_function :Z3_fixedpoint_get_statistics, [:ctx_pointer, :fixedpoint_pointer], :stats_pointer
77
79
  attach_function :Z3_fixedpoint_inc_ref, [:ctx_pointer, :fixedpoint_pointer], :void
78
- attach_function :Z3_fixedpoint_pop, [:ctx_pointer, :fixedpoint_pointer], :void
79
- attach_function :Z3_fixedpoint_push, [:ctx_pointer, :fixedpoint_pointer], :void
80
80
  attach_function :Z3_fixedpoint_query, [:ctx_pointer, :fixedpoint_pointer, :ast_pointer], :int
81
81
  attach_function :Z3_fixedpoint_query_from_lvl, [:ctx_pointer, :fixedpoint_pointer, :ast_pointer, :uint], :int
82
82
  attach_function :Z3_fixedpoint_register_relation, [:ctx_pointer, :fixedpoint_pointer, :func_decl_pointer], :void
@@ -147,7 +147,9 @@ module Z3
147
147
  attach_function :Z3_get_index_value, [:ctx_pointer, :ast_pointer], :uint
148
148
  attach_function :Z3_get_num_probes, [:ctx_pointer], :uint
149
149
  attach_function :Z3_get_num_tactics, [:ctx_pointer], :uint
150
+ attach_function :Z3_get_numeral_binary_string, [:ctx_pointer, :ast_pointer], :string
150
151
  attach_function :Z3_get_numeral_decimal_string, [:ctx_pointer, :ast_pointer, :uint], :string
152
+ attach_function :Z3_get_numeral_double, [:ctx_pointer, :ast_pointer], :double
151
153
  attach_function :Z3_get_numeral_string, [:ctx_pointer, :ast_pointer], :string
152
154
  attach_function :Z3_get_numerator, [:ctx_pointer, :ast_pointer], :ast_pointer
153
155
  attach_function :Z3_get_pattern, [:ctx_pointer, :pattern_pointer, :uint], :ast_pointer
@@ -163,12 +165,15 @@ module Z3
163
165
  attach_function :Z3_get_quantifier_pattern_ast, [:ctx_pointer, :ast_pointer, :uint], :pattern_pointer
164
166
  attach_function :Z3_get_quantifier_weight, [:ctx_pointer, :ast_pointer], :uint
165
167
  attach_function :Z3_get_range, [:ctx_pointer, :func_decl_pointer], :sort_pointer
168
+ attach_function :Z3_get_re_sort_basis, [:ctx_pointer, :sort_pointer], :sort_pointer
166
169
  attach_function :Z3_get_relation_arity, [:ctx_pointer, :sort_pointer], :uint
167
170
  attach_function :Z3_get_relation_column, [:ctx_pointer, :sort_pointer, :uint], :sort_pointer
171
+ attach_function :Z3_get_seq_sort_basis, [:ctx_pointer, :sort_pointer], :sort_pointer
168
172
  attach_function :Z3_get_sort, [:ctx_pointer, :ast_pointer], :sort_pointer
169
173
  attach_function :Z3_get_sort_id, [:ctx_pointer, :sort_pointer], :uint
170
174
  attach_function :Z3_get_sort_kind, [:ctx_pointer, :sort_pointer], :uint
171
175
  attach_function :Z3_get_sort_name, [:ctx_pointer, :sort_pointer], :symbol_pointer
176
+ attach_function :Z3_get_string_length, [:ctx_pointer, :ast_pointer], :uint
172
177
  attach_function :Z3_get_symbol_int, [:ctx_pointer, :symbol_pointer], :int
173
178
  attach_function :Z3_get_symbol_kind, [:ctx_pointer, :symbol_pointer], :uint
174
179
  attach_function :Z3_get_symbol_string, [:ctx_pointer, :symbol_pointer], :string
@@ -191,7 +196,7 @@ module Z3
191
196
  attach_function :Z3_goal_precision, [:ctx_pointer, :goal_pointer], :uint
192
197
  attach_function :Z3_goal_reset, [:ctx_pointer, :goal_pointer], :void
193
198
  attach_function :Z3_goal_size, [:ctx_pointer, :goal_pointer], :uint
194
- attach_function :Z3_goal_to_dimacs_string, [:ctx_pointer, :goal_pointer], :string
199
+ attach_function :Z3_goal_to_dimacs_string, [:ctx_pointer, :goal_pointer, :bool], :string
195
200
  attach_function :Z3_goal_to_string, [:ctx_pointer, :goal_pointer], :string
196
201
  attach_function :Z3_goal_translate, [:ctx_pointer, :goal_pointer, :ctx_pointer], :goal_pointer
197
202
  attach_function :Z3_inc_ref, [:ctx_pointer, :ast_pointer], :void
@@ -199,6 +204,7 @@ module Z3
199
204
  attach_function :Z3_is_algebraic_number, [:ctx_pointer, :ast_pointer], :bool
200
205
  attach_function :Z3_is_app, [:ctx_pointer, :ast_pointer], :bool
201
206
  attach_function :Z3_is_as_array, [:ctx_pointer, :ast_pointer], :bool
207
+ attach_function :Z3_is_char_sort, [:ctx_pointer, :sort_pointer], :bool
202
208
  attach_function :Z3_is_eq_ast, [:ctx_pointer, :ast_pointer, :ast_pointer], :bool
203
209
  attach_function :Z3_is_eq_func_decl, [:ctx_pointer, :func_decl_pointer, :func_decl_pointer], :bool
204
210
  attach_function :Z3_is_eq_sort, [:ctx_pointer, :sort_pointer, :sort_pointer], :bool
@@ -253,12 +259,19 @@ module Z3
253
259
  attach_function :Z3_mk_bvurem, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
254
260
  attach_function :Z3_mk_bvxnor, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
255
261
  attach_function :Z3_mk_bvxor, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
262
+ attach_function :Z3_mk_char_from_bv, [:ctx_pointer, :ast_pointer], :ast_pointer
263
+ attach_function :Z3_mk_char_is_digit, [:ctx_pointer, :ast_pointer], :ast_pointer
264
+ attach_function :Z3_mk_char_le, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
265
+ attach_function :Z3_mk_char_sort, [:ctx_pointer], :sort_pointer
266
+ attach_function :Z3_mk_char_to_bv, [:ctx_pointer, :ast_pointer], :ast_pointer
267
+ attach_function :Z3_mk_char_to_int, [:ctx_pointer, :ast_pointer], :ast_pointer
256
268
  attach_function :Z3_mk_concat, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
257
269
  attach_function :Z3_mk_config, [], :config_pointer
258
270
  attach_function :Z3_mk_const, [:ctx_pointer, :symbol_pointer, :sort_pointer], :ast_pointer
259
271
  attach_function :Z3_mk_const_array, [:ctx_pointer, :sort_pointer, :ast_pointer], :ast_pointer
260
272
  attach_function :Z3_mk_context_rc, [:config_pointer], :ctx_pointer
261
273
  attach_function :Z3_mk_div, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
274
+ attach_function :Z3_mk_divides, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
262
275
  attach_function :Z3_mk_empty_set, [:ctx_pointer, :sort_pointer], :ast_pointer
263
276
  attach_function :Z3_mk_eq, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
264
277
  attach_function :Z3_mk_ext_rotate_left, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
@@ -341,6 +354,8 @@ module Z3
341
354
  attach_function :Z3_mk_is_int, [:ctx_pointer, :ast_pointer], :ast_pointer
342
355
  attach_function :Z3_mk_ite, [:ctx_pointer, :ast_pointer, :ast_pointer, :ast_pointer], :ast_pointer
343
356
  attach_function :Z3_mk_le, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
357
+ attach_function :Z3_mk_linear_order, [:ctx_pointer, :sort_pointer, :uint], :func_decl_pointer
358
+ attach_function :Z3_mk_lstring, [:ctx_pointer, :uint, :string], :ast_pointer
344
359
  attach_function :Z3_mk_lt, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
345
360
  attach_function :Z3_mk_mod, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
346
361
  attach_function :Z3_mk_model, [:ctx_pointer], :model_pointer
@@ -348,8 +363,11 @@ module Z3
348
363
  attach_function :Z3_mk_numeral, [:ctx_pointer, :string, :sort_pointer], :ast_pointer
349
364
  attach_function :Z3_mk_optimize, [:ctx_pointer], :optimize_pointer
350
365
  attach_function :Z3_mk_params, [:ctx_pointer], :params_pointer
366
+ attach_function :Z3_mk_partial_order, [:ctx_pointer, :sort_pointer, :uint], :func_decl_pointer
367
+ attach_function :Z3_mk_piecewise_linear_order, [:ctx_pointer, :sort_pointer, :uint], :func_decl_pointer
351
368
  attach_function :Z3_mk_power, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
352
369
  attach_function :Z3_mk_probe, [:ctx_pointer, :string], :probe_pointer
370
+ attach_function :Z3_mk_re_allchar, [:ctx_pointer, :sort_pointer], :ast_pointer
353
371
  attach_function :Z3_mk_re_complement, [:ctx_pointer, :ast_pointer], :ast_pointer
354
372
  attach_function :Z3_mk_re_empty, [:ctx_pointer, :sort_pointer], :ast_pointer
355
373
  attach_function :Z3_mk_re_full, [:ctx_pointer, :sort_pointer], :ast_pointer
@@ -362,11 +380,15 @@ module Z3
362
380
  attach_function :Z3_mk_repeat, [:ctx_pointer, :uint, :ast_pointer], :ast_pointer
363
381
  attach_function :Z3_mk_rotate_left, [:ctx_pointer, :uint, :ast_pointer], :ast_pointer
364
382
  attach_function :Z3_mk_rotate_right, [:ctx_pointer, :uint, :ast_pointer], :ast_pointer
383
+ attach_function :Z3_mk_sbv_to_str, [:ctx_pointer, :ast_pointer], :ast_pointer
365
384
  attach_function :Z3_mk_select, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
385
+ attach_function :Z3_mk_seq_last_index, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
386
+ attach_function :Z3_mk_seq_nth, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
366
387
  attach_function :Z3_mk_set_add, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
367
388
  attach_function :Z3_mk_set_complement, [:ctx_pointer, :ast_pointer], :ast_pointer
368
389
  attach_function :Z3_mk_set_del, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
369
390
  attach_function :Z3_mk_set_difference, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
391
+ attach_function :Z3_mk_set_has_size, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
370
392
  attach_function :Z3_mk_set_member, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
371
393
  attach_function :Z3_mk_set_sort, [:ctx_pointer, :sort_pointer], :sort_pointer
372
394
  attach_function :Z3_mk_set_subset, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
@@ -376,10 +398,15 @@ module Z3
376
398
  attach_function :Z3_mk_solver_for_logic, [:ctx_pointer, :symbol_pointer], :solver_pointer
377
399
  attach_function :Z3_mk_solver_from_tactic, [:ctx_pointer, :tactic_pointer], :solver_pointer
378
400
  attach_function :Z3_mk_store, [:ctx_pointer, :ast_pointer, :ast_pointer, :ast_pointer], :ast_pointer
401
+ attach_function :Z3_mk_str_le, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
402
+ attach_function :Z3_mk_str_lt, [:ctx_pointer, :ast_pointer, :ast_pointer], :ast_pointer
379
403
  attach_function :Z3_mk_str_to_int, [:ctx_pointer, :ast_pointer], :ast_pointer
380
404
  attach_function :Z3_mk_string_symbol, [:ctx_pointer, :string], :symbol_pointer
381
405
  attach_function :Z3_mk_tactic, [:ctx_pointer, :string], :tactic_pointer
406
+ attach_function :Z3_mk_transitive_closure, [:ctx_pointer, :func_decl_pointer], :func_decl_pointer
407
+ attach_function :Z3_mk_tree_order, [:ctx_pointer, :sort_pointer, :uint], :func_decl_pointer
382
408
  attach_function :Z3_mk_true, [:ctx_pointer], :ast_pointer
409
+ attach_function :Z3_mk_ubv_to_str, [:ctx_pointer, :ast_pointer], :ast_pointer
383
410
  attach_function :Z3_mk_unary_minus, [:ctx_pointer, :ast_pointer], :ast_pointer
384
411
  attach_function :Z3_mk_uninterpreted_sort, [:ctx_pointer, :symbol_pointer], :sort_pointer
385
412
  attach_function :Z3_mk_unsigned_int, [:ctx_pointer, :uint, :sort_pointer], :ast_pointer
@@ -402,6 +429,7 @@ module Z3
402
429
  attach_function :Z3_model_to_string, [:ctx_pointer, :model_pointer], :string
403
430
  attach_function :Z3_model_translate, [:ctx_pointer, :model_pointer, :ctx_pointer], :model_pointer
404
431
  attach_function :Z3_optimize_assert, [:ctx_pointer, :optimize_pointer, :ast_pointer], :void
432
+ attach_function :Z3_optimize_assert_and_track, [:ctx_pointer, :optimize_pointer, :ast_pointer, :ast_pointer], :void
405
433
  attach_function :Z3_optimize_assert_soft, [:ctx_pointer, :optimize_pointer, :ast_pointer, :string, :symbol_pointer], :uint
406
434
  attach_function :Z3_optimize_dec_ref, [:ctx_pointer, :optimize_pointer], :void
407
435
  attach_function :Z3_optimize_from_file, [:ctx_pointer, :optimize_pointer, :string], :void
@@ -499,14 +527,18 @@ module Z3
499
527
  attach_function :Z3_solver_get_proof, [:ctx_pointer, :solver_pointer], :ast_pointer
500
528
  attach_function :Z3_solver_get_reason_unknown, [:ctx_pointer, :solver_pointer], :string
501
529
  attach_function :Z3_solver_get_statistics, [:ctx_pointer, :solver_pointer], :stats_pointer
530
+ attach_function :Z3_solver_get_trail, [:ctx_pointer, :solver_pointer], :ast_vector_pointer
502
531
  attach_function :Z3_solver_get_units, [:ctx_pointer, :solver_pointer], :ast_vector_pointer
503
532
  attach_function :Z3_solver_get_unsat_core, [:ctx_pointer, :solver_pointer], :ast_vector_pointer
504
533
  attach_function :Z3_solver_import_model_converter, [:ctx_pointer, :solver_pointer, :solver_pointer], :void
505
534
  attach_function :Z3_solver_inc_ref, [:ctx_pointer, :solver_pointer], :void
535
+ attach_function :Z3_solver_interrupt, [:ctx_pointer, :solver_pointer], :void
506
536
  attach_function :Z3_solver_pop, [:ctx_pointer, :solver_pointer, :uint], :void
537
+ attach_function :Z3_solver_propagate_register, [:ctx_pointer, :solver_pointer, :ast_pointer], :uint
507
538
  attach_function :Z3_solver_push, [:ctx_pointer, :solver_pointer], :void
508
539
  attach_function :Z3_solver_reset, [:ctx_pointer, :solver_pointer], :void
509
540
  attach_function :Z3_solver_set_params, [:ctx_pointer, :solver_pointer, :params_pointer], :void
541
+ attach_function :Z3_solver_to_dimacs_string, [:ctx_pointer, :solver_pointer, :bool], :string
510
542
  attach_function :Z3_solver_to_string, [:ctx_pointer, :solver_pointer], :string
511
543
  attach_function :Z3_stats_dec_ref, [:ctx_pointer, :stats_pointer], :void
512
544
  attach_function :Z3_stats_get_double_value, [:ctx_pointer, :stats_pointer, :uint], :double
data/lib/z3.rb CHANGED
File without changes
File without changes
File without changes