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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5369c721ea50477790661ac8975e9c66104028450d4a73a2916eac046633380
4
- data.tar.gz: 713374dddd23a82e7a22ec32e60964288182306201ef6e3e212e17b8d25c7a06
3
+ metadata.gz: bba953278a11ef2e902d7f7103195a57c2d94b1a515de357e23c4cce3a8ced81
4
+ data.tar.gz: c4dc956299e225582b8913d135adcd67595fcfb28c20565a1121b5d5ed73f983
5
5
  SHA512:
6
- metadata.gz: 22d87abcdc1c5b8570bb0c52db0a0086185336bba84092666b010de0504cfa15e9973073d0ca1fa0ac5cb2eb448b2e9ae6da1ba5f7f807255fbbb91e573c42cf
7
- data.tar.gz: cc3527b80fd35db96b1dd6cf2fde3511f97cc94316f76c507e8c7ded6f6fef1b122fdc477a043870a15acd7bf76a87e6884f3e6d502998c762315b3732d14023
6
+ metadata.gz: ca74743545f86daa86cb85a3f33ce0db5e3d159dcbe133e85a389b795d5ca6ad5b15842e275ef18a21e0a3317d010d1906143fc8bd6cbc27513777d0186a88df
7
+ data.tar.gz: a6ef5bb470556ad7d1bb39c54537ca9516aa64cc0bfb53fc8984352033ced94443e0272de9fa078a451f680af3a08d4c2c706e43f134a564bb2aef9fd677a8be
@@ -4,6 +4,10 @@ module Z3
4
4
  IntExpr.Mod(self, other)
5
5
  end
6
6
 
7
+ def %(other)
8
+ IntExpr.Mod(self, other)
9
+ end
10
+
7
11
  def rem(other)
8
12
  IntExpr.Rem(self, other)
9
13
  end
@@ -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.20230107
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-01-07 00:00:00.000000000 Z
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.7
361
+ rubygems_version: 3.3.26
362
362
  signing_key:
363
363
  specification_version: 4
364
364
  summary: Z3 Constraint Solver