• Stars
    star
    9
  • Rank 1,874,170 (Top 39 %)
  • Language
    F#
  • License
    BSD 2-Clause "Sim...
  • Created over 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pengines Client for F#

Pengines is an HTTP service for evaluating Prolog build on the foundation of SWI-Prolog. A client creates a Pengine, which is a sandboxed Prolog environment, passes any Prolog facts and rules, then queries the facts and rules to obtain a list of solutions.

Build and Test Pengines.Client on Nuget

Modules

This client is designed with F# consumers in mind, and provides the following modules:

  • Pengines.Prolog - F# discriminated unions for Prolog terms: this includes, atoms, numbers, lists, compound terms, operators, and the dictionary term supported by SWI-Prolog.
  • Pengines.Serialization - serialize these terms to Prolog, and deserialize them from JSON,
  • Pengines.Pengine - manage the lifetime of a Pengine instance - create, query, and destroy
  • Pengines.Operators - helpful operators to make common Prolog operations more succinct from F#

System Requirements

  • SWI-Prolog - there are distributions available for Linux, macOS, and Windows.
  • Pengines - this is a small set of Prolog modules, available in a GitHub repo.
  • .NET Core Runtime - to use this library. Or you can pull the single file into your F# 4.1 or greater project with Paket.

Usage

  1. Create a list of Prolog terms containing your facts and rules
  2. Create a Pengine instance with Pengines.Pengine.createPengine, passing the list of terms and another term for a query to ask.
  3. Iterate through the results.
  4. Destroy the Pengine instance, which will delete the facts and rules. It will timeout and self-destruct after 5 minutes without use if you don't.

Documentation

Please see the user guide for a walkthrough.

There are also tests that show usage of the complete API.

More Repositories

1

FsPdf

Builds PDF's from pure F# (and needs a more interesting name)
F#
119
star
2

FSharp.Text.Docker

Build dockerfiles and run docker commands from F#
F#
57
star
3

FsCloudInit

Builds cloud-init VM configuration files in F#
F#
13
star
4

docker-fsharp-mono-netcore

Docker image for F# with mono and .NET Core toolchains
Dockerfile
12
star
5

fwrules

Builds firewall rules from type safe policies
F#
4
star
6

suave-chiron-netcore

Basic use of Suave and Chiron running on the .NET Core runtime, including tests.
F#
4
star
7

openfsharp-resilient

Slides and source from OpenFSharp presentation on resilient F# in the Linux ecosystem
F#
4
star
8

openfsharp-logic

You Got Logic in my Functional Programming!
F#
3
star
9

autodevenv

Automation to install tools for a development environment.
3
star
10

corert-fsharp-example

Example working CoreRT application in F#
F#
2
star
11

dotnet-servicebus-template

AsyncAPI generator for service bus topologies
F#
2
star
12

ansiblefs

Writing Ansible modules in F#
F#
2
star
13

pokedata

Postgres database of Pokemon data imported from CSV.
Makefile
2
star
14

SoftwareSpecFsInteractive

Building a software spec with F# and .NET Interactive
Jupyter Notebook
2
star
15

dotnetConf2021

Code samples from .NET Conf 2021 with a focus on F#
F#
2
star
16

mono-in-docker

Tutorial for running mono applications in a docker container
1
star
17

FSharp.Text.Rpm

Build an RPM spec from F#
F#
1
star
18

FarmerServiceBusWithMsi

Farmer example for a deployment with a Service Bus application using managed identity
F#
1
star
19

azurts

Extending Azure alerts with webhook infrastructure
F#
1
star
20

DreamhostNetClient

.NET client for the Dreamhost API
F#
1
star
21

pengines-dockerfile

A Dockerfile for creating a SWI-Prolog Pengines Docker image
1
star
22

strace-concurrency

Tracing concurrency in F# and C#
F#
1
star
23

mongodb-rest

RESTful API for mongodb using twisted python
Python
1
star