lira
core.logic
lira | core.logic | |
---|---|---|
1 | 8 | |
21 | 1,433 | |
- | 0.1% | |
0.0 | 5.2 | |
10 months ago | 3 months ago | |
Haskell | Clojure | |
MIT License | Eclipse Public License 1.0 |
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.
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...
core.logic
-
A Tour of Lisps
It's also available in Clojure: https://github.com/clojure/core.logic
If you want to write one yourself, it's pretty easy: https://www.youtube.com/watch?v=y1bVJOAfhKY
- Logic programming is overrated, at least for logic puzzles (2013)
-
Common Lisp language extensions wish list?
Something like Clojure's core.logic would be pretty nice too. As I understand it, this is one of those features that has been re-invented time and again in the Lisp world over the years. Although the CL standard is already fairly large, it would probably be a bit controversial to make that a required part of a CL implementation. Still, it would be cool to have the option of using dependent types in the macro system to generate formerly verified Lisp code at compile time.
- Kotlin + Prolog
-
Need help choosing my first Lisp
It also has core.logic which is minikanren. There are other logic programming options as well. Some libraries like core.typed use core.logic for the type checker.
- A Core.logic Primer
-
The birth of Prolog (1992) [pdf]
You could study core.logic: https://github.com/clojure/core.logic/tree/master/src/main/c...
I swear I'd bookmarked a resource that was more analogous to #2, but you may want to have a look at The Little Prover: https://mitpress.mit.edu/books/little-prover
-
Why Learn Prolog in 2021?
related:
https://github.com/clojure/core.logic/wiki/A-Core.logic-Prim...
What are some alternatives?
mercury - The Mercury logic programming system.
awesome-prolog - Curated list of Prolog packages and resources
clojure-graph-resources - A curated list of Clojure resources for dealing with graph-like data.
pyswip - PySwip is a Python - SWI-Prolog bridge enabling to query SWI-Prolog in your Python programs. It features an (incomplete) SWI-Prolog foreign language interface, a utility class that makes it easy querying with Prolog and also a Pythonic interface.
paip-lisp - Lisp code for the textbook "Paradigms of Artificial Intelligence Programming"
hatlog - custom type systems for python in prolog: http://alehander42.me/prolog_type_systems
clpz - Constraint Logic Programming over Integers
racket - The Racket repository
2p-kt - A Kotlin Multi-Platform ecosystem for symbolic AI