An open API service indexing awesome lists of open source software.

https://github.com/dideler/logic-programming

A collection of short Prolog programs & predicates
https://github.com/dideler/logic-programming

Last synced: 5 months ago
JSON representation

A collection of short Prolog programs & predicates

Awesome Lists containing this project

README

          

Solutions to problems from a 2nd year course on Logic Programming.

Contents
--------

#### A1 ####
- Unification & Arithmetic (i.e. do the following expressions unify, if yes, what's the result?)
- Family Tree
- Animal Classification

#### A2 ####
- List Operations (Prolog predicates for list operations)
- Six Degrees of Bruce Campbell (finds if a given actor is within 6 degrees of separation of Bruce)
- Campbell Number (finds the minimum degrees of separation between an actor and Bruce)

#### A3 ####
- String Tokenizer
- Postfix Calculator
- Knapsack Problem (uses assert predicate, solves by brute-force)

#### A4 ####
- Logic Puzzle (uses Constraint Logic Programming with Finite Domains - clpfd)
- Palindromes (uses Definite Clause Grammars)

Credit
------

Earl E. Foxwell was my course instructor. He came up with the problems (or borrowed them from elsewhere).
The problems are not my own, but the solutions are unless otherwise noted.

TODO
----
- Fix bugs & mistakes
- Cleanup