Giter Club home page Giter Club logo

pyprolog's Issues

Data Structures

Prolog implements data structures by representing them as a functor with fixed number of arguments: functor(arg1, arg2, ...). We should support this but I propose that for simpler and more convenient integration with other languages, for example Python, we would support structure as a Python like object. For example, objects represented as functor:

object(candle, red, small).
object(apple, red, small).
object(apple, green, small).

could be represented as Python class that would be then registered with Prolog library:

class Object:
    def __init__(self, name, color, size):
        self.name = name
        self.color = color
        self.size = size

You would call Prolog library with register(Object) to indicate that the instance of Object class will be used as a data structure. To use this in Prolog you would type something like this:

room(kitchen, object: Object).

in_room(X, Name) :- room(X, object.name = Name)

Use chapter 8 of Adventures in Prolog by Dennis Merritt to guide what functionality should be available.

Dynamic Database Updates

Implement support for adding and removing rules dynamically during the program execution.

Use chapter 7 of Adventures in Prolog by Dennis Merritt to guide what functionality should be available.

Implement Arithmetic

This implements arithmetic support in Prolog.

Use chapter 6 of Adventures in Prolog by Dennis Merritt to guide what functionality should be available.

Support for Cut operator

Use chapter 13 of Adventures in Prolog by Dennis Merritt to guide what functionality should be available.

Support for lists

Provide support for Prolog lists.

Use chapter 11 of Adventures in Prolog by Dennis Merritt to guide what functionality should be available.

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.