https://github.com/fwcd/swift-prolog
Lightweight Prolog interpreter in pure Swift
https://github.com/fwcd/swift-prolog
prolog swift
Last synced: 8 months ago
JSON representation
Lightweight Prolog interpreter in pure Swift
- Host: GitHub
- URL: https://github.com/fwcd/swift-prolog
- Owner: fwcd
- License: mit
- Created: 2020-03-03T20:46:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-13T01:19:24.000Z (about 5 years ago)
- Last Synced: 2025-04-09T19:13:38.645Z (about 1 year ago)
- Topics: prolog, swift
- Language: Swift
- Size: 58.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prolog Interpreter for Swift
[](https://github.com/fwcd/swift-prolog/actions)
A lightweight Prolog interpreter written in pure Swift.
This project includes a library for combinatory parsing.
## Example
The following example showcases list concatenation in Prolog:
```prolog
?- :l Examples/list.pl
Successfully loaded 4 rules
?- concat(cons(a, cons(b, empty)), cons(c, empty), L).
{L -> cons(a, cons(b, cons(c, empty)))}
```
## Requirements
* Swift 5.0
## Building
Run `swift build`.
## Testing
Run `swift test`.