const ALLOC = 1

function process(v, state) {
  if (select("malloc", [FCALL], [], v)) {
    if(state == ALLOC)
      error("malloc without a free");
    return ALLOC;
  }
  else if(select("free", [FCALL], [], v)) {
    if (state == ALLOC)
      return;
    error("free without malloc");
  }
  return state;
}

function path_end(state) {
  if(state == ALLOC)
    error("malloc without a free");
  graph("path_end.dot")
}
