Implementation of a graph compiler