youjinbou / pil Goto Github PK
View Code? Open in Web Editor NEWsmall prolog kernel
License: GNU Lesser General Public License v2.1
small prolog kernel
License: GNU Lesser General Public License v2.1
This is a small implementation of prolog. The License is GPL2 with Ocaml linking exception (same as the Ocaml source code). At this point the language has only a few primitives implemented: true/0, false/0, listing/0, halt/0, ground/1, var/1, asserta/1, assertz/1, consult/1, =/2, is/2, arithmetic and comparison operators for integers, and the mandatory conjunction and disjunction operators. I started writing this project after I realized that it might be possible to implement prolog without a goal stack (which is the usually the choosen design) using continuation passing style programming. I wrote several parsers using this style in the past, and also an Earley parser (which you'll find on github as well). You may see that the later basically follows a principle similar to prolog, but with breadth first search rather than depth first. So there are two branches provided, "master" which hosts the CPS based implementation, and "stack-based", whose name is quite explicit. Actually, it turned out more involved to write the stack based version, once I had the CPS one basically working (which feels much more natural, and whose code looks quite less convoluted). There are probably still bugs lingering in the code - if you find any just let me know - and it hasn't been written with speed in mind, so don't try comparing it with any other implementation yet (well, if you can manage to find code which only relies on the few primitives supported here).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.