z3 0.0.20230107 → 0.0.20230311
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/z3/expr/int_expr.rb +4 -0
- data/spec/int_expr_spec.rb +9 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bba953278a11ef2e902d7f7103195a57c2d94b1a515de357e23c4cce3a8ced81
|
4
|
+
data.tar.gz: c4dc956299e225582b8913d135adcd67595fcfb28c20565a1121b5d5ed73f983
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca74743545f86daa86cb85a3f33ce0db5e3d159dcbe133e85a389b795d5ca6ad5b15842e275ef18a21e0a3317d010d1906143fc8bd6cbc27513777d0186a88df
|
7
|
+
data.tar.gz: a6ef5bb470556ad7d1bb39c54537ca9516aa64cc0bfb53fc8984352033ced94443e0272de9fa078a451f680af3a08d4c2c706e43f134a564bb2aef9fd677a8be
|
data/lib/z3/expr/int_expr.rb
CHANGED
data/spec/int_expr_spec.rb
CHANGED
@@ -39,6 +39,15 @@ module Z3
|
|
39
39
|
expect([a == -10, b == -3, c == a.mod(b)]).to have_solution(c => 2)
|
40
40
|
end
|
41
41
|
|
42
|
+
# It doesn't match Ruby on negative right side, but nobody does modulo a negative anyway
|
43
|
+
# Python Z3 API does the same thing
|
44
|
+
it "%" do
|
45
|
+
expect([a == 10, b == 3, c == a % b]).to have_solution(c => 1)
|
46
|
+
expect([a == 10, b == -3, c == a % b]).to have_solution(c => 1)
|
47
|
+
expect([a == -10, b == 3, c == a % b]).to have_solution(c => 2)
|
48
|
+
expect([a == -10, b == -3, c == a % b]).to have_solution(c => 2)
|
49
|
+
end
|
50
|
+
|
42
51
|
it "==" do
|
43
52
|
expect([a == 2, b == 2, x == (a == b)]).to have_solution(x => true)
|
44
53
|
expect([a == 2, b == 3, x == (a == b)]).to have_solution(x => false)
|
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.20230311
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Wegrzanowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -358,7 +358,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
358
358
|
version: '0'
|
359
359
|
requirements:
|
360
360
|
- z3 library (4.8+)
|
361
|
-
rubygems_version: 3.3.
|
361
|
+
rubygems_version: 3.3.26
|
362
362
|
signing_key:
|
363
363
|
specification_version: 4
|
364
364
|
summary: Z3 Constraint Solver
|