z3 0.0.20220203 → 0.0.20220320
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/examples/abc_path-1.txt +0 -0
- data/examples/aquarium-1.txt +0 -0
- data/examples/bridges-1.txt +0 -0
- data/examples/cats_organized_neatly-10.txt +0 -0
- data/examples/cats_organized_neatly-3.txt +0 -0
- data/examples/cats_organized_neatly-48.txt +0 -0
- data/examples/color_nonogram-1.txt +0 -0
- data/examples/dominion-1.txt +0 -0
- data/examples/dominosa-1.txt +0 -0
- data/examples/eulero-1.txt +0 -0
- data/examples/futoshiki-1.txt +0 -0
- data/examples/kakurasu-1.txt +0 -0
- data/examples/kakuro-1.txt +0 -0
- data/examples/killer_sudoku-1.txt +0 -0
- data/examples/killer_sudoku-2.txt +0 -0
- data/examples/kropki-1.txt +0 -0
- data/examples/letter_connections-1.txt +0 -0
- data/examples/light_up-1.txt +0 -0
- data/examples/minisudoku-1.txt +0 -0
- data/examples/miracle_sudoku-1.txt +0 -0
- data/examples/mortal_coil_puzzle-9.txt +0 -0
- data/examples/nanro-1.txt +0 -0
- data/examples/regexp_crossword/beginner-1.txt +0 -0
- data/examples/regexp_crossword/beginner-2.txt +0 -0
- data/examples/regexp_crossword/beginner-3.txt +0 -0
- data/examples/regexp_crossword/beginner-4.txt +0 -0
- data/examples/regexp_crossword/beginner-5.txt +0 -0
- data/examples/regexp_crossword/experienced-1.txt +0 -0
- data/examples/regexp_crossword/experienced-2.txt +0 -0
- data/examples/regexp_crossword/experienced-3.txt +0 -0
- data/examples/regexp_crossword/experienced-4.txt +0 -0
- data/examples/regexp_crossword/experienced-5.txt +0 -0
- data/examples/regexp_crossword/tutorial-1.txt +0 -0
- data/examples/regexp_crossword/tutorial-2.txt +0 -0
- data/examples/regexp_crossword/tutorial-3.txt +0 -0
- data/examples/regexp_crossword/tutorial-4.txt +0 -0
- data/examples/regexp_crossword/tutorial-5.txt +0 -0
- data/examples/regexp_crossword/tutorial-6.txt +0 -0
- data/examples/regexp_crossword/tutorial-7.txt +0 -0
- data/examples/regexp_crossword/tutorial-8.txt +0 -0
- data/examples/regexp_crossword/tutorial-9.txt +0 -0
- data/examples/regexp_string_matcher.rb +0 -0
- data/examples/renzoku-1.txt +0 -0
- data/examples/sandwich_sudoku-1.txt +0 -0
- data/examples/simple_regexp_parser.rb +0 -0
- data/examples/skyscrapers-1.txt +0 -0
- data/examples/skyscrapers-2.txt +0 -0
- data/examples/star_battle-1.txt +0 -0
- data/examples/stitches-1.txt +0 -0
- data/examples/sudoku-1.txt +0 -0
- data/examples/suguru-1.txt +0 -0
- data/examples/yajilin-1.txt +0 -0
- data/lib/z3/ast.rb +0 -0
- data/lib/z3/context.rb +0 -0
- data/lib/z3/exception.rb +0 -0
- data/lib/z3/expr/arith_expr.rb +0 -0
- data/lib/z3/expr/array_expr.rb +0 -0
- data/lib/z3/expr/bitvec_expr.rb +47 -2
- data/lib/z3/expr/bool_expr.rb +0 -0
- data/lib/z3/expr/expr.rb +0 -0
- data/lib/z3/expr/float_expr.rb +0 -0
- data/lib/z3/expr/int_expr.rb +0 -0
- data/lib/z3/expr/real_expr.rb +0 -0
- data/lib/z3/expr/rounding_mode_expr.rb +0 -0
- data/lib/z3/expr/set_expr.rb +0 -0
- data/lib/z3/func_decl.rb +0 -0
- data/lib/z3/goal.rb +0 -0
- data/lib/z3/hacks.rb +0 -0
- data/lib/z3/interface.rb +0 -0
- data/lib/z3/low_level.rb +0 -0
- data/lib/z3/low_level_auto.rb +0 -0
- data/lib/z3/model.rb +0 -0
- data/lib/z3/optimize.rb +0 -0
- data/lib/z3/printer.rb +0 -0
- data/lib/z3/probe.rb +0 -0
- data/lib/z3/solver.rb +0 -0
- data/lib/z3/sort/array_sort.rb +0 -0
- data/lib/z3/sort/bitvec_sort.rb +0 -0
- data/lib/z3/sort/bool_sort.rb +0 -0
- data/lib/z3/sort/float_sort.rb +0 -0
- data/lib/z3/sort/int_sort.rb +0 -0
- data/lib/z3/sort/real_sort.rb +0 -0
- data/lib/z3/sort/rounding_mode_sort.rb +0 -0
- data/lib/z3/sort/set_sort.rb +0 -0
- data/lib/z3/sort/sort.rb +0 -0
- data/lib/z3/tactic.rb +0 -0
- data/lib/z3/very_low_level.rb +0 -0
- data/lib/z3/very_low_level_auto.rb +0 -0
- data/lib/z3.rb +0 -0
- data/spec/array_expr_spec.rb +0 -0
- data/spec/array_sort_spec.rb +0 -0
- data/spec/bitvec_expr_spec.rb +13 -0
- data/spec/bitvec_sort_spec.rb +0 -0
- data/spec/bool_expr_spec.rb +0 -0
- data/spec/bool_sort_spec.rb +0 -0
- data/spec/coverage_helper.rb +0 -0
- data/spec/expr_spec.rb +0 -0
- data/spec/float_expr_spec.rb +0 -0
- data/spec/float_sort_spec.rb +0 -0
- data/spec/goal_spec.rb +0 -0
- data/spec/int_expr_spec.rb +0 -0
- data/spec/int_sort_spec.rb +0 -0
- data/spec/integration/abc_path_spec.rb +0 -0
- data/spec/integration/algebra_problems_spec.rb +0 -0
- data/spec/integration/aquarium_spec.rb +0 -0
- data/spec/integration/basic_int_math_spec.rb +0 -0
- data/spec/integration/basic_logic_spec.rb +0 -0
- data/spec/integration/bit_tricks_spec.rb +0 -0
- data/spec/integration/bridges_spec.rb +0 -0
- data/spec/integration/cats_organized_neatly_spec.rb +0 -0
- data/spec/integration/cicruit_problem_spec.rb +0 -0
- data/spec/integration/color_nonogram_spec.rb +0 -0
- data/spec/integration/crossflip_spec.rb +0 -0
- data/spec/integration/dominion_spec.rb +0 -0
- data/spec/integration/dominosa_spec.rb +0 -0
- data/spec/integration/eulero_spec.rb +0 -0
- data/spec/integration/four_hackers_puzzle_spec.rb +0 -0
- data/spec/integration/futoshiki_spec.rb +0 -0
- data/spec/integration/geometry_problem_spec.rb +0 -0
- data/spec/integration/kakurasu_spec.rb +0 -0
- data/spec/integration/kakuro_spec.rb +0 -0
- data/spec/integration/killer_sudoku_spec.rb +0 -0
- data/spec/integration/kinematics_problems_spec.rb +0 -0
- data/spec/integration/knights_puzzle_spec.rb +0 -0
- data/spec/integration/kropki_spec.rb +0 -0
- data/spec/integration/letter_connections_spec.rb +0 -0
- data/spec/integration/light_up_spec.rb +0 -0
- data/spec/integration/minisudoku_spec.rb +0 -0
- data/spec/integration/miracle_sudoku_spec.rb +0 -0
- data/spec/integration/mortal_coil_puzzle_spec.rb +0 -0
- data/spec/integration/nanro_spec.rb +0 -0
- data/spec/integration/nine_clocks_spec.rb +0 -0
- data/spec/integration/nonogram_spec.rb +0 -0
- data/spec/integration/oneofus_spec.rb +0 -0
- data/spec/integration/pyramid_nonogram_spec.rb +0 -0
- data/spec/integration/regexp_crossword_solver_spec.rb +0 -0
- data/spec/integration/regexp_solver_spec.rb +0 -0
- data/spec/integration/renzoku_spec.rb +0 -0
- data/spec/integration/sandwich_sudoku_spec.rb +0 -0
- data/spec/integration/selfref_spec.rb +0 -0
- data/spec/integration/skyscraper_spec.rb +0 -0
- data/spec/integration/star_battle_spec.rb +0 -0
- data/spec/integration/stitches_spec.rb +0 -0
- data/spec/integration/sudoku_spec.rb +0 -0
- data/spec/integration/suguru_spec.rb +0 -0
- data/spec/integration/verbal_arithmetic_spec.rb +0 -0
- data/spec/integration/yajilin_spec.rb +0 -0
- data/spec/integration/zebra_puzzle_spec.rb +0 -0
- data/spec/interface_spec.rb +0 -0
- data/spec/model_spec.rb +0 -0
- data/spec/optimize_spec.rb +0 -0
- data/spec/printer_spec.rb +0 -0
- data/spec/probe_spec.rb +0 -0
- data/spec/real_expr_spec.rb +0 -0
- data/spec/real_sort_spec.rb +0 -0
- data/spec/rounding_mode_expr_spec.rb +0 -0
- data/spec/rounding_mode_sort_spec.rb +0 -0
- data/spec/set_expr_spec.rb +0 -0
- data/spec/set_sort_spec.rb +0 -0
- data/spec/solver_spec.rb +0 -0
- data/spec/sort_spec.rb +0 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/tactic_spec.rb +0 -0
- data/spec/z3_spec.rb +0 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66d1bea928681fdde1b5e1314825832a73a7799008ea43acf31d9f3a2130616d
|
4
|
+
data.tar.gz: f0359749f08556ec7b33ad51118ed9f02f829d4d116246ea7241c37da91b516a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89ff9d1b9273f6395d955ee0bf52a00f4c94e44a932f88ca2f33e9e38ae9a539e8887b1f2e0845296a36eda454d06873fd405d905e4022d3cabad437005ebaf5
|
7
|
+
data.tar.gz: c42b4bbc1211f319a06d82ac9442cfe6341238319b2ae9f4f1ba9deaf482607fa3ced8aaedd77249586b45d89ff990ef111d5476b5695bad855e0a1e788f13fd
|
data/.rspec
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/examples/abc_path-1.txt
CHANGED
File without changes
|
data/examples/aquarium-1.txt
CHANGED
File without changes
|
data/examples/bridges-1.txt
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/examples/dominion-1.txt
CHANGED
File without changes
|
data/examples/dominosa-1.txt
CHANGED
File without changes
|
data/examples/eulero-1.txt
CHANGED
File without changes
|
data/examples/futoshiki-1.txt
CHANGED
File without changes
|
data/examples/kakurasu-1.txt
CHANGED
File without changes
|
data/examples/kakuro-1.txt
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/examples/kropki-1.txt
CHANGED
File without changes
|
File without changes
|
data/examples/light_up-1.txt
CHANGED
File without changes
|
data/examples/minisudoku-1.txt
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/examples/nanro-1.txt
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
data/examples/renzoku-1.txt
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/examples/skyscrapers-1.txt
CHANGED
File without changes
|
data/examples/skyscrapers-2.txt
CHANGED
File without changes
|
data/examples/star_battle-1.txt
CHANGED
File without changes
|
data/examples/stitches-1.txt
CHANGED
File without changes
|
data/examples/sudoku-1.txt
CHANGED
File without changes
|
data/examples/suguru-1.txt
CHANGED
File without changes
|
data/examples/yajilin-1.txt
CHANGED
File without changes
|
data/lib/z3/ast.rb
CHANGED
File without changes
|
data/lib/z3/context.rb
CHANGED
File without changes
|
data/lib/z3/exception.rb
CHANGED
File without changes
|
data/lib/z3/expr/arith_expr.rb
CHANGED
File without changes
|
data/lib/z3/expr/array_expr.rb
CHANGED
File without changes
|
data/lib/z3/expr/bitvec_expr.rb
CHANGED
@@ -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|
|
data/lib/z3/expr/bool_expr.rb
CHANGED
File without changes
|
data/lib/z3/expr/expr.rb
CHANGED
File without changes
|
data/lib/z3/expr/float_expr.rb
CHANGED
File without changes
|
data/lib/z3/expr/int_expr.rb
CHANGED
File without changes
|
data/lib/z3/expr/real_expr.rb
CHANGED
File without changes
|
File without changes
|
data/lib/z3/expr/set_expr.rb
CHANGED
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
|
data/lib/z3/low_level_auto.rb
CHANGED
File without changes
|
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
|
data/lib/z3/sort/array_sort.rb
CHANGED
File without changes
|
data/lib/z3/sort/bitvec_sort.rb
CHANGED
File without changes
|
data/lib/z3/sort/bool_sort.rb
CHANGED
File without changes
|
data/lib/z3/sort/float_sort.rb
CHANGED
File without changes
|
data/lib/z3/sort/int_sort.rb
CHANGED
File without changes
|
data/lib/z3/sort/real_sort.rb
CHANGED
File without changes
|
File without changes
|
data/lib/z3/sort/set_sort.rb
CHANGED
File without changes
|
data/lib/z3/sort/sort.rb
CHANGED
File without changes
|
data/lib/z3/tactic.rb
CHANGED
File without changes
|
data/lib/z3/very_low_level.rb
CHANGED
File without changes
|
File without changes
|
data/lib/z3.rb
CHANGED
File without changes
|
data/spec/array_expr_spec.rb
CHANGED
File without changes
|
data/spec/array_sort_spec.rb
CHANGED
File without changes
|
data/spec/bitvec_expr_spec.rb
CHANGED
@@ -36,6 +36,19 @@ module Z3
|
|
36
36
|
expect([a == 30, b == 42, c == (a * b)]).to have_solution(c => 236)
|
37
37
|
end
|
38
38
|
|
39
|
+
it "/" do
|
40
|
+
expect{ a / b }.to raise_error(Z3::Exception)
|
41
|
+
expect([a == 200, b == 20, c == a.unsigned_div(b)]).to have_solution(c => 10)
|
42
|
+
expect([a == 200, b == 20, c == a.signed_div(b)]).to have_solution(c => 254)
|
43
|
+
end
|
44
|
+
|
45
|
+
it "%" do
|
46
|
+
expect{ a % b }.to raise_error(Z3::Exception)
|
47
|
+
expect([a == 200, b == 20, c == a.signed_mod(b)]).to have_solution(c => 4)
|
48
|
+
expect([a == 200, b == 20, c == a.signed_rem(b)]).to have_solution(c => 240)
|
49
|
+
expect([a == 200, b == 20, c == a.unsigned_rem(b)]).to have_solution(c => 0)
|
50
|
+
end
|
51
|
+
|
39
52
|
it "&" do
|
40
53
|
expect([a == 50, b == 27, c == (a & b)]).to have_solution(c => 18)
|
41
54
|
end
|
data/spec/bitvec_sort_spec.rb
CHANGED
File without changes
|
data/spec/bool_expr_spec.rb
CHANGED
File without changes
|
data/spec/bool_sort_spec.rb
CHANGED
File without changes
|
data/spec/coverage_helper.rb
CHANGED
File without changes
|
data/spec/expr_spec.rb
CHANGED
File without changes
|
data/spec/float_expr_spec.rb
CHANGED
File without changes
|
data/spec/float_sort_spec.rb
CHANGED
File without changes
|
data/spec/goal_spec.rb
CHANGED
File without changes
|
data/spec/int_expr_spec.rb
CHANGED
File without changes
|
data/spec/int_sort_spec.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
|
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
|
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
|
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
|
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
|
File without changes
|
File without changes
|
data/spec/interface_spec.rb
CHANGED
File without changes
|
data/spec/model_spec.rb
CHANGED
File without changes
|
data/spec/optimize_spec.rb
CHANGED
File without changes
|
data/spec/printer_spec.rb
CHANGED
File without changes
|
data/spec/probe_spec.rb
CHANGED
File without changes
|
data/spec/real_expr_spec.rb
CHANGED
File without changes
|
data/spec/real_sort_spec.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/spec/set_expr_spec.rb
CHANGED
File without changes
|
data/spec/set_sort_spec.rb
CHANGED
File without changes
|
data/spec/solver_spec.rb
CHANGED
File without changes
|
data/spec/sort_spec.rb
CHANGED
File without changes
|
data/spec/spec_helper.rb
CHANGED
File without changes
|
data/spec/tactic_spec.rb
CHANGED
File without changes
|
data/spec/z3_spec.rb
CHANGED
File without changes
|
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.
|
4
|
+
version: 0.0.20220320
|
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: 2022-
|
11
|
+
date: 2022-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -333,7 +333,7 @@ licenses:
|
|
333
333
|
- MIT
|
334
334
|
metadata:
|
335
335
|
msys2_mingw_dependencies: z3
|
336
|
-
post_install_message:
|
336
|
+
post_install_message:
|
337
337
|
rdoc_options: []
|
338
338
|
require_paths:
|
339
339
|
- lib
|
@@ -349,8 +349,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
349
349
|
version: '0'
|
350
350
|
requirements:
|
351
351
|
- z3 library (4.8+)
|
352
|
-
rubygems_version: 3.
|
353
|
-
signing_key:
|
352
|
+
rubygems_version: 3.0.3
|
353
|
+
signing_key:
|
354
354
|
specification_version: 4
|
355
355
|
summary: Z3 Constraint Solver
|
356
356
|
test_files: []
|