Skip to main content

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.

Before you begin, make sure you have JDK 17 or later installed on your machine and that you have access to the TautoTeacher 2.0 project source code. The build system is a single PowerShell script — no Maven, Gradle, or external dependencies are required. All source files live under src/main/java and compile directly to a flat out/ directory.
1

Clone the repository

Download the project source from GitHub:
git clone https://github.com/AngelMoralesChazari/TautoTeacher-2.0
cd TautoTeacher-2.0
The repository contains the full Java source tree under src/main/java/tautoteacher2/, the core.lgs resource file under src/main/resources/logicscript/, and the compile.ps1 build script at the project root.
2

Compile

Run the PowerShell build script from the project root. Pass the path to your JDK installation with -JdkHome, or omit it if JAVA_HOME is already set in your environment:
# Using an explicit JDK path
.\compile.ps1 -JdkHome "C:\Program Files\Eclipse Adoptium\jdk-17.0.18.8-hotspot"

# Or, if JAVA_HOME is set
.\compile.ps1
The script performs three actions:
  1. Discovers every .java file under src\main\java recursively.
  2. Compiles them all with javac --release 17 -encoding UTF-8 into the out\ directory.
  3. Copies everything under src\main\resources into out\ so that core.lgs and the app icon are available on the classpath at runtime.
A successful run prints:
Recursos copiados a out\
OK: compilado con --release 17 en <project-root>\out
3

Run the GUI

Launch the Swing desktop application:
java -cp out tautoteacher2.Main
A window titled TautoTeacher 2.0 opens. The interface provides two input modes, selectable via a toggle at the top of the input panel:
  • Formula mode — enter a propositional formula directly using logic symbols.
  • Natural language mode — type a sentence in Spanish and let the NLP pipeline translate it.
Click Procesar (or press Enter) after entering your input to see the classification, truth table, and educational explanation panels update.
4

Try the CLI

The LogicScriptCli entry point lets you test the NLP-to-formula pipeline from the terminal without opening the GUI:
java -cp out tautoteacher2.logicscript.LogicScriptCli "si llueve entonces llevo paraguas"
Expected output:
=== LogicScript (demo consola) ===
Entrada: si llueve entonces llevo paraguas

Estado: OK
Fórmula: (p → q)
Proposiciones: {llueve=p, llevo paraguas=q}
Pasos de análisis:
  - [NormalizadorTexto] ...
  - [NaturalLexer] ...
  - [SemanticMapper] patrón: si_entonces
  - [EmitidorFormula] ImpExpr(p, q)

Motor lógico:
  Tautología: false
  Clasificación: CONTINGENCIA
The CLI prints the translated formula, the propositional variable mapping, the analysis steps produced by each pipeline stage, and the final tautology/classification result from MotorLogico.
5

Run regression tests

Verify the NLP pipeline against the full test suite:
java -cp out tautoteacher2.logicscript.LogicScriptRegressionHarness
The harness runs 40 test cases in total: 38 natural-language sentences covering implication, conjunction, disjunction, equivalence, negation, elliptical forms, morphological variants, multi-clause compositions, and edge cases (empty input, whitespace-only), plus two .lgs loader diagnostic checks. A clean run prints:
LogicScriptRegressionHarness: OK (40 casos LN + diagnóstico .lgs).
If any case fails, the harness prints a FALLO line per failure with the input, the expected formula, and the formula actually produced, then exits with a non-zero status code.

Your first formula

Once the GUI is running, switch to Formula mode and try a simple implication:
p→q
TautoTeacher evaluates all four truth-value combinations for p and q and classifies the formula as a contingency — it is true when p is false or when both are true, but false when p is true and q is false. To see a tautology, enter the hypothetical syllogism:
(p→q)∧(q→r)→(p→r)
The truth table will show V (true) in every row, and the classification panel will display TAUTOLOGÍA in green. The educational explanation panel shows the refutation-style proof, walking through why assuming the consequent false leads to a contradiction in the antecedent.
You do not need to copy-paste Unicode symbols. The formula input field normalizes common ASCII keyboard shortcuts automatically before evaluation:
TypeBecomes
->
&&
^
||
! or ~¬
<-> or <=>
So you can type (p->q)&&(q->r)->p->r directly on any standard keyboard and the app will handle the conversion.

Build docs developers (and LLMs) love