Skip to content

andrzejolszak/CSharpProlog

 
 

Repository files navigation

Build Status

Tests

A C# implementation of Prolog

using System;
using Prolog;

class Program
{
    static void Main(string[] args)
    {
        var prolog = new PrologEngine();
        
        prolog.ConsultFromString("human(socrates).");
        prolog.ConsultFromString("mortal(X) :- human(X).");
        
        var solution = prolog.GetFirstSolution(query: "mortal(socrates).");
        Console.WriteLine(solution.Solved); // = "True" (Yes!)
    }
}

About this fork

This is an experimental backwards-incompatible fork of jsakamoto's repository https://github.com/jsakamoto/CSharpProlog/. The focus here is only C# library-based usage and IDE-based usage. The IDE is completely overhauled, and REPL-specific features will get gradually removed.

Further development will focus on: bringing the Prolog behavior closer to the ISO standard, code clean up and optimization, unit tests, refactoring of static mutable state, and removing non-core-prolog features (e.g. SQL, json, xml, regex, etc.). All this will happen at the cost C# API-level backwards compatibility.

Solution Layout

CSProlog

Prolog Engine

CSProlog.Core.Test

Unit Tests

IDE

Windows Forms IDE

For more documents

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

Older versions

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

License

GNU LGPL v.3

About

A C# implementation of Prolog (port of https://sourceforge.net/p/cs-prolog)

Resources

License

Stars

Watchers

Forks

Languages

  • Prolog 74.2%
  • C# 25.2%
  • Other 0.6%