···
2
+
maintainer: "Enrico Tassi <enrico.tassi@inria.fr>"
3
+
authors: [ "Claudio Sacerdoti Coen" "Enrico Tassi" ]
4
+
license: "LGPL-2.1-or-later"
5
+
homepage: "https://github.com/LPCIC/elpi"
6
+
doc: "https://LPCIC.github.io/elpi/"
7
+
dev-repo: "git+https://github.com/LPCIC/elpi.git"
8
+
bug-reports: "https://github.com/LPCIC/elpi/issues"
11
+
["dune" "subst"] {dev}
12
+
[make "build" "DUNE_OPTS=-p %{name}% -j %{jobs}%"]
13
+
[make "tests" "DUNE_OPTS=-p %{name}%" "TIMEOUT=240"] {with-test & os != "macos" & os-distribution != "alpine" & os-distribution != "freebsd"}
17
+
"ocaml" {>= "4.04.0"}
20
+
"ppxlib" {>= "0.12.0" }
22
+
"ppx_deriving" {>= "4.2"}
23
+
"ANSITerminal" {with-test}
24
+
"cmdliner" {with-test}
26
+
"conf-time" {with-test}
28
+
synopsis: "ELPI - Embeddable λProlog Interpreter"
30
+
ELPI implements a variant of λProlog enriched with Constraint Handling Rules,
31
+
a programming language well suited to manipulate syntax trees with binders.
33
+
ELPI is designed to be embedded into larger applications written in OCaml as
34
+
an extension language. It comes with an API to drive the interpreter and
35
+
with an FFI for defining built-in predicates and data types, as well as
36
+
quotations and similar goodies that are handy to adapt the language to the host
39
+
This package provides both a command line interpreter (elpi) and a library to
40
+
be linked in other applications (eg by passing -package elpi to ocamlfind).
42
+
The ELPI programming language has the following features:
44
+
- Native support for variable binding and substitution, via an Higher Order
45
+
Abstract Syntax (HOAS) embedding of the object language. The programmer needs
46
+
not to care about De Bruijn indexes.
48
+
- Native support for hypothetical context. When moving under a binder one can
49
+
attach to the bound variable extra information that is collected when the
50
+
variable gets out of scope. For example when writing a type-checker the
51
+
programmer needs not to care about managing the typing context.
53
+
- Native support for higher order unification variables, again via HOAS.
54
+
Unification variables of the meta-language (λProlog) can be reused to
55
+
represent the unification variables of the object language. The programmer
56
+
does not need to care about the unification-variable assignment map and
57
+
cannot assign to a unification variable a term containing variables out of
58
+
scope, or build a circular assignment.
60
+
- Native support for syntactic constraints and their meta-level handling rules.
61
+
The generative semantics of Prolog can be disabled by turning a goal into a
62
+
syntactic constraint (suspended goal). A syntactic constraint is resumed as
63
+
soon as relevant variables gets assigned. Syntactic constraints can be
64
+
manipulated by constraint handling rules (CHR).
66
+
- Native support for backtracking. To ease implementation of search.
68
+
- The constraint store is extensible. The host application can declare
69
+
non-syntactic constraints and use custom constraint solvers to check their
72
+
- Clauses are graftable. The user is free to extend an existing program by
73
+
inserting/removing clauses, both at runtime (using implication) and at
74
+
"compilation" time by accumulating files.
76
+
ELPI is free software released under the terms of LGPL 2.1 or above."""
79
+
"https://github.com/LPCIC/elpi/releases/download/v1.14.0/elpi-1.14.0.tbz"
81
+
"sha256=acc61ab4f9d9b80cc2b1d848bf3ed1c121634e8b42e0dfe086005a76b79ec2ec"
82
+
"sha512=de851b0cb1bd65e18fdc2b4a992a52eceb4c8e68a059e3652d7cfe525f0d31303ce323c2c20f01c55a633a6481adba05d16cc4c7f44707e189c073e759a1accd"
85
+
x-commit-hash: "d607597c71515554ed9b9a3e430ccecdc50400f4"