logica 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f7c39b53470ab8de4b254289de127f5381dd1e5
4
- data.tar.gz: 5b6c07bb425e77e05aac88438db2b433dec846fc
3
+ metadata.gz: b5f69fc7c70bbb40ae01a78fcacfba75da2dcc6a
4
+ data.tar.gz: 50da7366dedbbf9324fa1467982cb72b7cc9e15f
5
5
  SHA512:
6
- metadata.gz: e1c8605b2591fdd244bdb060655a4599a6d46b9f630b737c53b70733a335e43c93ad90491e31800f4027cf00a2d00b6b133a2ef41ab45a9909050ffca54d0fb1
7
- data.tar.gz: 7c9eccba730c03480e363eed52bcd3fb61521c94ab93bb215a2b856591508bab57fffd2f15221563f1321844ac6168e3676fbbeae78dea522c38c38f9c37e08c
6
+ metadata.gz: 43687704c5b6da44951eb805e8dd4bb3bb9a374115fb5bab13612373d0cc8b8c3ff5491962db0e419daa7d54211a2d4cf0c3c176ec0e4e9f8d049794e92fa0f3
7
+ data.tar.gz: a4ed6aa6082300e43310b04e022d5d61ca12a89aefe80fb8fadd11c174796e27b0bd06e83c0e4a59d9d2a88df85a6a042ba788243e7724dcd2d5b6c105f234cb
data/CHANGELOG.md CHANGED
@@ -6,9 +6,14 @@ All notable changes to this project will be documented in this file. This projec
6
6
 
7
7
  * Your contribution here!
8
8
 
9
+ ## [0.0.2][] (2017-06-24)
10
+
11
+ * Fixed detection of some trivial simplifications of compounds
12
+
9
13
  ## 0.0.1 (2017-06-20)
10
14
 
11
15
  * Initial release
12
16
 
13
17
  [Semver]: http://semver.org
14
- [Unreleased]: https://github.com/eugeniobruno/logica/compare/v0.0.1...HEAD
18
+ [Unreleased]: https://github.com/eugeniobruno/logica/compare/v0.0.2...HEAD
19
+ [0.0.2]: https://github.com/eugeniobruno/logica/compare/v0.0.1...v0.0.2
@@ -80,7 +80,7 @@ module Logica
80
80
  end
81
81
 
82
82
  def annihilated_by?(other)
83
- predicates.any? { |own_predicate| annihilation?(own_predicate, other) }
83
+ ([self] + predicates).any? { |pred| annihilation?(pred, other) }
84
84
  end
85
85
 
86
86
  def subsumes?(other)
@@ -33,7 +33,8 @@ module Logica
33
33
  end
34
34
 
35
35
  def specialization_of_other?(other)
36
- predicates.any? { |predicate| predicate.specialization_of?(other) }
36
+ other.generalization_of_other?(self) ||
37
+ predicates.any? { |pred| pred.specialization_of?(other) }
37
38
  end
38
39
 
39
40
  def portion_satisfied_by(*arguments)
@@ -33,7 +33,7 @@ module Logica
33
33
  end
34
34
 
35
35
  def generalization_of_other?(other)
36
- predicates.any? { |predicate| predicate.generalization_of?(other) }
36
+ super || predicates.any? { |pred| pred.generalization_of?(other) }
37
37
  end
38
38
 
39
39
  def portion_satisfied_by(*arguments)
@@ -1,3 +1,3 @@
1
1
  module Logica
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
data/logica.gemspec CHANGED
@@ -7,7 +7,7 @@ require 'logica/version'
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'logica'
9
9
  spec.version = Logica::VERSION
10
- spec.date = '2017-06-20'
10
+ spec.date = '2017-06-24'
11
11
  spec.authors = ['Eugenio Bruno']
12
12
  spec.email = ['eugeniobruno@gmail.com']
13
13
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logica
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugenio Bruno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-20 00:00:00.000000000 Z
11
+ date: 2017-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: openhouse