惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
人人都是产品经理
人人都是产品经理
Y
Y Combinator Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
D
DataBreaches.Net
GbyAI
GbyAI
Microsoft Security Blog
Microsoft Security Blog
博客园_首页
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
IT之家
IT之家
MongoDB | Blog
MongoDB | Blog
The GitHub Blog
The GitHub Blog
月光博客
月光博客
U
Unit 42
Hugging Face - Blog
Hugging Face - Blog
博客园 - 叶小钗
腾讯CDC
B
Blog RSS Feed
博客园 - Franky
爱范儿
爱范儿

Hacker News

GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Bonsai 1-bit WebGPU - a Hugging Face Space by webml-community Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line
GitHub - dmoews/logic-theorist: Recreation of the 1956 IP...
2026-05-13 · via Hacker News

The aim of this code is to implement the first published version of the Logic Theory Machine (also called the Logic Theorist.)

The Logic Theory Machine

The Logic Theory Machine was a program written by Allen Newell, J. C. Shaw, and Herbert A. Simon as part of their research into heuristic methods of problem-solving. It was intended to prove theorems in propositional logic, using the logical system for this in Principia Mathematica. [1] Newell and Simon began writing the program around the end of 1955. They initially simulated the program by hand, at one point using Simon's wife, children and some graduate students to help them. [3] It was at first written in a pseudocode called IPL-I, which was never implemented. [2], [3] The first version that was run on a computer was written in IPL-II and ran on the JOHNNIAC, producing its first proof in August 1956. [1], [2], [3], [4] It was later converted into IPL-V by Fred Tonge, and further developed by Einar Stefferud. [5]

The first published version of the Logic Theory Machine

The source code for an early version of the Logic Theory Machine was published in 1956 in [6] and [7]; it was written in IPL-I, an assembler-like language for an abstract machine. The code is almost identical in both references. The code unfortunately has some typos and problems and is not immediately runnable in its printed form. I have tried to repair it as necessary, as explained in the source code files.

The logical system

The propositional logic system in Principia Mathematica [8] builds formulae up from propositional variables by means of unary negation (~) and binary or (\/). Implication (->) is defined by letting ( p -> q ) equal ( ~ p \/ q ), and these two expressions are treated as interchangeable (*1.01.) The five axioms are:

  • ( ( p \/ p ) -> p ) (*1.2)
  • ( q -> ( p \/ q ) ) (*1.3)
  • ( ( p \/ q ) -> ( q \/ p ) ) (*1.4)
  • ( ( p \/ ( q \/ r ) ) -> ( q \/ ( p \/ r ) ) ) (*1.5) and
  • ( ( q -> r ) -> ( ( p \/ q ) -> ( p \/ r ) ) ) (*1.6.)

The rules of inference are detachment (*1.11), where q is inferred from p and ( p -> q ), and substitution of expressions into the propositional variables of a known axiom or theorem. (Although substitution is not stated as an explicit deduction rule in Principia Mathematica, it is used extensively and admitted to be admissible at the beginning of *2.)

Apart from substitution and detachment, the Logic Theory Machine also uses the proof method of chaining, where ( p -> r ) is inferred from ( p -> q ) and ( q -> r ). This can be justified by the theorems *2.05 or *2.06 in Principia Mathematica.

About the code

The Python files meant to be run directly here are logic.py, run_logic.py, and analyze_output.py. They will all print basic usage information when invoked with the --help option. logic.py is the interpreter for the IPL-I abstract machine. analyze_output.py is intended to extract the proof found, if any, from the output printed by logic.py, since there was no provision to do that in the provided IPL-I source code. It's best to use it with the --info option of logic.py. run_logic.py is intended to imitate [1] by running the program successively on each of the theorems in *2 of Principia Mathematica, allowing it to use, in the proof of each theorem, all axioms and all previous theorems from *2, whether it managed to prove them or not.

File list

  • README.md — this file
  • IPL-I source code:
    • logic-routines.txt — IPL-I source code for the Logic Theory Machine, revised so as to be runnable
    • orig-logic-routines.txt — Original IPL-I source code for the Logic Theory Machine as printed in [7]; labels, opcodes and operands only
    • transcription.txt — transcription of all source code as printed in [7], including comments
  • Principia Mathematica:
    • pm-axioms.txt — The five propositional logic axioms from *1 in Principia Mathematica
    • pm-theorems.txt — The theorems from *2 in Principia Mathematica
  • IPL-I interpreter:
    • analyze_output.py — Program to extract and check the proof found by the interpreter
    • grammar.py — Module with CFG routines
    • logic.py — Interpreter for the IPL-I abstract machine
    • run_logic.py — Driver program
    • simple_parser.py — Module with CFG parser
    • utils.py — Module with grammar and substitution utility routines
  • Testing:
    • test.sh, test.py — Testing framework
    • analyze_output.test, analyze_output.test-input, analyze_output.usage — tests for analyze_output.py
    • logic.test, test-source.txt, test-source-2.txt, test-source-3.txt, test-theorems-1.txt, test-theorems-2.txt, test-theorems-3.txt, logic.usage — tests for logic.py
    • run_logic.test, say-hi.py, run_logic.usage — tests for run_logic.py
    • verify.py — check consistency of the source code in orig-logic-routines.txt with that in transcription.txt

References

There is a good deal of additional information about the Logic Theory Machine/Logic Theorist in the CMU Digital Collection archives, which contain special collections on Newell and Simon. See the URL https://digitalcollections.library.cmu.edu/, and in particular https://digitalcollections.library.cmu.edu/cmu-collection/allen-newell and https://digitalcollections.library.cmu.edu/cmu-collection/herbert-simon.

[1]: Empirical Explorations of the Logic Theory Machine: a Case Study in Heuristic, A. Newell, J. C. Shaw, H. A. Simon, IRE-AIEE-ACM '57 (Western): Papers presented at the February 26-28, 1957, Western joint computer conference: Techniques for reliability, Feb. 1957, pp. 218-230, DOI: 10.1145/1455567.1455605.

[2]: Introduction to the First Edition in: Information Processing Language-V Manual, second ed., Allen Newell et al., RAND Corporation, pub. Englewood Cliffs, NJ : Prentice-Hall, Inc., 1964, https://archive.org/details/bitsavers_randiplInfanguageVSecondEdition1964_15001417.

[3] Chapter 13, Models of My Life, Herbert A. Simon, Cambridge, Mass., etc.: MIT Press, 1996 (first pub. 1991, Basic Books.)

[4] Programming the Logic Theory Machine, A. Newell, J. C. Shaw, IRE-AIEE-ACM '57 (Western): Papers presented at the February 26-28, 1957, Western joint computer conference: Techniques for reliability, Feb. 1957, pp. 230-240, DOI: 10.1145/1455567.1455606.

[5] Introduction in: The Logic Theory Machine: A Model Heuristic Program, Einar Stefferud, RAND Research Memorandum RM-3731-CC, June 1963, https://www.rand.org/pubs/research_memoranda/RM3731.html.

[6] The Logic Theory Machine--A Complex Information Processing System, A. Newell, H. Simon, IRE Transactions on Information Theory 2, #3 (September 1956), pp. 61-79, DOI: 10.1109/TIT.1956.1056797.

[7] The Logic Theory Machine: A Complex Information Processing System, Allen Newell, Herbert A. Simon, RAND paper P-868, July 12, 1956, Revised, https://archive.org/details/bitsavers_randiplP86ineJul56_3534001. (This is extremely similar to [6].)

[8] *1 and *2, Principia Mathematica, A. N. Whitehead and B. Russell, Volume I, Cambridge: Cambridge University Press, 1910. Available on HathiTrust; see https://hdl.handle.net/2027/miun.aat3201.0001.001?urlappend=%3Bseq=117.