class Ikra::Symbolic::ArrayCombineCommand

Public Class Methods

new( target, others, block, ast: nil, block_size: DEFAULT_BLOCK_SIZE, keep: false, generator_node: nil, with_index: false, command_binding: nil) click to toggle source
Calls superclass method Ikra::Symbolic::ArrayCommand::new
# File lib/symbolic/symbolic.rb, line 440
def initialize(
    target, 
    others, 
    block, 
    ast: nil, 
    block_size: DEFAULT_BLOCK_SIZE, 
    keep: false,
    generator_node: nil,
    with_index: false,
    command_binding: nil)

    super(block: block, block_ast: ast, block_size: block_size, keep: keep, generator_node: generator_node, command_binding: command_binding)

    # Read array at position `tid`
    @input = [SingleInput.new(command: target.to_command, pattern: :tid)] + others.map do |other|
        SingleInput.new(command: other.to_command, pattern: :tid)
    end

    if with_index
        @input.push(SingleInput.new(
            command: ArrayIndexCommand.new(dimensions: dimensions),
            pattern: :tid))
    end
end

Public Instance Methods

==(other) click to toggle source
Calls superclass method Ikra::Symbolic::ArrayCommand#==
# File lib/symbolic/symbolic.rb, line 469
def ==(other)
    return super(other) && size == other.size
end
accept(visitor) click to toggle source
# File lib/symbolic/visitor.rb, line 10
def accept(visitor)
    visitor.visit_array_combine_command(self)
end
size() click to toggle source
# File lib/symbolic/symbolic.rb, line 465
def size
    return input.first.command.size
end