# sebimarginean/logicheck architecture

> Architecture diagram of the GitHub repository sebimarginean/logicheck, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sebimarginean/logicheck
- Repository: https://github.com/sebimarginean/logicheck

## Overview

##### Main Components
- User Interface (Tkinter GUI): This is the front-end of the application. It includes input fields, buttons for selecting operations, and areas to display the results.
- Input Handling & Event Triggering: The mechanism by which user input is received from the GUI and events (like button clicks) trigger logic evaluation.
- Logical Evaluation Engine: The core processing unit that parses, checks, and computes the logical status (whether expressions are equivalent, tautologies, or contradictions). This module implements the algorithms for evaluating the logical expressions using operators like &&, ||, !, =>, and <=>.
- Output Rendering: Although closely tied with the GUI, this part displays the results of the evaluations back to the user.

##### Mapping Relationships and Interactions
- From the GUI, data is passed to the Input Handling component, which then calls the Logical Evaluation Engine.
- The Logical Evaluation Engine processes the expression and sends the results back to the rendering mechanism in the GUI.

##### Architectural Patterns and Design Principles
a. View: Tkinter-based GUI.
b. Controller/Handler: Event handling logic that connects user input with the evaluation functions.
c. Model: Logical evaluation functions that perform the computations on the provided expressions.
- Separation of concerns, ensuring that UI and logic processing remain conceptually independent even in a compact script.

##### Relevant Technologies and Libraries
- Python as the programming language.
- Tkinter as the GUI framework.
- No external dependencies beyond standard Python libraries.

## Diagram (Mermaid)

```mermaid
flowchart TD
    U["User"]:::user
    GUI["User Interface (Tkinter GUI)"]:::gui
    IH["Input Handling & Event Triggering"]:::controller
    LE["Logical Evaluation Engine"]:::logic
    OR["Output Rendering"]:::output

    U -->|"submitsExpression"| GUI
    GUI -->|"triggersEvent"| IH
    IH -->|"callsEvaluation"| LE
    LE -->|"returnsResult"| OR
    OR -->|"displaysOnGUI"| GUI

    click GUI "https://github.com/sebimarginean/logicheck/blob/main/script.py"
    click IH "https://github.com/sebimarginean/logicheck/blob/main/script.py"
    click LE "https://github.com/sebimarginean/logicheck/blob/main/script.py"
    click OR "https://github.com/sebimarginean/logicheck/blob/main/script.py"

    classDef user fill:#FFD700,stroke:#B8860B,stroke-width:2px;
    classDef gui fill:#98FB98,stroke:#2E8B57,stroke-width:2px;
    classDef controller fill:#ADD8E6,stroke:#00008B,stroke-width:2px;
    classDef logic fill:#FFB6C1,stroke:#C71585,stroke-width:2px;
    classDef output fill:#D3D3D3,stroke:#696969,stroke-width:2px;
```
