Module: Alf::Predicate::DyadicComp
- Includes:
- Expr
- Included in:
- Eq, Gt, Gte, Lt, Lte, Neq
- Defined in:
- lib/alf-predicate/alf/predicate/nodes/dyadic_comp.rb
Constant Summary
Constants included
from Expr
Expr::OP_NEGATIONS
Instance Method Summary
collapse
Methods included from Expr
#&, #and_split, #constant_variables, #contradiction?, #rename, #sexpr, #tautology?, #to_proc, #to_ruby_code, #|
Methods included from Factory
#_factor_predicate, #and, #between, #comp, #contradiction, #in, #literal, #native, #not, #or, #relation, #sexpr, #tautology, #var_ref
Instance Method Details
#! ⇒ Object
10
11
12
|
# File 'lib/alf-predicate/alf/predicate/nodes/dyadic_comp.rb', line 10
def !
Factory.send(OP_NEGATIONS[first], self[1], self[2])
end
|
#free_variables ⇒ Object
22
23
24
|
# File 'lib/alf-predicate/alf/predicate/nodes/dyadic_comp.rb', line 22
def free_variables
@free_variables ||= left.free_variables | right.free_variables
end
|
#left ⇒ Object
14
15
16
|
# File 'lib/alf-predicate/alf/predicate/nodes/dyadic_comp.rb', line 14
def left
self[1]
end
|
#priority ⇒ Object
6
7
8
|
# File 'lib/alf-predicate/alf/predicate/nodes/dyadic_comp.rb', line 6
def priority
50
end
|
#right ⇒ Object
18
19
20
|
# File 'lib/alf-predicate/alf/predicate/nodes/dyadic_comp.rb', line 18
def right
self[2]
end
|