Module: Alf::Predicate::DyadicComp

Includes:
Expr
Included in:
Eq, Gt, Gte, Lt, Lte, Neq
Defined in:
lib/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?, #qualify, #rename, #sexpr, #tautology?, #to_proc, #to_ruby_code, #|

Methods included from Factory

#_factor_predicate, #and, #between, #comp, #contradiction, #identifier, #in, #literal, #native, #not, #or, #qualified_identifier, #relation, #sexpr, #tautology

Instance Method Details

#!Object


10
11
12
# File 'lib/alf/predicate/nodes/dyadic_comp.rb', line 10

def !
  Factory.send(OP_NEGATIONS[first], self[1], self[2])
end

#free_variablesObject


22
23
24
# File 'lib/alf/predicate/nodes/dyadic_comp.rb', line 22

def free_variables
  @free_variables ||= left.free_variables | right.free_variables
end

#leftObject


14
15
16
# File 'lib/alf/predicate/nodes/dyadic_comp.rb', line 14

def left
  self[1]
end

#priorityObject


6
7
8
# File 'lib/alf/predicate/nodes/dyadic_comp.rb', line 6

def priority
  50
end

#rightObject


18
19
20
# File 'lib/alf/predicate/nodes/dyadic_comp.rb', line 18

def right
  self[2]
end