logic_tools 0.3.8 → 0.3.9

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
  SHA1:
3
- metadata.gz: 37ffa5f837816fb1f10f87e520b5a1936bac7b66
4
- data.tar.gz: 8035e691cd6d385d396a6e3d66395eae6ded6725
3
+ metadata.gz: 5dade95cdd16e176ef771726670070760e22767b
4
+ data.tar.gz: cd6d7e20e32e6248241a433eb132c1b51208b342
5
5
  SHA512:
6
- metadata.gz: 23eeb7a4e711ff0a72c11c68a58e183cd7718882e91e56e1189b2c5436c554f1b031ea6dcee13433505e618aa1b824a7ec878f2b4485a067d90a354376948a1c
7
- data.tar.gz: 5202cd8cd9fac2dfea65f6d36c120f9e12bd64d1cb9ff22adaacb3502c15955d3b6498928c4c7ca1dfe8ef070331652c6bcf94edd816e24014172bb54bc54c35
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\_tautolofy__: for checking if a logic expression is a tautology or not.
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
@@ -18,8 +18,16 @@
18
18
 
19
19
  ---
20
20
  === Bug 3
21
- # simpligy_es "a(b+c(d+e(f+g)))"
21
+ # simplify_es "a(b+c(d+e(f+g)))"
22
22
 
23
23
  -> Crashes
24
24
 
25
25
  *FIXED*
26
+
27
+ ---
28
+ === Bug 4
29
+ # simplify_es "(~b+c)(~a+~b+~c)"
30
+
31
+ -> Carshes
32
+
33
+ *FIXED*
@@ -1,3 +1,3 @@
1
1
  module LogicTools
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.9"
3
3
  end
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.8
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-01-27 00:00:00.000000000 Z
11
+ date: 2017-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler