Demo of a WAM Prolog implementation in Python

Related tags

Miscellaneous prol
Overview

Prol: WAM demo

This is a simplified Warren Abstract Machine (WAM) implementation for Prolog, that showcases the main instructions, compiling, register allocation and machine functions.

Code organization

  • model.py: Data objects representing terms, programs, and machine entities.
  • compiler.py: Compiling of a list of rules into a list of instructions.
  • interpreter.py: Interpreter that execute the instruction listing for a given query.
  • grammar.py: Sample application of interpreter, with a grammar that can parse itself. Try it out with python -m grammar and compare with the text in the file!

Documentation

  1. About Prolog: a hurried primer if you don't know what it is about.
  2. Resolution strategy: how a query is actually solved in Prolog.
  3. Warren Abstract Machine: details about the implementation attempted here.
  4. Indexing: indexing implementation to fast-track some call patterns.
  5. Parsing: explaining basic structures for parsing
  6. Grammar: documentation for the sample application of grammar parsing.
  7. Stuff left out: what this implementation has simplified from the WAM, and references.
You might also like...
Sample microservices application demo

Development mode docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d or export COMPOSE_FILE='docker-compose.yml:docker-compose.dev.ym

Demo of connecting Rasa with Zalo

Demo of connecting Rasa with Zalo

Demo repository for Saltconf21 talk - Testing strategies for Salt states

Saltconf21 testing strategies Demonstration repository for my Saltconf21 talk "Strategies for testing Salt states" Talk recording Slides and demos Get

Demo code for
Demo code for "Logs in distributed systems" webinar

Hexlet Logs Demo Пререквизиты docker-compose python3 Учетка в DataDog Базовое понимание, что такое логи (можно почитать гайд

A webdav demo using a virtual filesystem that serves a random status of whether a cat in a box is dead or alive.

A webdav demo using a virtual filesystem that serves a random status of whether a cat in a box is dead or alive.

Implementation of the Angular Spectrum method in Python to simulate Diffraction Patterns
Implementation of the Angular Spectrum method in Python to simulate Diffraction Patterns

Diffraction Simulations - Angular Spectrum Method Implementation of the Angular Spectrum method in Python to simulate Diffraction Patterns with arbitr

Python implementation of the ASFLIP advection method
Python implementation of the ASFLIP advection method

This is a python implementation of the ASFLIP advection method . We would like to hear from you if you appreciate this work.

A Gura parser implementation for Python

Gura parser This repository contains the implementation of a Gura format parser in Python. Installation pip install gura-parser Usage import gura gur

Owner
Bruno Kim Medeiros Cesar
Bruno Kim Medeiros Cesar
Demo Python project using Conda and Poetry

Conda Poetry This is a demonstration of how Conda and Poetry can be used in a Python project for dev dependency management and production deployment.

Ryan Allen 2 Apr 26, 2022
Demo of patching a python context manager

patch-demo-20211203 demo of patching a python context manager poetry install poetry run python -m my_great_app to run the code poetry run pytest to te

Brad Smith 1 Feb 9, 2022
Tiny demo site for exploring SameSite=Lax

samesite-lax-demo Background on my blog: Exploring the SameSite cookie attribute for preventing CSRF This repo holds some tools for exploring the impl

Simon Willison 6 Nov 10, 2021
An extended version of the hotkeys demo code using action classes

An extended version of the hotkeys application using action classes. In adafruit's Hotkeys code, a macro is using a series of integers, assumed to be

Neradoc 5 May 1, 2022
A demo of a data science project using Kedro

iris Overview This is your new Kedro project, which was generated using Kedro 0.17.4. Take a look at the Kedro documentation to get started. Rules and

Khuyen Tran 14 Oct 14, 2022
A demo Piccolo app - a movie database!

PyMDb Welcome to the Python Movie Database! Built using Piccolo, Piccolo Admin, and FastAPI. Created for a presentation given at PyData Global 2021. R

null 11 Oct 16, 2022
Serverless demo showing users how they can capture (and obfuscate) their Lambda payloads in Datadog APM

Serverless-capture-lambda-payload-demo Serverless demo showing users how they can capture (and obfuscate) their Lambda payloads in Datadog APM This wi

Datadog, Inc. 1 Nov 2, 2021
Demo content - Automate your automation!

Automate-AAP2 Demo Content - Automate your automation! A fully automated Ansible Automation Platform. Context Installing and configuring Ansible Autom

null 0 Oct 27, 2022
Repo to demo translating colab/jupyter notebook to streamlit webapp

Repo to demo translating colab/jupyter notebook to streamlit webapp

Marisa Smith 2 Feb 2, 2022
Demo of using DataLoader to prevent out of memory

Demo of using DataLoader to prevent out of memory

null 3 Jun 25, 2022