Generalized AND/OR Graphs