Primitive AND/OR without cycles.