From ae78ed26d1431cead1a6ecb0a71e782f4dff7700 Mon Sep 17 00:00:00 2001 From: Scott Karp Date: Fri, 13 Mar 2026 11:00:52 -0400 Subject: [PATCH] =?UTF-8?q?Phase=201=20review=20corrections=20=E2=80=94=20?= =?UTF-8?q?four=20bugs=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - relationships.pl: Replace recursive complementary_mitzvot/2 symmetry clause with explicit reverse facts (infinite loop in Prolog) - mitzvot.pl: Remove duplicate mitzvah(2, prohibition, no_other_gods) that caused double-counting in total_encoded/1 - resolve.pl: Add missing use_module(root_meanings) import — root_domain/2 was undefined, failing resolve_produces_result test - shoresh-engine: Generate and commit cabal.project.freeze for exact version pinning (Construction spec §1) All tests pass: 76 Elixir, 33 Haskell, 57 Prolog — 0 failures. Co-Authored-By: Claude Opus 4.6 --- shoresh-engine/cabal.project.freeze | 113 ++++++++++++++++++ talmudic_engine/src/reasoning/resolve.pl | 1 + talmudic_engine/src/specification/mitzvot.pl | 2 +- .../src/specification/relationships.pl | 9 +- 4 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 shoresh-engine/cabal.project.freeze diff --git a/shoresh-engine/cabal.project.freeze b/shoresh-engine/cabal.project.freeze new file mode 100644 index 00000000..c0df62fc --- /dev/null +++ b/shoresh-engine/cabal.project.freeze @@ -0,0 +1,113 @@ +active-repositories: hackage.haskell.org:merge +constraints: any.HUnit ==1.6.2.0, + any.OneTuple ==0.4.2.1, + any.QuickCheck ==2.16.0.0, + QuickCheck -old-random +templatehaskell, + any.StateVar ==1.2.2, + any.aeson ==2.2.3.0, + aeson +ordered-keymap, + any.ansi-terminal ==1.1.5, + ansi-terminal -example, + any.ansi-terminal-types ==1.1.3, + any.array ==0.5.6.0, + any.assoc ==1.1.1, + assoc -tagged, + any.base ==4.18.2.0, + any.base-orphans ==0.9.4, + any.bifunctors ==5.6.3, + bifunctors +tagged, + any.binary ==0.8.9.3, + any.bytestring ==0.12.2.0, + bytestring -pure-haskell, + any.call-stack ==0.4.0, + any.character-ps ==0.1, + any.colour ==2.3.6, + any.comonad ==5.0.10, + comonad +containers +distributive +indexed-traversable, + any.containers ==0.6.7, + any.contravariant ==1.5.6, + contravariant +statevar, + any.data-fix ==0.3.4, + any.deepseq ==1.4.8.1, + any.directory ==1.3.10.1, + directory -os-string, + any.distributive ==0.6.3, + distributive +tagged, + any.dlist ==1.0, + dlist -werror, + any.exceptions ==0.10.7, + any.file-io ==0.1.6, + file-io +long-paths -os-string, + any.filepath ==1.4.301.0, + filepath -cpphs, + any.generically ==0.1.1, + any.ghc-bignum ==1.3, + any.ghc-boot-th ==9.6.4, + any.ghc-prim ==0.10.0, + any.hashable ==1.5.1.0, + hashable -arch-native -random-initial-seed, + any.haskell-lexer ==1.2.1, + any.hspec ==2.11.16, + any.hspec-core ==2.11.16, + any.hspec-discover ==2.11.16, + any.hspec-expectations ==0.8.4, + any.indexed-traversable ==0.1.4, + any.indexed-traversable-instances ==0.1.2, + any.integer-conversion ==0.1.1, + any.integer-logarithms ==1.0.5, + integer-logarithms -check-bounds +integer-gmp, + any.mtl ==2.3.1, + any.network-uri ==2.6.4.2, + any.optparse-applicative ==0.19.0.0, + optparse-applicative +process, + any.os-string ==2.0.10, + any.parsec ==3.1.18.0, + any.pretty ==1.1.3.6, + any.prettyprinter ==1.7.1, + prettyprinter -buildreadme +text, + any.prettyprinter-ansi-terminal ==1.1.3, + any.primitive ==0.9.1.0, + any.process ==1.6.26.1, + process -os-string, + any.quickcheck-io ==0.2.0, + any.random ==1.3.1, + any.rts ==1.0.2, + any.scientific ==0.3.8.1, + scientific -integer-simple, + any.semialign ==1.3.1, + semialign +semigroupoids, + any.semigroupoids ==6.0.2, + semigroupoids +comonad +containers +contravariant +tagged +unordered-containers, + any.splitmix ==0.1.3.2, + splitmix -optimised-mixer, + any.stm ==2.5.1.0, + any.strict ==0.5.1, + any.system-cxx-std-lib ==1.0, + any.tagged ==0.8.10, + tagged +deepseq +template-haskell, + any.tasty ==1.5.3, + tasty +unix, + any.template-haskell ==2.20.0.0, + any.text ==2.0.2, + text -developer +simdutf, + any.text-iso8601 ==0.1.1, + any.text-short ==0.1.6.1, + text-short -asserts, + any.th-abstraction ==0.7.2.0, + any.th-compat ==0.1.7, + any.these ==1.2.1, + any.time ==1.12.2, + any.time-compat ==1.9.9, + any.transformers ==0.6.1.0, + any.transformers-compat ==0.8, + transformers-compat -five +five-three +generic-deriving +mtl, + any.unix ==2.8.8.0, + unix -non-portable-tests -os-string, + any.unordered-containers ==0.2.21, + unordered-containers -debug, + any.uuid-types ==1.0.6, + any.vector ==0.13.2.0, + vector +boundschecks -internalchecks -unsafechecks -wall, + any.vector-stream ==0.1.0.1, + any.witherable ==0.5 +index-state: hackage.haskell.org 2026-02-23T00:52:48Z diff --git a/talmudic_engine/src/reasoning/resolve.pl b/talmudic_engine/src/reasoning/resolve.pl index 58a1a21a..64cef9aa 100644 --- a/talmudic_engine/src/reasoning/resolve.pl +++ b/talmudic_engine/src/reasoning/resolve.pl @@ -34,6 +34,7 @@ :- use_module('../specification/mitzvot'). :- use_module('../specification/torah_text'). :- use_module('../specification/relationships'). +:- use_module('../specification/root_meanings'). %% ============================================================ %% DIALECTICAL RESOLUTION diff --git a/talmudic_engine/src/specification/mitzvot.pl b/talmudic_engine/src/specification/mitzvot.pl index 907a3fe3..69efd7ab 100644 --- a/talmudic_engine/src/specification/mitzvot.pl +++ b/talmudic_engine/src/specification/mitzvot.pl @@ -65,7 +65,7 @@ mitzvah(136, positive, release_debts_in_shmitah, when(seventh_year)). %% ============================================================ %% Avodah Zarah — idolatry / misattributed authority -mitzvah(2, prohibition, no_other_gods, always). % already declared above +%% mitzvah(2) already declared in Beliefs section above mitzvah(14, prohibition, not_make_idols, always). mitzvah(15, prohibition, not_make_idols_for_others, always). mitzvah(16, prohibition, not_worship_idols, always). diff --git a/talmudic_engine/src/specification/relationships.pl b/talmudic_engine/src/specification/relationships.pl index b23c58c1..083c78ee 100644 --- a/talmudic_engine/src/specification/relationships.pl +++ b/talmudic_engine/src/specification/relationships.pl @@ -114,8 +114,13 @@ complementary_mitzvot(175, 179). % appoint_judges + judge_righteously complementary_mitzvot(289, 295). % not_murder + save_the_pursued complementary_mitzvot(125, 126). % bring_bikurim + recite_declaration -%% Symmetric -complementary_mitzvot(A, B) :- complementary_mitzvot(B, A), A \= B. +%% Symmetric — explicit reverse facts (no recursive rule, which loops in Prolog) +complementary_mitzvot(3, 1). % unity_of_hashem + know_hashem +complementary_mitzvot(5, 4). % fear_hashem + love_hashem +complementary_mitzvot(156, 154). % sanctify_shabbat + rest_on_shabbat +complementary_mitzvot(179, 175). % judge_righteously + appoint_judges +complementary_mitzvot(295, 289). % save_the_pursued + not_murder +complementary_mitzvot(126, 125). % recite_declaration + bring_bikurim %% ============================================================ %% QUERIES