Giter Club home page Giter Club logo

coalp's Introduction

CoALP

Šī¸ 2014-2015: CoALP project, University of Dundee

License: LGPL v3

Synopsis

Haskell implementation of coalgebraic logic programming. Experimental, development version.

Installation

Standard installation using cabal

Run from the project directory:

cabal install

Installation with optional tests

Run from the project directory:

cabal install --enable-tests

Then you can run the test suite CoALP-tests from its install location.

External requirements

Graphwiz is required for saving derivations, in particular the dot tool.

eog is currently hardcoded as the viewer for saved files. These are however standard PNG files compatible with a generic graphics viewer.

Usage instructions

Please refer to the help in CoALPi -h.

There are two modes of operation of CoALPi: interactive (default) and non-interactive (switched on by the option -n).

The non-interactive mode can be used for scripting purposes as it accepts programs and goals through a standard Unix pipe like this:

cat programs/typeinference/typeinf.logic | CoALPi -n

The interactive mode is designed for iterating through derivations. The suggested interactive command workflow is:

  • program, goal, search (possibly multiple times) or check; then save and view followed by exit.

Interactive mode also accepts loading from files as follows:

CoALPi -l programs/typeinference/typeinf.logic

CoALPi commands, in a bit more details

program lets you input the list of clauses. You may have already loaded it from the command line using -l.

goal lets you input the list of goals. You need to input only one goal of the kind

:- p1(t1_1, ..., t1_n), ..., pm(tm_1, ..., tm_k).

Multiple goals are possible, but this functionality isn't finished yet.

Once you have both a program and a goal loaded, you can start a derivation by search. When CoALPi halts with a list of successful trees, you can continue the same derivation by issuing the search command again.

check is for building an observation (tier 3 guardedness check) which is a special kind of derivation. It's supposed to output unguarded loops if there are any.

Both the derivation and the observation can be saved to files using the command save. In the target directory you will find PNG files that you can view in a viewer or in a web browser. The numbered files contain all the trees in the derivation. There is also a file overview.gv.png which contains terms in goal nodes of each of those trees, and transitions between the trees.

The overview file of an observation is slightly more informative when describing transitions, which can be used for debugging.

coalp's People

Contributors

katyakom avatar vkomenda avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tolysz warbo

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.