Parameterized Logical Theories

Fangzhen Lin

Introduction

In the field of Artificial Intelligence, Knowledge Bases (KBs) have traditionally been constructed as large, monolithic collections of first-order logic sentences. While effective for small-scale applications, this "flat" structure becomes increasingly difficult to manage as the complexity and size of the KB grow. This paper introduces Parameterized Logical Theories (PLTs), a novel framework designed to bring modularity to logical reasoning by treating theories as functions—complete with parameters, local variables, and the ability to handle recursive calls.

The Modularity Problem in AI

The primary challenge in scaling KBs lies in the lack of native organizational structures in standard first-order logic. Researchers have previously attempted to organize knowledge into hierarchies or "contexts," but these approaches often necessitate complex "bridge rules" or meta-axioms to facilitate communication between different modules.

This issue is particularly acute in program verification. When translating a computer program into logic to prove its correctness, one must account for function calls, especially those with side effects that modify global states. Standard logic lacks a clean mechanism for nesting one theory within another or isolating the effects of a specific module. PLTs address this by providing a formal method to make logical theories modular and reusable, mirroring the functional decomposition found in modern programming languages.

Parameterized Logical Theories (PLTs)

A Parameterized Theory, denoted as $C(p_1, ..., p_n)$, allows for the definition of a logic module where $p$ represents parameters such as predicates or functions. These parameters can be instantiated or "swapped out" whenever the theory is called, enabling high levels of reusability.

The technical foundation of PLTs rests on a Translational Semantics derived from the Situation Calculus:

  1. Situations as Contexts: The logic is augmented with a "situation" sort ($S$). Every predicate $P(x)$ within a theory is transformed into a situational predicate $P(x, s)$, where $s$ represents the current calling context.
  2. Theory Calls as Actions: A call from one theory to another is treated as an action. A unique unary function acts as a "bookmark," creating a new situation that effectively isolates the local symbols of the called theory.
  3. Primary vs. Situational Theories: The framework distinguishes between the Primary Theory (PT), which handles internal reasoning within a module, and the Situational Theory (ST), which allows external modules to reason about the module's behavior by quantifying over possible calling contexts.
  4. Isolation via Renaming: Instead of relying on second-order logic to manage local variables, PLTs use unique situation-based names, analogous to how activation records function on a programming stack.

Illustrative Example: The Magic Box

To validate the framework, the author applies PLTs to several classic logical puzzles, most notably the "Magic Box" problem. This puzzle involves two agents observing a shared state from different perspectives, requiring multi-context reasoning.

The Magic Box Problem: Modeling multi-context reasoning with two agents.

In this example, Mr. 1 and Mr. 2 observe a grid. Their individual "theories" of what is in the box are parameterized by their specific viewpoints (rows vs. columns). PLTs allow these distinct perspectives to be modeled as separate theory calls within a unified situational framework, preventing contradictions from "bleeding" across contexts while still allowing for global reasoning about the box's contents.

Key Insights and Results

The most significant contribution of this work is the Logic-as-Code analogy. By making KBs "callable" and "composable," the framework provides a clear path toward more manageable AI systems. Using Situation Calculus—a tool traditionally reserved for modeling temporal change—to define contextual boundaries is a creative solution that maintains first-order consistency.

The paper establishes two critical theoretical results:

  • Theorem 1 (Modular Reasoning): Reasoning about a specific theory requires only its internal logic and the situational summaries of its dependencies, rather than the entire global KB.
  • Theorem 2 (Macro Equivalence): For non-recursive cases, the PLT framework is equivalent to standard "inline" expansion, ensuring compatibility with existing modularity methods.

Furthermore, the framework demonstrates how to model functions with side effects by using "primed" symbols to represent the state of variables before and after a theory call.

Conclusion and Future Work

While Parameterized Logical Theories provide a robust theoretical foundation for modular logic, several avenues for future research remain. Currently, the framework is strictly monotonic, whereas many AI context systems require non-monotonic reasoning. Additionally, while the theory is complete, its full integration into software verification tools like VIAP is still underway. Future work will also explore the potential higher-order implications of the situational translation, potentially linking PLTs to third-order logic structures.

Summary updated

BibTeX
@inproceedings{lin2021parameterized,
  author = {Fangzhen Lin},
  title = {{Parameterized Logical Theories}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i7.16794},
}
Figure