Class: PropLogic::TrueConstant
- Includes:
- Singleton
- Defined in:
- lib/prop_logic/constants.rb
Instance Attribute Summary
Attributes inherited from Term
Instance Method Summary collapse
Methods inherited from Constant
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
21 22 23 24 25 26 |
# File 'lib/prop_logic/constants.rb', line 21 def assign(trues, falses, variables = nil) if falses.include?(self) raise ArgumentError, 'Contradicted assignment' end self end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/prop_logic/constants.rb', line 17 def to_s(*) 'true' end |