Prototyping Logic-Based AI Services with LogicUS

Víctor Ramos-González, Joaquín Borrego-Díaz, Fernando Sancho-CaparriniAAAI 2023 · DOI

Introduction

Logic remains a fundamental pillar of Artificial Intelligence, experiencing a significant resurgence in contemporary fields such as Explainable AI (XAI), Neuro-symbolic computing, and formal verification. Despite its importance, a persistent "usability gap" hinders its practical application. Researchers often find themselves manually implementing logical structures, while students struggle to bridge the gap between abstract formulas and executable code. LogicUS addresses this by providing a modular, web-based framework designed for rapid prototyping and educational accessibility.

The LogicUS Ecosystem

LogicUS is designed as a three-tiered architecture built primarily with Elm, a functional programming language. This choice ensures mathematical consistency and web-native deployment without requiring local installations. The framework integrates internal functional modules with external logic services to provide a comprehensive environment.

The modular architecture of LogicUS, integrating the functional core (LIB), visual interface (GUI), and interactive notebooks (NB).

The framework consists of three primary components that cater to different user needs:

1. LogicUS-LIB: The Functional Core

At the heart of the system is LogicUS-LIB, which contains the essential data types and algorithms for Propositional Logic (PL) and First-Order Logic (FOL). It handles formula representation, decision algorithms, and exports results into standard formats like LaTeX or GraphViz. By leveraging Elm's functional nature, the library maintains a clean representation of recursive logical structures.

2. LogicUS-GUI: Visual Flow-Based Prototyping

To lower the barrier to entry, LogicUS-GUI provides a visual interface built on Litegraph.js. Users can construct "execution graphs" by connecting nodes that represent logical operations. This flow-based paradigm allows users to visualize the step-by-step methodology of solving logic problems, making it an invaluable tool for education where understanding the process is as important as the final result.

3. LogicUS-NB: Interactive Notebooks

LogicUS-NB facilitates "literate programming" by integrating Markdown documentation with executable Elm code chunks via litvis. Similar to Jupyter notebooks, this environment allows for reproducible research and the creation of interactive tutorials, bridging the gap between static textbooks and "black box" code libraries.

Key Insights

The development of LogicUS highlights several critical design principles for modern logic tools:

  • Functional Paradigm: Functional languages like Elm are naturally suited for logic, as their mathematical purity aligns with the recursive nature of proofs and formulas.
  • Process Visualization: By showing partial-step results in the GUI, the framework helps users understand the internal mechanics of logical algorithms.
  • Interoperability: The system is designed to interface with external local and web services, such as the E theorem prover, SPASS, or Potassco. Support for standard export formats ensures that LogicUS can fit into broader research and documentation workflows.

Conclusion and Future Work

LogicUS successfully provides a versatile toolkit for both research prototyping and logic education. While currently focused on Classical Logic, its modular design allows for future expansion into non-classical domains like Modal or Fuzzy logic. By providing a "middle ground" between low-level implementation and high-level theorem proving, LogicUS empowers users to focus on the conceptual aspects of logic-based AI services.

Summary updated

BibTeX
@inproceedings{ramosgonzalez2023prototyping,
  author = {Víctor Ramos-González and Joaquín Borrego-Díaz and Fernando Sancho-Caparrini},
  title = {{Prototyping Logic-Based AI Services with LogicUS}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i13.27083},
}
Figure