Module: MagicLogic::Utils
- Included in:
- Base
- Defined in:
- lib/magic_logic.rb
Instance Method Summary collapse
- #dpll ⇒ Object
- #include?(p) ⇒ Boolean
- #is_and? ⇒ Boolean
- #is_form?(ope = nil) ⇒ Boolean
- #is_neg? ⇒ Boolean
- #is_or? ⇒ Boolean
- #neg?(p) ⇒ Boolean
Instance Method Details
#dpll ⇒ Object
71 72 73 |
# File 'lib/magic_logic.rb', line 71 def dpll !!!!!!!!!!!!!!!!!!self end |
#include?(p) ⇒ Boolean
67 68 69 |
# File 'lib/magic_logic.rb', line 67 def include?(p) false end |
#is_and? ⇒ Boolean
63 64 65 |
# File 'lib/magic_logic.rb', line 63 def is_and? is_form?(:*) end |
#is_form?(ope = nil) ⇒ Boolean
54 55 56 57 |
# File 'lib/magic_logic.rb', line 54 def is_form?(ope=nil) return is_a?(FORM) && self.ope == ope if ope is_a?(FORM) end |
#is_or? ⇒ Boolean
59 60 61 |
# File 'lib/magic_logic.rb', line 59 def is_or? is_form?(:+) end |
#neg?(p) ⇒ Boolean
46 47 48 |
# File 'lib/magic_logic.rb', line 46 def neg?(p) (is_neg? && self.p == p) || (p.is_neg? && p.p == self) end |