Giter VIP home page Giter VIP logo

csharpprolog's Introduction

CSharpProlog NuGet Package Build status

A C# implementation of Prolog

// PM> Install-Package CSProlog -pre
using System;
using Prolog;

class Program
{
    static void Main(string[] args)
    {
        var prolog = new PrologEngine(persistentCommandHistory: false);

        // 'socrates' is human.
        prolog.ConsultFromString("human(socrates).");
        // human is bound to die.
        prolog.ConsultFromString("mortal(X) :- human(X).");

        // Question: Shall 'socrates' die?
        var solution = prolog.GetFirstSolution(query: "mortal(socrates).");
        Console.WriteLine(solution.Solved); // = "True" (Yes!)
    }
}

Installation

Run the following command from the Visual Studio Package Manager Console to install the latest version:

Install-Package CSProlog

The NuGet page can be found here:
https://www.nuget.org/packages/CSProlog/#

Solution Layout

CSProlog

Prolog Engine

CSProlog.Core.Test

Unit Tests

PL.NETCore

Dotnet Core Console Interactive Interpreter (tested in linux and windows)

PLd

DOS Console Interactive Interpreter

PLw

Windows Forms Example

PLx

An example of how to use the engine within another Program

For more documents

Earlier release documents can be found in README (2007-2014).pdf.

Release Notes

v.6.0.0

  • BREAKING CHANGE: Remove "SAMPLES, TESTING & EXPERIMENTAL" predefined predicates. (including CHAT-80 support)
  • Fix: "help" predefined predicate dose not work.
  • Enhance: GetAllSolutions can work with null file name.

v.5.0.0.1

  • Support: .NET Standard 1.4 (.NET Core) and UWP

v.5.0.0

  • BREAKING CHANGE: Remove dependency of "System.Windows.Forms".
  • NuGet package release

Older versions

Earlier release notes can be found in README (2007-2014).pdf.

License

GNU LGPL v.3

csharpprolog's People

Contributors

johnpool avatar jsakamoto avatar poolofthought avatar

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.