"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-06 09:28:10.717409
"""

```python
from typing import Dict, Any


class ReasoningEngine:
    """
    A basic reasoning engine that evaluates simple logical expressions based on input data.
    
    The engine supports AND, OR, NOT logical operators and can handle nested conditions.
    """

    def __init__(self):
        self._logic_dict: Dict[str, Any] = {}

    def add_logic(self, key: str, logic_expression: str) -> None:
        """
        Add a new logic expression to the engine.

        :param key: The unique key for the logical expression.
        :param logic_expression: The string representation of the logical expression.
        """
        self._logic_dict[key] = logic_expression

    def evaluate(self, data: Dict[str, Any]) -> bool:
        """
        Evaluate a stored logic expression based on input data.

        :param data: Dictionary containing key-value pairs representing variables in the logic expression.
        :return: True if the logic expression evaluates to true; otherwise False.
        """
        for key, expr in self._logic_dict.items():
            try:
                # Replace variable names with their corresponding values from the data dictionary
                evaluated_expr = expr.format_map(data)
                result = eval(evaluated_expr)  # Evaluate the constructed string as a Python expression
                print(f"Evaluation of '{expr}' yielded: {result}")
            except Exception as e:
                print(f"Error evaluating logic for key '{key}': {e}")
            yield result

    def clear_logic(self) -> None:
        """
        Clear all stored logic expressions.
        """
        self._logic_dict.clear()


# Example usage
if __name__ == "__main__":
    engine = ReasoningEngine()
    
    # Add some logical expressions
    engine.add_logic("is_eligible", "age >= 18 and has_income")
    engine.add_logic("has_income", "income > 0")

    # Sample input data
    sample_data = {
        'age': 25,
        'has_income': True,
        'income': 3000
    }

    # Evaluate the logic with the provided data
    for result in engine.evaluate(sample_data):
        print(f"Result: {result}")
```