Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mkhan45/scalogic
https://github.com/mkhan45/scalogic
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mkhan45/scalogic
- Owner: mkhan45
- Created: 2023-11-15T23:36:21.000Z (almost 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-02T23:48:50.000Z (7 months ago)
- Last Synced: 2024-05-03T07:30:31.143Z (7 months ago)
- Language: Scala
- Homepage: https://mkhan45.github.io/scalogic/
- Size: 1.86 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scala Logic language
Website:
A logic programming language similar to MiniKanren. The code for the engine (<200LOC)
is in `Reunify.scala````
edge(1, 2)
edge(2, 3)
connected(x, z) :- ((x == z || edge(x, z)) || (edge(x, y) && connected(y, z)))edge(1, 2): true
edge(2, 3): true
edge(1, 3): false
connected(1, 3): truesameLength(x, y) :- ((x == () && y == ()) || ((x == (xh, xs) && y == (yh, ys)) && sameLength(xs, ys)))
// solves for a valid xs
(xh, xs) == (1, (2, (3, (4, ())))): Map(xh -> 1, xs -> (2, (3, (4, ()))))sameLength((1, (2, ())), (2, (3, ()))): true
sameLength((1, (2, ())), (2, ())): false// solves for a valid a that makes the two lists the same length
sameLength((1, (3, (5, ()))), (1, (3, a))): HashMap(a -> (yh'', ()))
```## Running
### Development mode:
```sh
sbt> ~fastLinkJS
```
```sh
cd vite
npm run dev
```### Build
```sh
./build_web.sh
basic-http-server docs
```
```