Papers
Topics
Authors
Recent
Search
2000 character limit reached

LogicIFGen: Logic-Driven Generation

Updated 4 July 2026
  • LogicIFGen is a dual-purpose framework that automates the generation of proof tactics for finite-valued logics and combinatorial test cases for intuitionistic theorem provers.
  • It converts truth-functional descriptions into tableau calculi by employing binary-print encoding to reduce many-valued semantics to bivalent signatures.
  • The framework leverages Prolog for exhaustive formula generation, canonical representation, and bug detection, enhancing automated reasoning and testing.

Searching arXiv for "LogicIFGen" and related papers to ground the article in the cited literature. LogicIFGen denotes a line of research on logic-driven generation, but the name is used in the cited literature for two distinct technical artifacts. In "Automatic Generation of Proof Tactics for Finite-Valued Logics" it is the algorithm that takes as input the truth-functional description of a finite-valued logic and produces an Isabelle theory containing a tableau calculus together with rewrite rules and proof tactics that can automatically prove theoremhood in that logic (Marcos, 2010). In "Formula Transformers and Combinatorial Test Generators for Propositional Intuitionistic Theorem Provers" it is a Prolog-based combinatorial testing framework for intuitionistic theorem provers, centered on systematic formula generation, formula transformers, lightweight provers, and bug-finding tests (Tarau, 2019). Across both uses, the common theme is the conversion of explicit logical structure into automated reasoning or testing workflows; a related later pattern appears in LLMCFG-TGen, which externalizes the latent logic of natural-language use cases into a control-flow graph before generating tests (Yang et al., 6 Dec 2025).

1. Dual usage and conceptual scope

The 2010 work uses LogicIFGen for automatic generation of proof-assistant-ready tactics for sufficiently expressive finite-valued propositional logics (Marcos, 2010). Its stated problem is that finite-valued logics are semantically straightforward, while hand-designing a sound, complete, and terminating analytic proof system for each one is tedious and error-prone. The 2019 work uses the same name for a framework whose purpose is to provide exhaustive small test sets, random large test sets, known-provable formulas, canonical/reduced formula representatives, harder transformed formulas, lightweight theorem provers derived from proof calculi, and bug-finding tests for existing provers (Tarau, 2019).

This terminological overlap is important because the two systems address different phases of the reasoning pipeline. The first compiles semantics into calculi and tactics. The second generates and transforms formulas in order to test theorem provers for soundness, completeness, termination, and scalability. A common misconception would be to treat LogicIFGen as a single stable software package with one methodology; the cited literature instead presents two technically different frameworks sharing a logic-informed generation perspective.

2. LogicIFGen for finite-valued propositional logics

In the 2010 formulation, LogicIFGen starts from a truth-functional description of a finite-valued propositional logic and generates an Isabelle theory containing tableau rules, rewrite rules, and proof tactics (Marcos, 2010). The target is a very inclusive class of sufficiently expressive finite-valued propositional logics. The motivating observation is that tableau systems for non-classical finite-valued logics can be obtained uniformly, but making them usable inside a tactical framework such as Isabelle requires careful control of analyticity, rewriting, and rule ordering.

The paper recalls the classical tableau idea as a refutation-oriented proof procedure based on signed formulas and branch extension. In the classical bivalent case, the rules for negation and implication are given by the tree schemata

$\Tree [.{ %%%%0%%%% } [.{ %%%%1%%%% } ] ] \hspace{1.5cm} \Tree [.{ %%%%2%%%% } [.{ %%%%3%%%% } ] ] \hspace{1.5cm} \Tree [.{ %%%%4%%%% } [.{ %%%%5%%%%\%%%%6%%%% } ] ] \hspace{1.5cm} \Tree [.{ %%%%7%%%% } [.{ %%%%8%%%%} ] [.{ %%%%9%%%%} ] ]$

with closure rule

$\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$

which closes a branch containing both T:αT{:}\alpha and F:αF{:}\alpha. For classical logic, analyticity is expressed through the complexity clauses

$\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$

and a proof system is analytical if it allows application of a rule only when its daughters have smaller complexity than at least one of the heads.

The finite-valued extension is illustrated with $\L_4$, Łukasiewicz’s four-valued logic, where

V={1,23,13,0}\mathcal{V}=\left\{1,\frac{2}{3},\frac{1}{3},0\right\}

and only $1$ is designated. The connectives are defined by

$(\L_4\neg)\quad \widetilde{\neg}v=1-v$

$(\L_4\to)\quad v_1\widetilde{\to}v_2=\textsf{Min}(1,1-v_1+v_2).$

The crucial device is a binary-print encoding: each truth value is uniquely identified by a tuple of signs $\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$0 obtained by evaluating separating formulas. For $\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$1, the separating formulas are

$\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$2

yielding unique triples

$\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$3

The tableau calculus is then built from signed binary prints rather than ordinary classical signs. This suggests that LogicIFGen’s central abstraction is not merely tableau synthesis, but semantic compression of many-valued valuations into bivalent signatures usable by proof search.

3. Generated tableaux, separating formulas, and generalized analyticity

The generated rules for $\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$4 have a specific tableau form. For negation, the paper gives rules including

$\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$5

and for a separating formula such as $\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$6,

$\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$7

(Marcos, 2010).

Closure rules are generated from combinations of signed binary prints that do not correspond to an actual valuation. For $\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$8, the paper lists four such closure rules and then notes that some are redundant. Two can be simplified into

$\Tree [.{ %%%%10%%%% \ %%%%11%%%%} [.{ %%%%12%%%%} ] ]$9

because the only two possible labels on T:αT{:}\alpha0 are T:αT{:}\alpha1 and T:αT{:}\alpha2, so rules differing only in that sign can be merged. The paper identifies this as output-sensitive rule minimization.

The technical core is generalized analyticity. For finite-valued logics the naïve subformula property is insufficient because the system must handle separating formulas. The complexity measure is therefore extended with

T:αT{:}\alpha3

before the classical clauses T:αT{:}\alpha4–T:αT{:}\alpha5. A formula may be read either as an ordinary formula or as an instance of a separating formula, and the proof strategy must choose the reading that yields the greatest decrease in complexity. The paper’s example

T:αT{:}\alpha6

may be treated either as an instance of T:αT{:}\alpha7 or as an instance of T:αT{:}\alpha8, but only the latter gives the better complexity reduction. The paper explicitly warns that ignoring this ordering can reintroduce the same head or create formulas of greater complexity, making the tableau procedure potentially non-terminating (Marcos, 2010).

4. Isabelle realization and tactic architecture

The 2010 LogicIFGen does not stop at calculus extraction; it generates Isabelle theories in sequent-style syntax, with contexts and meta-implication (Marcos, 2010). The paper gives representative rules such as:

$\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$5

and

$\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$6

A closure rule is encoded as an axiom, for example:

$\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$7

The generated theory also contains rewrite rules that recognize separating formulas:

$\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$8

and an ordered-instantiation tactic:

$\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$9

The order matters. The tactic must first apply the rewrite that reduces complexity the most, namely the one corresponding to T:αT{:}\alpha9, and only then F:αF{:}\alpha0. This is the operational counterpart of the minimality requirement in the tableau strategy. Proof search then repeatedly rewrites formulas into separating-formula form using auto_rw, tries to close the branch using closure rules, and, if closure fails, applies another tableau rule in a suitable order, typically postponing branching as long as possible. Because the underlying system is analytical in the generalized sense, the procedure terminates. The paper states that either Isabelle reports No subgoals!, meaning the theorem has been proved, or open branches remain whose formulas all have complexity zero and therefore no further rule is applicable; those branches correspond to counter-models (Marcos, 2010).

Mathematically, the significance claimed for this LogicIFGen is that it gives a uniform way of extracting sound and complete tableau systems for a broad class of sufficiently expressive finite-valued propositional logics. Computationally, it turns those tableaux into automated proof tactics suitable for tactic-based logical frameworks such as Isabelle.

5. LogicIFGen as a combinatorial testing framework for intuitionistic theorem provers

In the 2019 usage, LogicIFGen is a Prolog-based combinatorial testing framework for progressively more powerful theorem provers, covering formula languages from the implicational fragment of intuitionistic propositional logic to full intuitionistic propositional logic with F:αF{:}\alpha1, and implication (Tarau, 2019). Its stated purpose is to provide exhaustive small test sets, random large test sets, known-provable formulas, canonical or reduced formula representatives, harder transformed formulas, lightweight theorem provers derived from proof calculi, and bug-finding tests for existing provers.

The framework rests on the Curry–Howard correspondence: types correspond to formulas, and typed lambda terms correspond to proofs. Thus inhabitable simple types are provable implicational formulas, and typable lambda terms and combinators become generators of known-tautology formulas. This allows the framework to generate both arbitrary formulas and formulas known in advance to be provable.

For exhaustive generation, a type or formula skeleton is a binary tree with internal nodes -> and leaves as logic variables, generated by the predicate:

$\L_4$0

with the DCG-style definition:

$\L_4$1

These skeletons are counted by Catalan numbers. Full implicational formulas are then obtained by partitioning leaves through variable unification:

$\L_4$2

The paper notes the count sequence for all such formulas as

F:αF{:}\alpha2

and later lists the sequence

F:αF{:}\alpha3

for all implicational formulas (Tarau, 2019). For random generation, the framework uses random simply typed terms with Boltzmann samplers, random implicational formulas via Rémy’s algorithm or Knuth’s algorithm R together with a random set partition generator, and random typable combinator expressions using random SK trees.

Known-provable formulas are generated through typed closed normal forms and combinators. The predicate

$\L_4$3

enumerates closed normal-form lambda terms F:αF{:}\alpha4 of size F:αF{:}\alpha5 together with their inferred type F:αF{:}\alpha6, and the type-only generator

$\L_4$4

produces implicational tautologies directly from typable normal forms. The paper also exploits the typings

F:αF{:}\alpha7

to generate tautologies from combinator trees. For random SK expressions it gives:

$\L_4$5

A major component is control of redundancy through canonical representatives among equiprovable formulas. For Nested Horn Clauses, the framework sorts the body using Prolog standard order and removes duplicates because conjunction is idempotent, using predicates such as genSortedHorn(N,Tree,Leaves) and allSortedHorn(N,T). For formulas with conjunction and disjunction, the paper mentions genSortedTree/3 and allSortedFullFormulas/2, reducing formulas modulo associativity, commutativity, idempotence where applicable, bounded negation nesting, and further canonical restrictions (Tarau, 2019).

6. Transformations, lightweight provers, bug finding, and broader logic-informed generation

The 2019 LogicIFGen also includes formula transformers in both directions: formulas can be simplified to equivalent or equiprovable easier forms, and the same transformations can be reversed to create harder formulas (Tarau, 2019). The paper emphasizes Mints transformation, which places formulas into the form

F:αF{:}\alpha8

where F:αF{:}\alpha9 is a conjunction of restricted formula shapes such as

$\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$0

Its implementation replaces ~p by p->false, expands <->, uses new variables like Tseitin-style transformations, and is linear in space.

A second transformation converts a disjunction-free formula into a list of Nested Horn Clauses with

$\L_4$6

via the pipeline

$\L_4$7

The example $\L_4$8 is used to illustrate the transformation. The key significance stated in the paper is that Nested Horn Clauses can be solved with reduced worst-case space complexity,

$\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$1

instead of exponential. The paper also rewrites implication and conjunction into the basis $\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$2, which makes formulas larger and harder; reversing the transformation simplifies them.

On the prover side, the framework derives lightweight theorem provers from proof calculi. It gives Gentzen LJ rules, notes that direct goal-directed implementation risks looping, and then translates Dyckhoff’s LJT or G4ip rules to Prolog:

$\L_4$9

It then derives optimized provers bprove/1, hprove/1, and eprove/1, and also implements a Hudelmaier-style prover V={1,23,13,0}\mathcal{V}=\left\{1,\frac{2}{3},\frac{1}{3},0\right\}0 with $\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$3 space complexity. For full intuitionistic propositional logic, it provides a prover V={1,23,13,0}\mathcal{V}=\left\{1,\frac{2}{3},\frac{1}{3},0\right\}1 with rules for implication, conjunction, disjunction, biconditional, and false. The paper reports no errors on the tested ILTP set for its own prover, notes that its own prover solves fewer ILTP problems than Dyckhoff’s heuristic prover but remains sound on tested cases, and states that the Nested Horn and refined provers improve performance substantially (Tarau, 2019).

Bug finding is organized around a gold-standard comparison pattern:

V={1,23,13,0}\mathcal{V}=\left\{1,\frac{2}{3},\frac{1}{3},0\right\}2

This supports classification into wrong_success, wrong_failure, and agreement. The framework uses typable lambda terms and SK combinators for false-negative testing, all formulas of a given size for false-positive testing, and transformed formulas to expose incompleteness bugs. The paper reports that the fcube prover passed many standard tests but failed on transformed formulas, revealing an incompleteness issue. It also includes deliberately flawed provers such as

V={1,23,13,0}\mathcal{V}=\left\{1,\frac{2}{3},\frac{1}{3},0\right\}3

to validate the tester itself (Tarau, 2019).

A broader connection appears in LLMCFG-TGen, which is not named LogicIFGen but exemplifies the same logic-informed generation pattern: rather than generating final artifacts directly from prose, it first constructs an explicit logical representation, here a control-flow graph $\begin{tabular}{ll} (\ell1) & \ell(p)=0,\ \text{where } p \text{ is an atom}\ (\ell2) & \ell(\neg\varphi_1)=\ell(\varphi_1)+1\ (\ell3) & \ell(\varphi_2\to\varphi_3)=\ell(\varphi_2)+\ell(\varphi_3)+1 \end{tabular}$4, and only then generates tests from enumerated execution paths (Yang et al., 6 Dec 2025). The paper explicitly frames this as relevant to “logic-informed generation” from natural-language requirements. This suggests a unifying interpretation of the LogicIFGen label across the cited literature: explicit logical structure is treated as the intermediate object that makes automation measurable in terms of soundness, completeness, coverage, traceability, or termination.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to LogicIFGen.