Class: ADSL::FOL::Implies
Instance Method Summary collapse
-
#initialize(from, to) ⇒ Implies
constructor
A new instance of Implies.
- #resolve_spass ⇒ Object
Constructor Details
#initialize(from, to) ⇒ Implies
Returns a new instance of Implies.
173 174 175 176 |
# File 'lib/adsl/fol/first_order_logic.rb', line 173 def initialize(from, to) @from = from @to = to end |
Instance Method Details
#resolve_spass ⇒ Object
178 179 180 181 182 183 184 185 186 |
# File 'lib/adsl/fol/first_order_logic.rb', line 178 def resolve_spass from = @from.resolve_spass to = @to.resolve_spass return to if from == 'true' return 'true' if from == 'false' return Not.new(from).resolve_spass if to == 'false' return 'true' if to == 'true' return "implies(#{from}, #{to})" end |