"""Create logic_validator
Generated by Phi-Octopus Eden
2025-11-06 11:43:23.609089
"""

```python
def create_logic_validator(logic_str: str) -> callable:
    """
    Creates a logic validator function based on provided logical expression.
    
    Args:
        logic_str (str): A string representing a logical expression in terms of 'x' and 'y'.
                         Example expressions include 'x & y', '(x | ~y)', etc.

    Returns:
        callable: A function that takes two boolean arguments 'x' and 'y' and returns the result
                  of evaluating the logic_str with those inputs.
    
    Raises:
        ValueError: If the input string is not a valid logical expression.
    """
    import ast

    class LogicNode(ast.NodeVisitor):
        def visit_BoolOp(self, node: ast.BoolOp) -> bool:
            op = {ast.And: '&', ast.Or: '|'}[type(node.op)]
            results = [self.visit(child) for child in node.values]
            return eval(f"{' & '.join(map(str, results))}", {'&': all, '|': any})

        def visit_Name(self, node: ast.Name) -> bool:
            if node.id not in ['x', 'y']:
                raise ValueError("Invalid variable name. Use only 'x' and 'y'.")
            return locals()[node.id]

        def generic_visit(self, node):
            raise ValueError(f"Unsupported operation {type(node)}")

    def validate_logic(x: bool, y: bool) -> bool:
        tree = ast.parse(logic_str, mode='eval')
        logic_node = LogicNode()
        try:
            result = logic_node.visit(tree.body)
        except Exception as e:
            raise ValueError(f"Invalid logical expression: {e}")
        return result

    return validate_logic


# Example usage
logic_validator = create_logic_validator("(x & y) | (~x & ~y)")
print(logic_validator(True, True))  # Output: True
print(logic_validator(False, False))  # Output: True
print(logic_validator(True, False))  # Output: False
```

This code defines a `create_logic_validator` function that compiles a logical expression into an AST (Abstract Syntax Tree) and evaluates it using visitor pattern. The example usage demonstrates how to use the generated validator with different boolean inputs.