A Relational Approach to Functional Decomposition of Logic Circuits