Releases: LPCIC/elpi
Releases · LPCIC/elpi
v1.9.1
CHANGES:
-
Tests:
- Fix testing framework on runners pre 1.9.0.
-
Parser:
- Line nubers after quotations were wrong, since
\n
inside
quotations were not taken into account.
- Line nubers after quotations were wrong, since
-
Typing:
- Name alias abbreviations are not refolded in error messages.
Eg.typeabbrev x int
does not take overint
, while
typeabbrev x (list int)
does overlist int
. - Fix type abbreviation refolding, was not working on some cases.
- Name alias abbreviations are not refolded in error messages.
-
Stdlib:
- Fix
is
functionint_of_string
to do what it says - New
is
functionrhc : string -> int
computes the inverse ofchr
- Fix
v1.9.0
CHANGES:
-
Typing:
typeabbrev
declarations are now taken into account and unfolded
by the compiler. The type checker refolds abbreviations
when printing error messages with the following caveat: when two type
abbreviations can be refolded the last declared one wins.
-
Compiler:
@macro
are no more accepted in types, sincetypeabbrev
provides the
same functionality.- fix clash between builtin names and type names
accumulate
is idempotent: accumulating the same file a second time
has no effect.
-
FFI:
- built in predicate are allowed to not assign (not produce a value) for
output and input-output arguments. - input-output arguments are forced to be
Conversion.t
of type'a ioarg
,
and recommended to wrap any nested type not able to represent variables
inioarg
. Egint option
should beint ioarg option ioarg
. In this
way one can safely call these builtins with non-ground terms, such as
some _
, for example to assert the result is notnone
but without
providing a ground term such assome 3
. MLData
declarations forOpaqueData
are no more named using a macro
but rather using a type abbreviation. This can break user code. The fix
is to substitutie@myopaquetype
withmyopaquetype
everywhere.
- built in predicate are allowed to not assign (not produce a value) for
-
Stdlib:
diagnostic
data type to be used as anioarg
for builtins that can fail
with a relevant error message. On the ML side one can usedElpi.Builtin.mkOK
andElpi.Builtin.mkERROR "msg"
to build its values.std.assert-ok!
,std.forall-ok
,std.do-ok!
,std.lift-ok
and
std.while-ok-do!
commodity predicates.- All operators for
calc
(infix_ is _
) now come with a type declaration.
v1.8.0
CHANGES:
-
Bugfix:
shorten foo.{ bar }.
whenfoo.bar
is a builtin used to be miscompiled.elpi-typechecker.elpi
now correclty stops printing warnings after it
printed 10 (used to stop after he processed 10, that may not be the same
thing, since some warnings are suppressed).
-
Parser:
- Interpret
-2
(with no space) as the negative2
not as the constant-2
.
This wayX is 3 - 2
andY is 3 + -2
are both valid.
- Interpret
-
FFI:
OpaqueData
now requires a ternary comparison, not just equality.
-
Stdlib:
- new data type
cmp
for ternary comparison. std.set
andstd.map
now based on ternary comparison.
- new data type
-
Builtin:
cmp_term
giving an order on ground terms.ground_term
to check if a term is ground.
v1.7.0
CHANGES:
-
Parser:
- Tolerate trailing
,
in lists, eg[1,2,3,]
is now parsed as[1,2,3]
. - Error if the input of
Parse.goal_from_string
contains extra tokens - Binary conjunction
&
is now turned on the fly into the nary one,
.
- Tolerate trailing
-
Bugfix:
- Nasty bug in pruning during higher order unification, see #36.
Discard
is now considered a stack term, and is turned into an
unification variable on heapification.API.RawData.look
now expandsUVar
correctly
-
Stdlib:
set
andmap
for arbitrary terms equipped with an order relation.
Based on the code of OCaml'sMap
andSet
library.- New API
map.remove
for maps on builtin data.
-
FFI:
- New
ContextualConversion
module andctx_readback
type. In an FFI call
one can specify a readback for the hypothetical context that is run once
and its output is give to the ML code instead of the "raw" constraints and
hyp list.
- New
-
API:
- Commodity functions in
Elpi.Builtin
to export as built-in
OCaml'sSet.S
andMap.S
interfaces (the output ofSet.Make
andMap.Make
). All data is limited to be a closed term. Constants.andc2
was removedFlexibleData.Elpi.make
takes no~lvl
argument (it is always0
)RawData.view
no more containsDiscard
since it is not an heap term
- Commodity functions in
-
Misc:
- Pretty printer for unification variable made re-entrant w.r.t. calls to the
CHR engine (used to lose the mapping between heap cells and names) - Pretty printer for solution abstracted over a context (part of the solution). In this
way the result can be printed correctly even if the runtime has been destroyed. - Default paths for finding
.elpi
files fixed after the switch to dune - A few more tests regarding unification, data structures and performance
- Pretty printer for unification variable made re-entrant w.r.t. calls to the
v1.6.0
CHANGES:
-
Builtin:
same_term
(infix==
) for Prolog's non-logical comparison (without
instantiation).set
andmap A
(A
only allowed to be a closed term) on
string
,int
andloc
keys.
-
Compiler:
- provide line number on error about duplicate mode declaration
- elpi-checker is faster and bails out after 10 seconds
-
FFI:
- allow
AlgebraicData
declarations to mixM
andMS
constructors Conversion.t
for closed terms (no unification variable and no variables
bound by the program)
- allow
-
Tests:
- typecheck all tests and measure type checking time
v1.5.2
v1.5.1
v1.5.0
CHANGES:
Elpi 1.5 requires OCaml 4.04 or newer
-
REPL:
- type errors are considered fatal, pass
-no-tc
to skip type checking. - use dune subst in order to implement
-version
flag to the command line
utility.
- type errors are considered fatal, pass
-
Runtime:
- reset unification variables names map at each execution. This makes
the names of variable printed in a reproducible way across executions.
- reset unification variables names map at each execution. This makes
-
FFI:
readback
is now as powerful asembed
and can generate extra goals. The
two types are now dual.
ELPI 1.4.1
Minor fixup to error locations
ELPI 1.4.0
Build based on dune and library wrapped