Skip to content

arkark/d-prolog

Repository files navigation

D-Prolog

codecov.io license: MIT Lines of code GitHub version

A Prolog implementation in D language.

Install

Download binary

Download the latest dprolog binary.

Install from source

$ git clone https://github.com/arkark/d-prolog.git
$ cd d-prolog

and build (refer to Development).

Usage

See docs/.

Development

Requirements

  • DMD: A compiler for D programming language
  • DUB: A package manager for D programming language
  • Linenoise

Install Linenoise

$ git clone https://github.com/antirez/linenoise.git
$ cd linenoise
$ gcc -c -o linenoise.o linenoise.c
$ ar rcs liblinenoise.a linenoise.o

and move liblinenoise.a to lib/ or somewhere D can find it (e.g. /usr/lib/).

Build

$ dub build

The destination directory of the output binary is bin.

Run

With no option:

$ dub run

With some options:

$ dub run -- -f example/family.pro --verbose

Tests

$ dub test

Release

$ git tag <version>
$ ./release.sh
  • Building a binary for release -> bin/$FILE_NAME
  • Calculating lines of code -> docs/LoC.md

Future Work

  • Support for Windows
  • Adding more tests

License

MIT