logic_tools 0.3.8 → 0.3.9
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 +4 -4
- data/README.md +1 -1
- data/lib/logic_tools/logicconvert.rb +5 -0
- data/lib/logic_tools/simplify_bug.txt +9 -1
- data/lib/logic_tools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dade95cdd16e176ef771726670070760e22767b
|
4
|
+
data.tar.gz: cd6d7e20e32e6248241a433eb132c1b51208b342
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52c6bc9a2d9477a31e1da1216886e8289b36724e7f138eea0375b163a00ee8b8c8fef27cca9a3942b9936453f69acbccb10919389fe4369f1d75b11ceeb4e879
|
7
|
+
data.tar.gz: 8ae5d6377e9f8554769290c66724598814ddb59c80932ca9fd464f55dd48359f4be3875ed053a1da0efaff2faacc7ac665627ce6b102d1979da3cb744e335c88
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ The tools include:
|
|
8
8
|
* __std\_conj__: for computing the conjunctive normal form of a logic expression.
|
9
9
|
* __std\_dij__: for computing the disjunctive normal form a of logic expression.
|
10
10
|
* __truth\_tbl__: for generating the truth table of a logic expression.
|
11
|
-
* __is\
|
11
|
+
* __is\_tautology__: for checking if a logic expression is a tautology or not.
|
12
12
|
* __complement__: for computing the complement of a logic expression.
|
13
13
|
|
14
14
|
|
@@ -76,6 +76,11 @@ module LogicTools
|
|
76
76
|
|
77
77
|
# Fill it with the cubes corresponding to each product
|
78
78
|
tree.each do |product|
|
79
|
+
next if product.is_a?(NodeFalse)
|
80
|
+
if product.is_a?(NodeTrue) then
|
81
|
+
cover.add(Cube.new("-"*vars.size))
|
82
|
+
next
|
83
|
+
end
|
79
84
|
product = [ product ] unless product.is_a?(NodeNary)
|
80
85
|
# print "product=#{product}\n"
|
81
86
|
# Generate the bit string of the cube
|
data/lib/logic_tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logic_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lovic Gauthier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|