Class: Ravensat::OrNode

Inherits:
OprNode show all
Defined in:
lib/ravensat/ast/or_node.rb

Instance Attribute Summary

Attributes inherited from Node

#children

Instance Method Summary collapse

Methods inherited from OprNode

#initialize

Methods inherited from Node

#&, #clauses_size, #each, #initialize, #to_s, #vars, #vars_size, #|

Constructor Details

This class inherits a constructor from Ravensat::OprNode

Instance Method Details

#cnf?Boolean

Returns:

  • (Boolean)


3
4
5
6
# File 'lib/ravensat/ast/or_node.rb', line 3

def cnf?
  return false if @children.any?{|node| node.is_a? AndNode}
  @children.map(&:cnf?).reduce(:&)
end