Class: PropLogic::FalseConstant

Inherits:
Constant show all
Includes:
Singleton
Defined in:
lib/prop_logic/constants.rb

Instance Attribute Summary

Attributes inherited from Term

#terms

Instance Method Summary collapse

Methods inherited from Constant

#to_cnf, #variables

Methods inherited from Variable

#cnf?, #initialize, #nnf?, #not, #reduced?, #to_cnf, #tseitin, #variables

Methods inherited from Term

#and, #assign_false, #assign_true, #cnf?, #each_sat, #equiv?, generate_cache, get, #initialize, #initialize_copy, #nnf?, #not, #or, #reduce, #reduced?, #sat?, #then, #to_cnf, #to_nnf, #to_s_in_term, #unsat?, #variables

Methods included from Functions

all_and, all_or, new_variable, sat_loop

Constructor Details

This class inherits a constructor from PropLogic::Variable

Instance Method Details

#assign(trues, falses, variables = nil) ⇒ Object



35
36
37
38
39
40
# File 'lib/prop_logic/constants.rb', line 35

def assign(trues, falses, variables = nil)
  if trues.include?(self)
    raise ArgumentError, 'Contradicted assignment'
  end
  self
end

#to_sObject



32
33
34
# File 'lib/prop_logic/constants.rb', line 32

def to_s(*)
  'false'
end