pyswip
lira
pyswip | lira | |
---|---|---|
5 | 1 | |
444 | 21 | |
- | - | |
0.0 | 0.0 | |
5 months ago | 10 months ago | |
Python | Haskell | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pyswip
- Find Legal Moves in Brass Birmingham with Datalog
-
Prolog at work
You're looking for PySwip.
- The Power of Prolog
-
Small Prologs engine for app
you might like https://github.com/yuce/pyswip
-
Why Learn Prolog in 2021?
It might be easier to learn prolog, if it's wrapped in more familiar python.[1] Prolog's value lies in its database core. But much of the cost of learning a language is elsewhere, in coping with yet another way to do familiar things. With prolog, these are both relatively uninteresting, and nicely separable.
[1] https://github.com/yuce/pyswip
lira
-
Why Learn Prolog in 2021?
Lira[0] and its readable paper[1] is a good example of abstracting smart contracts into a statically typed, domain-specific language that describes the contract precisely at a high level. It's not Turing complete, which works for a large class of contracts (for instance, see the American and Asian options examples in [1]).
One concern with logic programming is cost of computation, on Ethereum every transaction has a gas associated with it and so you can't run computations that go over the gas available in a block.
Turner's ideas of Total Functional Programming[2] might have application in the smart contract space as well, since you disallow general recursion but allow structural recursion, you can likely precalculate or bound gas costs accurately ahead of time.
As for being statically typed, I completely agree, Solidity's poor design choices contributed to millions of USD in loss (e.g. DAO hack) because the developers were not able to easily reason about the implicit behavior or concurrency model.
[0] https://github.com/etoroxlabs/lira
[1] https://bahr.io/pubs/files/bahr15icfp-paper.pdf
[2] http://www.jucs.org/jucs_10_7/total_functional_programming/j...
What are some alternatives?
the-power-of-prolog - Introduction to modern Prolog
mercury - The Mercury logic programming system.
trealla - A compact, efficient Prolog interpreter written in plain-old C.
awesome-prolog - Curated list of Prolog packages and resources
core.logic - A logic programming library for Clojure & ClojureScript
hatlog - custom type systems for python in prolog: http://alehander42.me/prolog_type_systems
swiplserver - Python library for using SWI Prolog
debug_adapter - Debug Adapter Protocol (DAP) implementation for SWI-Prolog
prolog - The only reasonable scripting engine for Go.
trealla-js - Trealla Prolog for the web
clojure-graph-resources - A curated list of Clojure resources for dealing with graph-like data.