···
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}%" "SKIP=performance_HO" "SKIP+=performance_FO"] {with-test & os != "macos" & os-distribution != "alpine" & os-distribution != "freebsd"}
17
+
"ocaml" {>= "4.07.0" }
19
+
"ppxlib" {>= "0.12.0" }
20
+
"menhir" {>= "20211230" }
22
+
"ppx_deriving" {>= "4.2"}
23
+
"ANSITerminal" {with-test}
24
+
"cmdliner" {with-test}
26
+
"conf-time" {with-test}
34
+
synopsis: "ELPI - Embeddable λProlog Interpreter"
36
+
ELPI implements a variant of λProlog enriched with Constraint Handling Rules,
37
+
a programming language well suited to manipulate syntax trees with binders.
39
+
ELPI is designed to be embedded into larger applications written in OCaml as
40
+
an extension language. It comes with an API to drive the interpreter and
41
+
with an FFI for defining built-in predicates and data types, as well as
42
+
quotations and similar goodies that are handy to adapt the language to the host
45
+
This package provides both a command line interpreter (elpi) and a library to
46
+
be linked in other applications (eg by passing -package elpi to ocamlfind).
48
+
The ELPI programming language has the following features:
50
+
- Native support for variable binding and substitution, via an Higher Order
51
+
Abstract Syntax (HOAS) embedding of the object language. The programmer
52
+
does not need to care about technical devices to handle bound variables,
53
+
like De Bruijn indices.
55
+
- Native support for hypothetical context. When moving under a binder one can
56
+
attach to the bound variable extra information that is collected when the
57
+
variable gets out of scope. For example when writing a type-checker the
58
+
programmer needs not to care about managing the typing context.
60
+
- Native support for higher order unification variables, again via HOAS.
61
+
Unification variables of the meta-language (λProlog) can be reused to
62
+
represent the unification variables of the object language. The programmer
63
+
does not need to care about the unification-variable assignment map and
64
+
cannot assign to a unification variable a term containing variables out of
65
+
scope, or build a circular assignment.
67
+
- Native support for syntactic constraints and their meta-level handling rules.
68
+
The generative semantics of Prolog can be disabled by turning a goal into a
69
+
syntactic constraint (suspended goal). A syntactic constraint is resumed as
70
+
soon as relevant variables gets assigned. Syntactic constraints can be
71
+
manipulated by constraint handling rules (CHR).
73
+
- Native support for backtracking. To ease implementation of search.
75
+
- The constraint store is extensible. The host application can declare
76
+
non-syntactic constraints and use custom constraint solvers to check their
79
+
- Clauses are graftable. The user is free to extend an existing program by
80
+
inserting/removing clauses, both at runtime (using implication) and at
81
+
"compilation" time by accumulating files.
83
+
ELPI is free software released under the terms of LGPL 2.1 or above."""
86
+
"https://github.com/LPCIC/elpi/releases/download/v1.15.0/elpi-1.15.0.tbz"
88
+
"sha256=be94336e40ea24f0a66819977019f3956192edd8d6f705aff31b2590895780fd"
89
+
"sha512=8f6877f14570eb0ff73b40a41682d39eaaec643251e06a6201e084940707eb812ebe68f115a93b6fd3c0378b272d3164b64c55cf6735d5761876a77ca0e16020"
92
+
x-commit-hash: "0f01538839a6aee7f7d075c8a302e9267d9cc5c3"