preprocess/asm_mips.py [40:77]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    self.ins_id = ins_id
    self.pc = pc
    self.is_var = is_var
    self.edges = {}

  # node information
  def __repr__(self):
    ret = ''
    if self.pc:
      ret += str(self.pc)
    ret += ' name: ' + self.name
    ret += ' id: ' + str(self.id)
    #ret += ' is variable: ' + str(self.is_var)
    return ret

class Edge(object):
  '''class for edge

  In our graph, there are mainly 2 types of edges:
    1. control flow edges between instruction nodes
      either next instruction or jump instruction, both of type 'next-ins'
    2. others, connecting nodes of type 1 and 2, and 2 and 3
  '''
  def __init__(self, name, edge_type, src, tgt):
    self.name = name
    self.type = edge_type
    self.src = src
    self.tgt = tgt

  def output(self):
    return (self.src, self.type, self.tgt)

  # edge information, in the GGNN input format of (src, type, tgt).
  def __repr__(self):
    return '(' + str(self.src) + ', ' + str(self.type) + ', ' + str(self.tgt) + ')'


class Graph_builder(object):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



preprocess/asm_obj.py [80:117]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    self.ins_id = ins_id
    self.pc = pc
    self.is_var = is_var
    self.edges = {}

  # node information
  def __repr__(self):
    ret = ''
    if self.pc:
      ret += str(self.pc)
    ret += ' name: ' + self.name
    ret += ' id: ' + str(self.id)
    #ret += ' is variable: ' + str(self.is_var)
    return ret

class Edge(object):
  '''class for edge

  In our graph, there are mainly 2 types of edges:
    1. control flow edges between instruction nodes
      either next instruction or jump instruction, both of type 'next-ins'
    2. others, connecting nodes of type 1 and 2, and 2 and 3
  '''
  def __init__(self, name, edge_type, src, tgt):
    self.name = name
    self.type = edge_type
    self.src = src
    self.tgt = tgt

  def output(self):
    return (self.src, self.type, self.tgt)

  # edge information, in the GGNN input format of (src, type, tgt).
  def __repr__(self):
    return '(' + str(self.src) + ', ' + str(self.type) + ', ' + str(self.tgt) + ')'


class Graph_builder(object):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



