Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AngelMoralesChazari/TautoTeacher-2.0/llms.txt
Use this file to discover all available pages before exploring further.
PanelEntradaNatural exposes two input modes selectable via a JTabbedPane in the GUI: Fórmula lógica (tab index 0) and Lenguaje natural (tab index 1). TautoTeacherApp reads panelEntrada.getModoEntrada() when the ✔ Verificar Tautología button is pressed and routes processing to one of two completely different code paths — direct formula evaluation or the full LogicScript NLP pipeline. Each mode produces the same end result (a classified verdict, a truth table, and an educational explanation), but the journey from input to formula differs significantly.
- Formula Mode
- Natural Language Mode
In Formula Mode the user types a propositional formula directly into the Fórmula lógica tab’s text area. A toolbar of clickable symbol buttons (¬ ∧ ∨ → ↔ and parentheses) inserts symbols at the current caret position, so users who cannot type Unicode operators can still compose well-formed formulas.
Consecutive whitespace is also collapsed to a single space after symbol replacement.Example: typing
Keyboard alias normalization
Before the formula is evaluated,TautoTeacherApp.normalizarSimbolosTeclado replaces common keyboard shorthands with their Unicode equivalents. Replacements are applied in the order listed — multi-character sequences (e.g. <->) are replaced before their sub-sequences (e.g. ->) to avoid partial matches.| Typed input | Normalized to |
|---|---|
<-> | ↔ |
<=> | ↔ |
-> | → |
&& | ∧ |
|| | ∨ |
^ | ∧ |
~ | ¬ |
! | ¬ |
(p->q)&&(q->r)->(p->r) is normalized to (p→q)∧(q→r)→(p→r) before evaluation.Evaluation path
Once normalized, the formula goes directly to the logic engine — no NLP processing is involved:MotorLogico.tipoFormula returns one of the three classification strings: "TAUTOLOGÍA", "CONTRADICCIÓN", or "CONTINGENCIA". Because no proposition map exists in this path, ExplicacionEducativaBuilder.construir is called with Map.of() — symbol substitution in the educational panel is therefore skipped, and the formula is displayed as-is.Error handling
| Situation | Behaviour |
|---|---|
| Empty input | Result panel shows "Por favor ingrese una expresión lógica para verificar." (Formula Mode) or "Por favor ingrese un enunciado." (Natural Language Mode) in red (#dc3545). |
| Translation failure | Result panel shows "No pude interpretar el enunciado con las reglas actuales de LogicScript.\n" followed by LogicScriptResult.getMensaje(). The educational panel renders the full error explanation including all analysis steps logged by the pipeline, to help diagnose why the sentence could not be mapped to a formula. |
| Logic engine exception | Result panel shows "Error al analizar la expresión: " or "Error al analizar el enunciado: " followed by the exception message in red. |
Proposition display
When Natural Language Mode produces a successful translation,TautoTeacherApp calls formatearMapaProposiciones to build a readable legend of the symbol-to-lemma mapping for the technical section of the educational panel:
p→q) and the original natural-language sentence, making it clear exactly which real-world proposition each symbol represents. The same map is also passed to PanelVisualizacion, where it is used to annotate table column headers and the interpretation dropdown with the corresponding lemmas.