Tree-representation of directed circuits