Dependency graph with general (AND/OR) dependencies
Sorry for the crappy mspaint, but you could make an intermediate layer where the nodes in the middle represent each of the combinations of (A,B), like in a truth table:



~ABB~