Coder Social home page Coder Social logo

prolog's People

Contributors

bzaar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

prolog's Issues

Think up a better name for the project

The name should be catchy and preferably should reflect the main principles that the library is built around. The library is

  • Modular
  • Extensible

and the Prolog flavour is

  • Fully Declarative

But just catchy is good enough. :-)

Create an online demo

Create a web page to let people write and run prolog code. Just one text area and a Run button. And another text box for lexer input to test out grammars. Include a few examples to get people started:

  • The farmer problem.
  • An expression evaluator.
  • The Prolog grammar.

Implement the anonymous variable (_)

Currently one has to use unique variables if a value is to be ignored.

The benefits of having the anonymous variable include:

  1. Better readability of prolog code.
  2. Removal of runtime overhead: there is no need to bind the anonymous variable; it unifies with anything (including other anonymous variables) without causing any variables to become bound. Binding imposes some runtime cost and avoiding it removes this (possibly small) overhead.

What many other Prolog implementations do, they just generate unique names such is _G145 for each occurrence of the anonymous variable. This is undesirable because the code becomes less readable when viewed in the debugger and doing so does not remove the runtime overhead of binding those variables.

The AnonymousVariable will be another inheritor to IValue, alongside Variable and IConcreteValue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.