z3 0.0.20180624 → 0.0.20211213

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -4
  3. data/Rakefile +15 -8
  4. data/examples/abc_path +187 -0
  5. data/examples/abc_path-1.txt +7 -0
  6. data/examples/algebra_problems +12 -12
  7. data/examples/aquarium +133 -0
  8. data/examples/aquarium-1.txt +11 -0
  9. data/examples/bridges +2 -2
  10. data/examples/cats_organized_neatly +133 -0
  11. data/examples/cats_organized_neatly-10.txt +15 -0
  12. data/examples/cats_organized_neatly-3.txt +8 -0
  13. data/examples/cats_organized_neatly-48.txt +32 -0
  14. data/examples/circuit_problems +4 -4
  15. data/examples/clogic_puzzle +2 -2
  16. data/examples/color_nonogram +150 -0
  17. data/examples/color_nonogram-1.txt +23 -0
  18. data/examples/crossflip +2 -4
  19. data/examples/dominion +153 -0
  20. data/examples/dominion-1.txt +8 -0
  21. data/examples/dominosa +133 -0
  22. data/examples/dominosa-1.txt +8 -0
  23. data/examples/eulero +99 -0
  24. data/examples/eulero-1.txt +5 -0
  25. data/examples/four_hackers_puzzle +2 -2
  26. data/examples/futoshiki +128 -0
  27. data/examples/futoshiki-1.txt +17 -0
  28. data/examples/kakurasu +73 -0
  29. data/examples/kakurasu-1.txt +2 -0
  30. data/examples/kakuro +2 -2
  31. data/examples/killer_sudoku +88 -0
  32. data/examples/killer_sudoku-1.txt +17 -0
  33. data/examples/killer_sudoku-2.txt +53 -0
  34. data/examples/kinematics_problems +20 -20
  35. data/examples/knights_puzzle +2 -2
  36. data/examples/kropki +100 -0
  37. data/examples/kropki-1.txt +13 -0
  38. data/examples/letter_connections +2 -2
  39. data/examples/light_up +2 -2
  40. data/examples/minisudoku +2 -2
  41. data/examples/miracle_sudoku +135 -0
  42. data/examples/miracle_sudoku-1.txt +9 -0
  43. data/examples/mortal_coil_puzzle +2 -2
  44. data/examples/nanro +245 -0
  45. data/examples/nanro-1.txt +8 -0
  46. data/examples/nine_clocks +106 -0
  47. data/examples/nonogram +2 -2
  48. data/examples/pyramid_nonogram +2 -2
  49. data/examples/regexp_crossword_solver +2 -2
  50. data/examples/regexp_solver +2 -2
  51. data/examples/renzoku +124 -0
  52. data/examples/renzoku-1.txt +17 -0
  53. data/examples/sandwich_sudoku +101 -0
  54. data/examples/sandwich_sudoku-1.txt +10 -0
  55. data/examples/selfref +2 -2
  56. data/examples/simple_regexp_parser.rb +58 -56
  57. data/examples/skyscrapers +118 -0
  58. data/examples/skyscrapers-1.txt +6 -0
  59. data/examples/skyscrapers-2.txt +11 -0
  60. data/examples/star_battle +134 -0
  61. data/examples/star_battle-1.txt +10 -0
  62. data/examples/stitches +180 -0
  63. data/examples/stitches-1.txt +11 -0
  64. data/examples/sudoku +2 -2
  65. data/examples/suguru +199 -0
  66. data/examples/suguru-1.txt +17 -0
  67. data/examples/verbal_arithmetic +2 -2
  68. data/examples/yajilin +268 -0
  69. data/examples/yajilin-1.txt +10 -0
  70. data/lib/z3/ast.rb +8 -0
  71. data/lib/z3/expr/bitvec_expr.rb +10 -0
  72. data/lib/z3/expr/expr.rb +16 -15
  73. data/lib/z3/low_level.rb +6 -2
  74. data/lib/z3/low_level_auto.rb +180 -36
  75. data/lib/z3/optimize.rb +5 -4
  76. data/lib/z3/printer.rb +29 -1
  77. data/lib/z3/sort/bitvec_sort.rb +1 -0
  78. data/lib/z3/sort/sort.rb +9 -5
  79. data/lib/z3/very_low_level.rb +8 -5
  80. data/lib/z3/very_low_level_auto.rb +45 -9
  81. data/spec/bitvec_expr_spec.rb +35 -21
  82. data/spec/bitvec_sort_spec.rb +4 -0
  83. data/spec/expr_spec.rb +62 -0
  84. data/spec/integration/abc_path_spec.rb +21 -0
  85. data/spec/integration/aquarium_spec.rb +27 -0
  86. data/spec/integration/cats_organized_neatly_spec.rb +14 -0
  87. data/spec/integration/color_nonogram_spec.rb +28 -0
  88. data/spec/integration/dominion_spec.rb +14 -0
  89. data/spec/integration/dominosa_spec.rb +21 -0
  90. data/spec/integration/eulero_spec.rb +11 -0
  91. data/spec/integration/futoshiki_spec.rb +23 -0
  92. data/spec/integration/kakurasu_spec.rb +18 -0
  93. data/spec/integration/killer_sudoku_spec.rb +10 -0
  94. data/spec/integration/knights_puzzle_spec.rb +11 -11
  95. data/spec/integration/kropki_spec.rb +19 -0
  96. data/spec/integration/miracle_sudoku_spec.rb +15 -0
  97. data/spec/integration/mortal_coil_puzzle_spec.rb +8 -6
  98. data/spec/integration/nanro_spec.rb +39 -0
  99. data/spec/integration/nine_clocks_spec.rb +30 -0
  100. data/spec/integration/oneofus_spec.rb +7 -15
  101. data/spec/integration/regexp_crossword_solver_spec.rb +1 -1
  102. data/spec/integration/renzoku_spec.rb +23 -0
  103. data/spec/integration/sandwich_sudoku_spec.rb +15 -0
  104. data/spec/integration/skyscraper_spec.rb +10 -0
  105. data/spec/integration/star_battle_spec.rb +27 -0
  106. data/spec/integration/stitches_spec.rb +25 -0
  107. data/spec/integration/suguru_spec.rb +23 -0
  108. data/spec/integration/yajilin_spec.rb +25 -0
  109. data/spec/interface_spec.rb +18 -0
  110. data/spec/optimize_spec.rb +6 -4
  111. data/spec/printer_spec.rb +30 -0
  112. data/spec/set_expr_spec.rb +14 -8
  113. data/spec/solver_spec.rb +4 -5
  114. data/spec/spec_helper.rb +15 -0
  115. metadata +104 -24
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: z3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20180624
4
+ version: 0.0.20211213
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Wegrzanowski
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-24 00:00:00.000000000 Z
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -30,70 +30,84 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '12'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '12'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '3.8'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '3.8'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: simplecov
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '0.16'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '0.16'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: regexp_parser
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.3'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.3'
83
+ - !ruby/object:Gem::Dependency
84
+ name: paint
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - ">="
74
88
  - !ruby/object:Gem::Version
75
- version: '0'
89
+ version: 2.1.0
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - ">="
81
95
  - !ruby/object:Gem::Version
82
- version: '0'
96
+ version: 2.1.0
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: ffi
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ">="
101
+ - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '0'
103
+ version: '1.9'
90
104
  type: :runtime
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ">="
108
+ - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '0'
110
+ version: '1.9'
97
111
  description: Ruby bindings for Z3 Constraint Solver
98
112
  email: Tomasz.Wegrzanowski@gmail.com
99
113
  executables: []
@@ -103,29 +117,59 @@ files:
103
117
  - ".rspec"
104
118
  - README.md
105
119
  - Rakefile
120
+ - examples/abc_path
121
+ - examples/abc_path-1.txt
106
122
  - examples/algebra_problems
123
+ - examples/aquarium
124
+ - examples/aquarium-1.txt
107
125
  - examples/basic_int_math
108
126
  - examples/basic_logic
109
127
  - examples/bit_tricks
110
128
  - examples/bridges
111
129
  - examples/bridges-1.txt
130
+ - examples/cats_organized_neatly
131
+ - examples/cats_organized_neatly-10.txt
132
+ - examples/cats_organized_neatly-3.txt
133
+ - examples/cats_organized_neatly-48.txt
112
134
  - examples/circuit_problems
113
135
  - examples/clogic_puzzle
136
+ - examples/color_nonogram
137
+ - examples/color_nonogram-1.txt
114
138
  - examples/crossflip
139
+ - examples/dominion
140
+ - examples/dominion-1.txt
141
+ - examples/dominosa
142
+ - examples/dominosa-1.txt
143
+ - examples/eulero
144
+ - examples/eulero-1.txt
115
145
  - examples/four_hackers_puzzle
146
+ - examples/futoshiki
147
+ - examples/futoshiki-1.txt
116
148
  - examples/geometry_problem
149
+ - examples/kakurasu
150
+ - examples/kakurasu-1.txt
117
151
  - examples/kakuro
118
152
  - examples/kakuro-1.txt
153
+ - examples/killer_sudoku
154
+ - examples/killer_sudoku-1.txt
155
+ - examples/killer_sudoku-2.txt
119
156
  - examples/kinematics_problems
120
157
  - examples/knights_puzzle
158
+ - examples/kropki
159
+ - examples/kropki-1.txt
121
160
  - examples/letter_connections
122
161
  - examples/letter_connections-1.txt
123
162
  - examples/light_up
124
163
  - examples/light_up-1.txt
125
164
  - examples/minisudoku
126
165
  - examples/minisudoku-1.txt
166
+ - examples/miracle_sudoku
167
+ - examples/miracle_sudoku-1.txt
127
168
  - examples/mortal_coil_puzzle
128
169
  - examples/mortal_coil_puzzle-9.txt
170
+ - examples/nanro
171
+ - examples/nanro-1.txt
172
+ - examples/nine_clocks
129
173
  - examples/nonogram
130
174
  - examples/oneofus
131
175
  - examples/pyramid_nonogram
@@ -151,11 +195,26 @@ files:
151
195
  - examples/regexp_crossword_solver
152
196
  - examples/regexp_solver
153
197
  - examples/regexp_string_matcher.rb
198
+ - examples/renzoku
199
+ - examples/renzoku-1.txt
200
+ - examples/sandwich_sudoku
201
+ - examples/sandwich_sudoku-1.txt
154
202
  - examples/selfref
155
203
  - examples/simple_regexp_parser.rb
204
+ - examples/skyscrapers
205
+ - examples/skyscrapers-1.txt
206
+ - examples/skyscrapers-2.txt
207
+ - examples/star_battle
208
+ - examples/star_battle-1.txt
209
+ - examples/stitches
210
+ - examples/stitches-1.txt
156
211
  - examples/sudoku
157
212
  - examples/sudoku-1.txt
213
+ - examples/suguru
214
+ - examples/suguru-1.txt
158
215
  - examples/verbal_arithmetic
216
+ - examples/yajilin
217
+ - examples/yajilin-1.txt
159
218
  - examples/zebra_puzzle
160
219
  - lib/z3.rb
161
220
  - lib/z3/ast.rb
@@ -207,31 +266,53 @@ files:
207
266
  - spec/goal_spec.rb
208
267
  - spec/int_expr_spec.rb
209
268
  - spec/int_sort_spec.rb
269
+ - spec/integration/abc_path_spec.rb
210
270
  - spec/integration/algebra_problems_spec.rb
271
+ - spec/integration/aquarium_spec.rb
211
272
  - spec/integration/basic_int_math_spec.rb
212
273
  - spec/integration/basic_logic_spec.rb
213
274
  - spec/integration/bit_tricks_spec.rb
214
275
  - spec/integration/bridges_spec.rb
276
+ - spec/integration/cats_organized_neatly_spec.rb
215
277
  - spec/integration/cicruit_problem_spec.rb
278
+ - spec/integration/color_nonogram_spec.rb
216
279
  - spec/integration/crossflip_spec.rb
280
+ - spec/integration/dominion_spec.rb
281
+ - spec/integration/dominosa_spec.rb
282
+ - spec/integration/eulero_spec.rb
217
283
  - spec/integration/four_hackers_puzzle_spec.rb
284
+ - spec/integration/futoshiki_spec.rb
218
285
  - spec/integration/geometry_problem_spec.rb
286
+ - spec/integration/kakurasu_spec.rb
219
287
  - spec/integration/kakuro_spec.rb
288
+ - spec/integration/killer_sudoku_spec.rb
220
289
  - spec/integration/kinematics_problems_spec.rb
221
290
  - spec/integration/knights_puzzle_spec.rb
291
+ - spec/integration/kropki_spec.rb
222
292
  - spec/integration/letter_connections_spec.rb
223
293
  - spec/integration/light_up_spec.rb
224
294
  - spec/integration/minisudoku_spec.rb
295
+ - spec/integration/miracle_sudoku_spec.rb
225
296
  - spec/integration/mortal_coil_puzzle_spec.rb
297
+ - spec/integration/nanro_spec.rb
298
+ - spec/integration/nine_clocks_spec.rb
226
299
  - spec/integration/nonogram_spec.rb
227
300
  - spec/integration/oneofus_spec.rb
228
301
  - spec/integration/pyramid_nonogram_spec.rb
229
302
  - spec/integration/regexp_crossword_solver_spec.rb
230
303
  - spec/integration/regexp_solver_spec.rb
304
+ - spec/integration/renzoku_spec.rb
305
+ - spec/integration/sandwich_sudoku_spec.rb
231
306
  - spec/integration/selfref_spec.rb
307
+ - spec/integration/skyscraper_spec.rb
308
+ - spec/integration/star_battle_spec.rb
309
+ - spec/integration/stitches_spec.rb
232
310
  - spec/integration/sudoku_spec.rb
311
+ - spec/integration/suguru_spec.rb
233
312
  - spec/integration/verbal_arithmetic_spec.rb
313
+ - spec/integration/yajilin_spec.rb
234
314
  - spec/integration/zebra_puzzle_spec.rb
315
+ - spec/interface_spec.rb
235
316
  - spec/model_spec.rb
236
317
  - spec/optimize_spec.rb
237
318
  - spec/printer_spec.rb
@@ -251,7 +332,7 @@ homepage: https://github.com/taw/z3
251
332
  licenses:
252
333
  - MIT
253
334
  metadata: {}
254
- post_install_message:
335
+ post_install_message:
255
336
  rdoc_options: []
256
337
  require_paths:
257
338
  - lib
@@ -266,10 +347,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
347
  - !ruby/object:Gem::Version
267
348
  version: '0'
268
349
  requirements:
269
- - z3 library
270
- rubyforge_project:
271
- rubygems_version: 2.7.3
272
- signing_key:
350
+ - z3 library (4.8+)
351
+ rubygems_version: 3.1.2
352
+ signing_key:
273
353
  specification_version: 4
274
354
  summary: Z3 Constraint Solver
275
355
  test_files: []