Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of Warren's abstract machine

    Warren's abstract machine

    Hassan Aït-Kaci · 1991

    This tutorial demystifies one of the most important yet poorly understood aspects of logic programming, the Warren Abstract Machine or WAM. The author's step-by-step construction of the WAM adds features in a gradual manner, clarifying the complex aspects of the design and providing the first detailed study of WAM since it was designed in 1983.Developed by David H. D. Warren, the WAM is an abstract (nonphysical) computer that aids in the compilation and implementation of the Prolog programming language and offers techniques for compiling and optimizing symbolic computing that can be generalized beyond Prolog. Although the benefits of the WAM design have been widely accepted, few have been able to penetrate the WAM. This lucid introduction defines separate abstract machines for each conceptually separate part of the design and refines them, finally stitching them together to make a WAM. An index presents all of the critical concepts used in the WAM. It is assumed that readers have a clear understanding of the operational semantics of Prolog, in particular, of unification and backtracking, but a brief summary of the necessary Prolog notions is provided.Contents: Introduction. Unification -- Pure and Simple. Flat Resolution. Prolog. Optimizing the Design. Conclusion. Appendixes.

    Programming
    Open LibraryAmazon
    Stats for nerds
    5recommend
    9mentions
    8people
    2010–2025years
    67% recommend33% neutral

    Mentions per year

    201020122014201620182020202220242025

    What Hacker News says

    1. TrueDualityNov 2023
      Sorry missed this comment. There are a surprising number of them, basically any formal solver is a deductive reasoning engine. Prolog is itself a deductive reasoning engine (and if you're going to implement a reasoning system, its probably worth going through the WAM Book over a weekend, search Google for wambook.pdf, its a publicly released book with the title "Warren's Abstract Machine: A Tutorial Reconstruction". The harder ones are inductive and abductive reasoners, which I'm not aware of any opensource ones only old papers that all do little tiny bits. A lot of deductive reasoners boil down to just depth-first-search with backtracking.

      How I'm storing them is maybe interesting... Graph databases that support tagged or typed relations get you most of the way to a basic reasoning system. I'm currently storing the graph content of the knowledge base in a database called SurrealDB with the RocksDB backend (this is new to me). Learning SurrealDB has been giving me a bit of Deja Vu around building simple reasoners, there is a lot of overlap between graph theory and formal reasoning.

      Rules are encoded in the program. I find it beneficial to think about this as building up lots of small tools that are aware of what they're capable of and can indicate whether they think they can make single step progress towards the goal. You might have a small tool that if you have a location and you're looking for a different location (its prerequisites for "knowing" it may be useful) you could have that tool walk your graph finding the smallest shared domain that both are a part of that can become part of the context. Building up context and learning to disambiguate things using that context is kind of the "hard part" if you want to optimize your solvers or ask complex questions.

      For the Rules to be meaningful you need to have an Ontology for your database. Your Rules will be operating on top of fixed concepts, and known relation types between them. Ontologies are a BIG subject that has also faded into the mist a bit, there are some samples on http://ontologydesignpatterns.org but there are a lot of dead links on there as well. The more complex your Ontology the harder to write and/or less useful the individual tools become as they will probably have fewer opportunities to run.

      Hope this helps!

      thread
    2. i_don_t_knowFeb 2021
      The closest thing that I know of is "Warren's Abstract Machine: A Tutorial Reconstruction" by Hassan Aït-Kaci. It's out of print but available as a PDF at http://wambook.sourceforge.net
      thread
    3. i_don_t_knowOct 2018
      For a really nice explanation of the Warren Abstract Machine, see "Warren's Abstract Machine: A Tutorial Reconstruction" by Hassan Aït-Kaci: http://wambook.sourceforge.net
      thread
    4. danieldkAug 2011
      Good follow-up literature:

      - Learn Prolog Now! by Patrick Blackburn, Johan Bos, and Kristina Striegnitz provides an introduction to Prolog:

      http://www.learnprolognow.org/

      - Prolog and Natural-Language Analysis by Fernando C. N. Pereira and Stuart M. Shieber provides an introduction to Prolog, and applies it to natural language processing. The book is more difficult than Learn Prolog Now!, but if you enjoy SICP, you will enjoy this book.

      http://www.mtome.com/Publications/PNLA/pnla-digital.html

      - The Craft of Prolog by Richard O'Keefe is a must to learn writing correct efficient Prolog code. Many eye-openers.

      http://www.amazon.com/Craft-Prolog-Logic-Programming/dp/0262...

      - Warren's Abstract Machine: A Tutorial Reconstruction by Hassan Ait-Kaci is a thorough overview of David Warren's abstract machine for executing of Prolog code. Since modern Prolog implementations are often based on WAM, it helps in understanding how to design efficient Prolog programs.

      http://wambook.sourceforge.net/

      thread
    5. swannodetteApr 2011
      Classic? SICP and PAIP are the only two I'd really consider classic. The Reasoned Schemer is 2005 and is IMO the most important introductory text on relational programming since Warren's Abstract Machine: A Tutorial Reconstruction. ~200 lines of Scheme and you have something as fast Prologs written in 150K of C.

      I don't consider Art of the Metaobject Protocol to be introductory or conceptual. Alan Kay considered it one of the only interesting books published on object oriented programming for a decade! Lisp in Small Pieces is also not particularly introductory or conceptual - that's a hardcore compiler optimization text.

      I'd love to hear of a domain where a Lisp dialect isn't as well suited as anything else.

      thread
    6. parenthesisAug 2010
      Re: Prolog implementation, in case you haven't already found it, the book Warren's Abstract Machine: A Tutorial Reconstruction, by Hassan Aït-Kaci, is pure gold for understanding the WAM.

      http://web.archive.org/web/20030213072337/http://www.vanx.or...

      thread

    Related

    Cover of Prolog programming for artificial intelligence
    2009–2026

    Prolog programming for artificial intelligence

    Ivan Bratko
    10 recommend · 17
    Cover of ML for the working programmer
    2009–2025

    ML for the working programmer

    Lawrence C. Paulson
    16 recommend · 38
    Cover of Introduction to automata theory, languages, and computation
    2008–2025

    Introduction to automata theory, languages, and computation

    John E. Hopcroft
    24 recommend · 37
    Cover of The craft of Prolog
    2009–2026

    The craft of Prolog

    Richard A. O'Keefe
    18 recommend · 57
    Cover of The art of the metaobject protocol
    2010–2026

    The art of the metaobject protocol

    Gregor Kiczales
    38 recommend · 92
    Cover of The art of computer programming
    2007–2026

    The art of computer programming

    Donald Knuth
    336 recommend · 1,799
    Cover of Programming Collective Intelligence
    2007–2025

    Programming Collective Intelligence

    Toby Segaran
    86 recommend · 135
    Cover of Introduction to Algorithms
    2007–2026

    Introduction to Algorithms

    Thomas H. Cormen
    274 recommend · 880