From 86b01a76247db5751793083ef1e71a27b165a1fc Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 3 Sep 2024 13:27:28 -0300 Subject: [PATCH] facts: avoid generating dummy And facts --- tl.lua | 3 +++ tl.tl | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tl.lua b/tl.lua index 8ebbcff3..d92997b0 100644 --- a/tl.lua +++ b/tl.lua @@ -10091,6 +10091,9 @@ a.types[i], b.types[i]), } FACT_TRUTHY = TruthyFact({}) facts_and = function(w, f1, f2) + if not f1 and not f2 then + return + end return AndFact({ f1 = f1, f2 = f2, w = w }) end diff --git a/tl.tl b/tl.tl index be4ecb9c..cde49da6 100644 --- a/tl.tl +++ b/tl.tl @@ -10091,6 +10091,9 @@ do FACT_TRUTHY = TruthyFact {} facts_and = function(w: Where, f1: Fact, f2: Fact): Fact + if not f1 and not f2 then + return + end return AndFact { f1 = f1, f2 = f2, w = w } end