Skip to content

Instantly share code, notes, and snippets.

@bactrian
Created July 27, 2016 10:36
Show Gist options
  • Save bactrian/3db8f35ca1636ab056aba7055c10edfe to your computer and use it in GitHub Desktop.
Save bactrian/3db8f35ca1636ab056aba7055c10edfe to your computer and use it in GitHub Desktop.
TwiOPAM (2016-06-24 for the last week)

This week in OPAM releases (Fri Jun 24 2016)

opal 0.1.1

  • Released on: Thu Jun 23 2016
  • Synopsis: Self-contained monadic parser combinators for OCaml
  • More Info: OPAM Page or Source Code
  • Changes: Unknown

ocp-indent 1.5.3

m17n 1.0

  • Released on: Thu Jun 23 2016
  • Synopsis: Multilingualization for OCaml source code
  • More Info: OPAM Page or Source Code
  • Changes: Unknown

itv-tree 2.1

  • Released on: Thu Jun 23 2016
  • Synopsis: float intervals tree library
  • More Info: OPAM Page or Source Code
  • Changes: Unknown

topkg-care 0.7.5

topkg 0.7.5

ppx_jsobject_conv 0.2.4

  • Released on: Wed Jun 22 2016
  • Synopsis: Ppx plugin for Typeconv to derive conversion from ocaml types to js objects to use with js_of_ocaml.
  • More Info: OPAM Page or Source Code
  • Changes: Unknown

safepass 2.0

dose3 5.0

re 1.6.1

telegraml 2.1.4

  • Released on: Mon Jun 20 2016
  • Synopsis: Telegram Bot API for OCaml
  • More Info: OPAM Page or Source Code
  • Changes: Unknown

pla 1.0

  • Released on: Mon Jun 20 2016
  • Synopsis: Ppx templating library using verbatim strings.
  • More Info: OPAM Page or Source Code
  • Changes: Unknown

edn 0.1.1

gdal 0.9.0

  • Released on: Mon Jun 20 2016
  • Synopsis: Bindings to the GDAL and OGR libraries
  • More Info: OPAM Page or Source Code
  • Changes: Unknown

plplot 5.11.0

  • Released on: Mon Jun 20 2016
  • Synopsis: Bindings for the PLplot library
  • More Info: OPAM Page or Source Code
  • Changes: Unknown

atdgen 1.9.1

  • Released on: Sat Jun 18 2016
  • Synopsis: Generates efficient JSON serializers, deserializers and validators
  • More Info: OPAM Page or Source Code
  • Changes: Unknown

bos 0.1.2

js_of_ocaml 2.8

### 0.5.0 (2016-06-27)
* Use `topkg` (#68, @samoht)
* Add `Alcotest.reject` to always fail tests (#64, @talex5)
* Fix pretty-printing of `Alcotest.list` (#53, #65, @talex5)
* Add an `argv` optional argument to `run` to use custom command-line arguments
(#63, @dinasaure)
* Fix typo in JSON output (#67, @fxfactorial)
* Use `Astring` for the unit tests (#62, @hannesm)
### 0.4.11 (2016-05-11)
* Fix regression introduced in 0.4.8 about alignment of [ERROR] (#60, @samoht)
### 0.4.10 (2016-05-03)
* Fix support for 4.03 (#58, by @hannesm)
### 0.4.9 (2016-02-25)
* Add `Alcotest.pass` a testable combinator which always pass (#50, @seliopou)
* Fix `index out of bounds` for empty test doc string (#51, @dariusf)
* Display the log directory (@samoht)
* Add missing newline in display header (#53, #54, @samoht)
* Add a `--color` flag to tweak color usage on the command-line and use `Fmt`
(#52, #55, @samoht)
### 0.4.8 (2016-03-12)
* Fix `check_raises` (#48, by @yallop)
* Use Astring (this drops support for 4.00) (@samoht)
* Simplify the build system (@samoht)
### 0.4.7 (2016-02-22)
* Minimal fix to ensure windows support (#46, by @samoht)
### 0.4.6 (2015-12-29)
* Add missing newline to verbose output (#36, by @seliopou)
* Result: add Result.result combinator (#37, by @seliopou)
* When redirecting stdout/stderr, use a single fd to share the seek offset
(#39, by @dsheets)
* If redirecting output, print error results as well (#39, by @dsheets)
### 0.4.5 (2015-09.16)
* Add boolean assert: `Alcotest.bool` (#33, by @zjhmale)
* Add sorted list assert: `Alcotest.slist` (#34, by @samoht)
* Add pair assert: `Alcotest.pair` (#34, by @samoht)
* Add simple assert, built using `Pervasive.compare` and a pretty-printing
function: `Alcotest.of_pp` (#34, by @samoht)
### 0.4.4 (2015-07-31)
* Fix of the format of log filenames
* Fix a regression in 0.4.* which were hiding error messages when using wrong
command-line arguments
### 0.4.3 (2015-07-22)
* Flush formatter for `Alcotest.check` (#27, by @edwintorok)
* Handle UTF8 for test documentation strings (#5)
### 0.4.2 (2015-07-03)
* Improve the result outputs
### 0.4.1 (2015-07-03)
* Fix regression introduced in 0.4.0: display the error if there is only
one error
* Add a testable combinator for options.
### 0.4.0 (2015-06-29)
* Simplify the use of the library by removing global states -- now calling
the `run` function multiple times is much more consistent.
* Remove the direct dependency to `OUnit`. Programs using `OUnit` and `Alcotest`
should continue to work.
* Add a `TESTABLE` signature and a `check` function to check invariants in
the tested libraries.
### 0.3.3 (2015-06-19)
* Control `--show-errors` using the ALCOTEST_SHOW_ERRORS env variable (#9)
* Add an `and_exit` optional argument to `Alcotest.run` to control
the exit behavior of the main test function (#4)
* Fix the output of `--version`
* Add a `--json` argument to show the test results as a JSON object
(#14, by @eowzukw)
* Expose `Alcotest.result` to turn a test into a result
### 0.3.2: (2015-06-08)
* Do not fail if the output file does not exist
* Add a simple example (#10, by @leowzukw)
* Add a logo (#12, by @leowzukw)
### 0.3.1 (2015-04-18)
* Fix OCaml 4.01.0 and earlier support (regressed in 0.3.0).
* Add Travis CI tests.
### 0.3.0 (2015-04-13)
* Fix backtrace handling (#2 by @dsheets)
* Use `Bytes` module instead of `String`
### 0.2.0 (2012-12-19)
* Fix issues with redirections
* Display the full errors when only one test is selected
### 0.1.0 (2012-12-12)
* Initial release
0.1.1 2016-07-13
----------------
Minor nits for topkg
0.1.0 2016-07-12
----------------
Initial release
## 113.33.00
Keep up to date with interface changes in `Async_kernel`, `Async_extra` and
`Async_unix`.
## 113.24.00
Keep up to date with interface changes in `Async_kernel`, `Async_extra` and
`Async_unix`.
## 113.00.00
- Added `Async.Std.Printf` module so that one doesn't unintentionally use
blocking `Core.Std.Printf` functions in an Async program.
There was much pre-existing code that did this via:
: open Core.Std
: open Async.Std
`Async.Std.Printf` defines blocking functions (e.g `printf`,
`eprintf`) to cause a type error, but leaves Async-friendly functions
(e.g. `sprintf`, `ksprintf`) untouched.
Replaced uses of `Printf.*`, with `Core.Std.Printf.*` where needed.
## 112.35.00
- Include some previously-omitted benchmarks
## 112.24.00
Keep up to date with interface changes in `Async_kernel`, `Async_extra` and
`Async_unix`.
## 112.17.00
Added tests and updated examples
## 112.01.00
- update tests
## 111.25.00
- add a dns example
## 111.11.00
- Updated the sound.ml example
## 109.53.00
- Bump version number
## 109.14.00
- Added function `Monitor.kill`, which kills a monitor and all its
descendants.
This prevents any jobs from ever running in the monitor again.
## 109.09.00
- Switched `Async.Std`'s toplevel bindings for `Deferred.Or_error`'s `bind` and `map` to use
`Deferred.Result`.
This allows them to be used with any `'error` type, rather than just `Error.t`.
## 109.05.00
- Added `val _squelch_unused_module_warning_` to `Async.Std`.
## 113.33.00
- Create library to fork and do calculations in child process.
- `Command_rpc.with_close` returns an `Or_error.t Deferred.t`, and indeed if it
fails to execute the binary, it will return an `Error _` rather than raising.
However, if it successfully executes the binary but then the handshake fails,
it raises an exception. Successfully executing the binary but then having the
handshake fail is I think a reasonable thing to want to catch, as it's what
you'll get if you are starting the command rpc slave via ssh and there's some
problem on the remote side.
I haven't thought very hard about what happens if the subprocess dies after
successful handshake and/or the implications of the Writer's monitor being the
monitor in effect when `with_close` is called. I think heartbeats will kill the
connection before this becomes an issue.
- Remove `Async_extended.Deprecated_async_bench`
It's causing problems for the open-source release on platforms that don't have
`Posix_clock.gettime`:
https://github.com/janestreet/async_extended/issues/1
Seems that a module with Deprecated in the name and no uses should just be binned.
- add a simple tcp proxy that is useful in testing for simulating network issues
## 113.24.00
- Make LTL predicates comparable by tagging and id to each one. Fixes a
functional comparison bug.
- Switched to PPX.
- Add an mli for `async_extended/src/reader_ext.ml` and remove a
couple of unused functions (notably `Reader_ext` had its own version of
`Reader.read_char`).
- Add async-friendly color print
- `Ltl.eval` should close the pipe after it is done with it.
- Deleted `Async_extended.Cml`.
- Remove `Async_extended.Std.Gzip` and redirect references to `Async_gzip.Std.Gzip`.
- Update `Command_rpc.Connection` to check the program before exec'ing it.
The filename must now be absolute, exist, and be executable. Previously
errors with nonexistent or nonexecutable files would only be found out
after forking.
- Change `Command_rpc.Command` to use `Versioned_rpc.Callee_converts` instead of
`Versioned_rpc.Both_convert` so that commands can be constructed without client-side
conversions. Clients remain free to use conversions or not, as appropriate.
Removed `val rpcs` from `Callee_converts` interfaces because nothing appears to use it,
and `Both_convert` does not provide it. Now `Both_convert.S` can be supplied to satisfy
`Callee_converts.S`.
- Add simple example of Command_rpc
- Add `Deferred_cache`.
- Fixing a couple of issues noticed in `Command_rpc`:
- If `propagate_stderr` is false, the child's stderr is now drained instead of
ignored.
- When connections are closed, stderr is now closed as well, which prevents
a file descriptor leak if the child process is unresponsive.
## 113.00.00
- Added a more raw interface to `Delimited.Csv`.
## 112.35.00
- Added `Ltl` module, an implementation of linear temporal logic, which
can be used to run online queries on sequences of states.
- Added `Interactive.Job`, for printing start/done messages for multiple
simultaneous jobs.
- Made `Any_error` be `Applicative`.
- Added `Command_rpc` support for `Versioned_rpc.Both_convert.Plain`.
## 112.24.00
- Fixed misspelling in `Command_rpc.Connection`, renaming `propogate_stderr` as
`propagate_stderr`.
## 112.17.00
- Added `Interactive` module for terminal interaction with users by
command-line executables.
`Interactive` was previously in `Iron_common`.
- In `Process`, added an `?env` argument to some functions.
- Allowed `Command_rpc` implementations to access the
`Rpc.Connection.t` used to invoke them.
There is an option to invoke `Command_rpc` implementations via sexp
communication instead of `Rpc`, so implementations are given a value
of a variant type `Sexp | Bin_io of Rpc.Connection.t`.
- Added `Resource` module, which abstracts the idea of acquiring and
releasing a handle to a resource.
## 112.06.00
- Unwound a recent change to `Mailbox` where one invocation of `receive`
would put aside items, preventing other invocations from noticing
them.
- Added `Delimited.Row.nth_conv_exn`, as a counterpart to
`get_conv_exn`.
- Fixed `File_updates` handling of identical mtimes.
## 112.01.00
- Clarified an error in `Rpc_proxy`.
## 113.33.00
- Rename `Async.Std.Schedule.every_{enter,tag_change}` to
`Async.Std.Schedule.every_{enter,tag_change}_without_pushback` and introduce
`Async.Std.Schedule.every_{enter,tag_change}` with pushback behavior.
The resulting functions are analogous to `Pipe.iter_without_pushback` and
`Pipe.iter`.
- Replaced `Persistent_rpc_client` with a successor `Persistent_connection`
for maintaining persistent connections to all manner of services, not
just rpc servers.
- Make `Bus.pipe1_exn` take a `Source_position.t` to be more consistent with
`first_exn` and `iter_exn`. This also shows better debug sexps on `Bus` when
multiple pipes are subscribed to the bus.
## 113.24.00
N.B. some changes happening for this release are not listed in this changelog
since they appear only as a consequence of changes in core or async\_kernel.
- When `Transfer.Writer.send*` raises, send an error to the client.
- Add a new rpc that enables a "push" rather than a "poll" model.
- Switched to PPX.
- For connected UDP sockets, expose `send` in the same fashion as `sendto`.
- `Tcp.Server` is documented to refuse excess connections beyond
`max_connections + max_pending_connections`, but it treats them as
pending connections in our standard OS configuration. In fact,
research indicates that the documented behavior is nearly impossible
to obtain directly and consistently from `listen`.
Clarify the name and role of the `backlog` argument to `listen` and
rename and update documentation for `max_pending_connections` to
clarify what it actually does, in light of some research:
`listen` does not generally respect the backlog argument as an
upper limit, but as a lower limit (mod `tcp_max_syn_backlog`) and,
with `tcp_abort_on_overflow=0`, `listen` will ignore excess
connections rather than actively refusing them.
(With `syncookies=1`, this can look like an indefinite backlog.)
Existing, working code can substitute `max_pending_connections ->
backlog` and move on. The behavior is not changed.
When possible, consider architecting applications so the server can
simply accept and close excess connections, rather than relying on the
`listen` backlog to return an active indication to the client that
they won't be serviced. To make sure the client receives an RST
rather than an orderly shutdown, you can set the linger time to 0
before closing the socket. (Added to unit tests.)
Direct `Tcp.Server` support for this paradigm is left for future work.
- Make `Rpc_low_latency_transport` treat disconnections as eof, like
`Async_unix.Reader` does.
- Add an implementation of Mvars to Async
- Allow custom handling of missed async_rpc heartbeats.
- adds a configuration limit on the number of tokens that can be in-flight
- Replace an `#include <sys/errno.h>` by `#include <errno.h>`.
Fixes janestreet/async\_extra#4
- Added `Tcp.Server.sexp_of_t`
- Adds `Rpc.Pipe_rpc.dispatch_iter`, plus a bunch of additional types to support
it. The main reason for this is to reduce space usage: `Pipe_rpc.dispatch`
followed by `Pipe.iter_without_pushback` consumes ~105 words in the steady state
(i.e., when no messages are coming in) while `dispatch_iter` consumes ~15. I'm
sure `dispatch` can be improved a lot, but a pipe by itself is 46 words, so it
can't possibly become as small as `dispatch_iter`.
Both cases can be made smaller by making `Connection.response_handler` a GADT
instead of a closure. I plan to do this later.
One annoying property of the interface is that the only way to cancel
a subscription is to use `Pipe_rpc.abort`, which has a terrible interface.
The logical way to improve the interface is to return a record of
a `Pipe_rpc.t`, a `Connection.t`, and a `Query_id.t`, which allocates an
additional few words. I'd kind of like to do this but it seems counter to the
goal of reducing space usage.
- Added `Tcp.Server.listening_on_address`, so that one can get the
address a server is listening on, as compared with `listening_on`,
which just returns the port.
- Marked Command.async_basic as deprecated using the appropriate ocaml attribute.
`@@ocaml.deprecated`
(http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec241)
- Extend the interface of `Persistent_rpc_client` to make the "address"
type - previously fixed as `Host_and_port.t` - abstract. This is
helpful for integrating with libraries that have a different notion of
an address, e.g. `rpc_discovery_lib`.
- `Typed_tcp` mutated a Hashtbl while iterating over it when closing.
- Added `Async.Bus.first_exn`, which takes a bus and a function, and
returns a deferred that becomes determined when the first event is
published to the bus for which the function returns `Some`.
This function is useful to reduce boilerplate for dealing with
unsubscription.
- Reduced the number of threads required by tests in:
async_extra/src/tcp.ml
- Added to the error message `Bus.subscribe_exn called after first write`
the source-code position of the caller, in case there isn't a backtrace,
to make the source of the problem clearer, and to avoid confusion with
other source-code positions of subscribers already in the bus.
- Added to `Bus.first_exn` a `Source_code_position.t` argument, so that
in the event of subscription failure, we can see who caused the
subscription to the bus.
- Added to `Tcp.Server.close` an optional argument:
?close_existing_connections : bool
This closes the sockets of all existing connections.
- Annotate errors returned by the async-rpc library with the name of the RPC for
which the error was returned (if it's an rpc-level error) and a description of
the remote side of the connection (the ip:host if connected via a network
socket).
- Improved `Async.Udp.bind`'s error message when it fails to
`mcast_join` a multicast group.
- Change `~callback` to `~f` throughout the `Bus` interface
## 113.00.00
- Added `Limiter` module.
Implements an async aware throttling rate limiter on top of `Core.Limiter`.
- Generalized `Persistent_rpc_client` to supports RPC connection types with
additional information besides the `Rpc.Connection.t` itself.
For instance: `Persistent_rpc_client.Versioned` has
`Versioned_rpc.Connection_with_menu.t` as its connection type.
- Changed the `Persistent_rpc_client.Make` functor to not erase the type `conn`
from its output module's signature.
This way, the output of `Make` can be fed to functors or functions
that expect a module matching `Persistent_rpc_client.S`.
- Moved `Log` from `Async_extra` to `Async_unix`, so that the scheduler can
refer to it.
- Fixed a bug where `Persistent_rpc_client.close` would hang waiting for a
connection to close.
## 112.35.00
- Added to `Log` a better mechanism for catching and handling background
errors, via `set_on_error` and an `on_error` argument to `create`.
- Added `Log.get_output : t -> Output.t list`.
- Changed `Monitor.try_with` so that errors after the initial return are
written to the global error log, rather than ignored.
- Added `Monitor.try_with_or_error` and `try_with_join_or_error`.
`try_with_or_error` is intended to someday be renamed as `try_with`.
It also omits some of `try_with`'s optional arguments: `run` and
`rest`. Different from `try_with`, `try_with_or_error` uses
``~run:`Now``, which we now believe is a more sensible behavior.
- Fixed a bug in `Versioned_typed_tcp` that causes spurious and repeated
reconnects when user-level code disconnects.
- Added `Tcp.Server.create_sock`, to create TCP servers that don't use
`Reader` and `Writer`.
- Changed `Log.Level.arg` to accept lowercase, uppercase, and
capitalized words.
- Replaced `Unpack_sequence.unpack*` functions with `unpack_into_pipe`
and `unpack_iter`, for reduced allocation.
module Unpack_from : sig
type t =
| Pipe of string Pipe.Reader.t
| Reader of Reader.t
end
val unpack_into_pipe
: from : Unpack_from.t
-> using : ('a, 'b) Unpack_buffer.t
-> 'a Pipe.Reader.t * ('a, 'b) Unpack_result.t Deferred.t
val unpack_iter
: from : Unpack_from.t
-> using : ('a, 'b) Unpack_buffer.t
-> f : ('a -> unit)
-> ('a, 'b) Unpack_iter_result.t Deferred.t
- Added to `Log` support for user-defined rotation schemes.
- Added `Log.is_closed`.
- Moved `Async_extra.Rpc` to its own library, `Async_kernel_rpc`, and
abstracted its transport layer.
`Async_kernel_rpc` depends only on `Async_kernel`. This allows
`Async_rpc` to be used in javascript or to try transports tuned for
different use cases. `Versioned_rpc` was moved to
`Async_rpc_kernel` as well.
`Async_extra` still provides an `Rpc` module with the Unix-dependent
part:
- the `Rpc.Transport` module is augmented with
`Async_unix.{Reader,Writer}` based transports
- the `Rpc.Connection` module is augmented with helpers for TCP
based connections
- In sexp-formatted `Log` messages, output the sexp on a single line
rather than in multi-line "hum"an format.
This makes it possible to, among other things, easily grep
such logs.
- Fixed a (very small) space leak in `Persistent_rpc_client`.
The fix was to use `Deferred.choose` and `Deferred.choice` instead
of `Deferred.any` and `>>|`. The old implementation added
a callback to the `t.close_started` ivar every time the connection
transitioned from connected to disconnected.
- Added `Persistent_rpc_client.create_generic`, which is like `create`,
but generic in the function used to connect.
- Fixed a race condition in the `Versioned_typed_tcp` interface that
caused a worker to miss a `Connect` message if the box is under high
load.
`Query_client.create` is called from `Worker_impl.create` in
a different async cycle than the following call to
`Query_client.listen` (really, `Tail.collect` under the hood) which
is made from `Worker_impl.run`.
When the load on the box is heavy (many workers starting and
connecting at the same time), the OS might take away the CPU from
the worker process between the two async cycles. The TCP socket
gets connected while the process is still waiting for its turn, and
eventually, when it's the worker's turn to grab the CPU, Async
scheduler might process the TCP event earlier than
`Worker_impl.run`.
- Improved `Udp.ready_iter` to avoid intermediate exceptions by using
`Syscall_result`.
UDP loops use that, so will benefit.
Adjust the implementation slightly as well: made the inner loop
always exit on `EAGAIN`/`EWOULDBLOCK` to wait until ready, and give
other Async jobs a chance to run after `EAGAIN`/`EWOULDBLOCK` in the
outer loop.
## 112.24.00
- Changed `Log` to not eagerly run the rotation loop when an
`Output.Rotating_file` is created.
- Changed `Log.Output.combine` to write log outputs in sequence rather than
parallel, to give the correct semantics when the same output is included
multiple times in `Log.create`.
This fixed a test that was failing in `lib_test/log_test.ml`.
- Remove `Log.Rotation.t_of_sexp`.
- Made `Command.async*` functions flush `stdout` and `stderr` before calling
shutdown, to avoid timeouts causing data to be dropped.
For now, we're making this change in `Command` rather than `Writer`.
`Writer` already has `at_shutdown` handlers. We've observed that they
don't behave well for command-line programs w.r.t. stderr. So, the
thinking of this feature is to try out a different `at_shutdown`
behavior, just for `Command` executables and just for `stdout` and
`stderr`. If it works out, maybe we move it into `Writer` proper.
Putting the change in `Command` for now reduces the scope of what is
affected by the experiment, and hopefully correlates well with where
the change is likely to help.
- In `Rpc`, catch exceptions raised by blocking-RPC implementations.
- Added functionality to `Versioned_typed_tcp.Repeater`.
Added to `create` an argument `is_client_allowed : Client_name.t -> bool`.
Added to `start` an argument:
on_connecting_error : (client_name : Client_name.t
-> server_name : Server_name.t
-> Error.t -> unit)
- Fixed a race in `Versioned_typed_tcp` in which a message can be dropped
between `Server.create` and `Server.listen`
- Simplified the implementation of `Rpc`.
Rpc has an internal Response_handler module, which is just a record containing
a response-handling function and an `already_removed` boolean field. It turns
out that this is unnecessary: `already_removed` is set to true when the
function returns ``remove`, but if it returns ``remove` then it will also be
removed from a hash table, and we only call the function immediately after
looking it up in that hash table.
This wasn't always pointless: this function used to return deferred values and
run inside a throttle. The simplification is only possible because we made it
synchronous a while ago.
- Added `Tcp.Server.num_connections` function.
- Added creation functions for `Versioned_rpc` menus, for use in clients of an
RPC proxy.
In `Menu`:
val create : Implementation.Description.t list -> t
In `Connection_with_menu`:
val create_directly : Connection.t -> Menu.t -> t
These are for use in clients of an RPC proxy, which can't use the
regular menu mechanism since they each need to have many menus (one
for each potential target) but should only need to have one connection
(to the proxy).
- Added to `Rpc` expert submodules, `Implementations.Expert` and `Rpc.Expert`,
with low-level access for implementing a proxy that can handle queries without
knowing their names, types, etc. in advance.
- Renamed `Rpc.Implementation.Description` as `Rpc.Description`.
- Added `Rpc.{Rpc,Pipe_rpc,State_rpc}.description` accessor functions.
- Added `Rpc.Implementation.descriptions`, which returns all RPCs in an
`Rpc.Implementations.t`.
This was needed for the `rpc_discovery` library: given an `Implementations.t` we want to advertise at
prefix/<rpc_name>/<rpc_version>/host_and_port = <host_and_port>
- Added combinators to `Rpc.Implementations`: `lift`, `add`, `add_exn`.
## 112.17.00
- Modernized code style in `Async_extra`.
This was mostly whitespace changes, plus deletions of unneeded
module paths.
- Added `with sexp_of` to `Tcp.Where_to_listen` for debugging.
- In `Versioned_typed_tcp`, check that the writer on the other side is
not closed in the `Pass_on` case.
- Added a new way to implement an RPC, where the implementation
doesn't return a deferred.
This "blocking" rpc implementation guarantees that the rpc will in
fact be fully dispatched by the time the implementation returns.
This can be used to skip the deserialization of the query, and
instead operate directly in the message contents as received.
Also, fixed a bug in which the query handler (and therefore the
connection state) was being called before the internal async rpc
handshake was finished.
- Added an optional `job_tag` argument to `Sequencer_table.enqueue`,
to display for debugging.
- Added an optional argument to TCP-connection functions to control
the local interface used to connect.
To implement this this, extended `Tcp.connect` to work on a bound socket.
- Added `with compare` to `Process.Output.t`.
- Added `Process.Output.Stable` module.
- Exposed concrete rpc in `Versioned_rpc.Both_convert`.
- Changed `Cpu_usage` to take its first sample after waiting, rather
than immediately.
This fixes a problem where the first sample could be `NAN` or `Inf`.
- Made `Log` buffer-age be unlimited, to avoid exceptions when log
writes are blocked for long periods.
- Improved `Log.t_of_sexp`'s error message.
- Changed `Rpc.Connection.client` and `with_client` to raise some
errors which had been dropped during RPC dispatch.
Previously, errors dispatching `Rpc.Rpc.t`'s were handled correctly
and returned or raised by the relevant dispatch functions. However,
errors that occurred in the middle of handling a `Rpc.Pipe_rpc.t` or
`Rpc.State_rpc.t` were swallowed. This is because they happen after
the dispatch functions have returned, and the dispatch interface
doesn't allow for errors to occur in the middle of the pipe -- they
must be raised to the monitor in effect when the `Rpc.Connection.t`
is created. Errors could be raised to the effective monitor at the
dispatch call, but the failure causes the entire connection to go
into error, so the connection's monitor seems more appropriate.
These errors weren't propagated to the caller because `client` and
`with_client` both used `Monitor.try_with` without `rest` handling,
causing /any/ errors caused while handling the connection (after the
`Connection.t` has been returned to the user) to be dropped.
- In `Rpc`, exposed some optional parameters from the `Tcp` module:
`?max_pending_connections` and `?buffer_age_limit`.
## 112.06.00
- In `Log`, exposed the raw message.
- Changed `Rpc` creators' `connection_state` to be a function that takes
the connection and returns the state.
This makes it possible for the connection state to actually get
a handle on the connection itself, which simplifies a number of
idioms for using RPC. In particular, it makes it easier to respond
with an RPC back to a client over client's own connection.
- Fixed some nondeterministically failing tests.
- In `Log`, made logs discard messages when their output list is empty.
Also, removed redundant tracking of current level.
- Moved `Udp.bind_to_interface_exn` to `Unix` module in `async_unix`.
- Added `Versioned_typed_tcp.Repeater`.
Repeater is used in the cases where we want to inspect and possibly
alter the flow between a client and a server without having to
change either the client or the server or the protocol between them.
## 112.01.00
- Changed `Persistent_rpc_client.connected` to avoid returning a
connection that is closed at the time it was called.
- Optimized `Rpc.implement` so that if a server's implementation
returns a determined deferred, then the output is immediately
serialized and written out for the client.
This reduces memory consumption, improves throughput and latency.
Measurements with the `pipe_rpc_test program` showed that a server
went from processing 600\_000 msg/sec, to 2\_200\_000 msg/sec before
pegging the CPU.
- Changed `Log`'s output processor's batch size from `1_000` to `100`.
- Added `Persistent_rpc_client.close` and `close_finished`.
- In `Rpc.Connection.client` and `with_client`, used the
`handshake_timeout` as the `timeout` passed to `Tcp.connect`.
`handshake_timeout` was previously used only for the `Rpc` module's
handshake timeout.
- Changed `Rpc.create`'s `on_unknown_rpc` argument, renaming
`\`Ignore` as `\`Close_connection`, and requiring `\`Call` to return
`\`Close_connection` or `\`Continue`.
`\`Ignore` was renamed because it was a poor name, since in fact it
closed the connection.
Added a `\`Continue` option, whic allows one to keep the connection
open.
Changed `\`Call` to return `\`Continue` or `\`Close_connection`,
where the old `unit` return value meant `\`Close_connection`.
- In `Versioned_typed_tcp`, enabled the use of "credentials" in the
"Hello" message.
Propagate credentials to the user code when it arrives on the wire.
## 111.28.00
- Added to `Versioned_rpc` a non-functor interface.
- Added `Log.level`, which returns the last level passed to `set_level`.
- Enabled Async-RPC pushback in the `Tcp_file` protocol.
## 111.25.00
- Removed `lazy` from the core of `Log`.
- Made `Log.Message.t` have a stable `bin_io`.
The `Stable.V1` is the current serialization scheme, and `Stable.V0`
is the serialization scheme in 111.18.00 and before, which is needed
to talk to older systems.
- Changed `Rpc` to return `Connection_closed` if a connection ends
before a response makes it to the caller.
Previously, the dispatch output was never determined.
Also, removed an unused field in one of the internal data structures
of Async RPC.
- In `Versioned_rpc`, added `version:int` argument to `implement_multi` functions.
- In `Versioned_rpc`, the `Pipe_rpc.Make` functors now return an
additional output functor.
`Register'` is like `Register` but has in its input module:
```ocaml
val response_of_model :
Model.response Queue.t -> response Queue.t Deferred.t
```
rather than
```ocaml
val response_of_model : Model.response -> response
```
This is analogous to `Pipe.map'` and `Pipe.map`.
- Added to `Log` a `V2` stable format and better readers for
time-varying formats.
- In `Log`, added an optional `?time:Time.t` argument to allow callers
to pass in the logged time of an event rather than relying on
`Time.now ()`.
## 111.21.00
- Added `Sexp_hum` `Log.Output.format`, which is useful for making logs
more human readable.
- Added `with compare` to `Rpc.Implementation.Description`.
## 111.17.00
- Added module `Persistent_rpc_client`, an RPC client that attempts to
reconnect when the connection is lost, until a new connection is
established.
- Significantly sped up the `Rpc` module by removing `Bigstring`
serialization.
Performance of the two implementations was tested by building a
simple client/server executable that would count major cycles.
Sending 100 byte messages at a rate of 50k/second shows (on both
sides of the RPC):
original:
* ~160 major cycles in 30s
* CPU usage around 60%
new:
* ~10 major cycles in 30s
* CPU usage <= 2%
- Enabled a version of `Pipe_rpc` and `State_rpc` where the consumer
can pushback on the producer if it can't consume the contents of the
pipe fast enough.
- Added `Log.Level.arg : Log.Level.t Command.Spec.Arg_type.t` for
defining command lines that accept (and autocomplete) log levels.
- Added `Command.async_or_error` and renamed `Command.async_basic` to
`Command.async`, leaving `async_basic` a deprecated alias for the
new name.
`Command.async_or_error` is similar to `Command.basic` and
`Command.async`, but accepts a `unit Or_error.t Deferred.t` type.
- Added `Persistent_rpc_connection.current_connection`, so that one
can detect whether one is currently connected.
```ocaml
val current_connection : t -> Rpc.Connection.t option
```
## 111.13.00
- For `Typed_tcp.create`, added a `Client_id.t` argument to the `auth`
callback.
## 111.11.00
- Made `Log` more fair with respect to other Async jobs, by working on
fixed-length groups of incoming log messages.
Previously, `Log` had processed everything available. The change
gives other Async jobs more of a chance to run.
## 111.08.00
- Added `Log.Message.add_tags`, which extends a message with a list of
key-value pairs.
val add_tags : t -> (string * string) list -> t
## 111.06.00
- Added `?on_wouldblock:(unit -> unit)` callback to
`Udp.recvmmsg_loop` and `recvmmsg_no_sources_loop`.
- For functions that create `Rpc` connections, added optional
arguments: `?max_message_size:int` and
`?handshake_timeout:Time.Span.t`.
These arguments were already available to `Connection.create`, but
are now uniformly available to all functions that create
connections.
## 111.03.00
- Add `?max_connections:int` argument to `Rpc.Connection.serve`.
`max_connections` is passed to `Tcp.Server.create`, and limits the
number of connections that an Rpc server will accept.
- Improved `Log.Rotation`:
- Made `Log.Rotation.t` abstract; use `create` rather than an
explicit record.
- Added a `` `Dated`` `naming_scheme`.
- Add `Log.Rotation.default`, for getting a sensible default
rotation scheme.
- Added an optional (but discouraged) option to symlink the latest
log file.
- Every log rotation scheme has an associated `Time.Zone.t`.
- Changed the internal representation of `Log.Rotation.t`, but
`t_of_sexp` is backwards compatible, so existing config files will
continue to work.
- Changed `Udp.bind_any` to use `Socket.bind ~reuseaddr:false`, to
ensure a unique port.
- Added `Tcp.Server.listening_socket`, which returns the socket the
server is listening on.
Changed `Tcp.Server` so that if the listening socket is closed, the
server is closed.
- Added to `Udp.Config.t` a `max_ready : int` field to prevent UDP
receive loops from starving other async jobs.
- Improved `File_tail` to cut the number of `fstat` calls in half.
`File_tail` uses a stat loop to monitor a file and continue reading
it as it grows. We had made two `fstat` invocations per loop
iteration, using `Async.Std.Unix.with_file` which constructs an
`Fd.t` and therefore does it own `fstat`. Switching to
`Core.Std.Unix.with_file` with `In_thread.run` eliminated the extra
`fstat`.
## 110.01.00
- Added `Cpu_usage.Sampler` for directly sampling CPU usage.
- Fixed `Log.rotate` to never raise.
- Fixed two bugs in `Log` rotation.
* Log rotation had used the wrong date when checking whether it
should rotate.
* Made `Rotation.keep = \`At_least` delete the oldest, rather than
the newest, logs.
## 109.60.00
- Replaced `Tcp_file.serve`'s `~port:int` argument with
`Tcp.Where_to_listen.inet`.
## 109.58.00
- Changed `Cpu_usage` to use `Core.Percent` instead of `float` where
appropriate.
- Made `Bus.unsubscribe` check that the subscriber is subscribed to
the given bus.
- Made `Log.t` support `with sexp_of`.
- Fixed `Tcp.on_port 0` to return the port actually being listened on,
like `Tcp.on_port_chosen_by_os`.
Previously, a serverlistening on `Tcp.on_port 0` would have its
`Tcp.Server.listening_on` as `0`, which of course is not the port
the server is listening on.
## 109.55.00
- Added `Udp.recvmmsg_no_sources_loop`, a specialization of
`recvmmsg_loop` for improved performance.
This improvement was driven by profiling at high message rates.
## 109.53.00
- Added module `Bus`, which is an intraprocess "broadcast"
communication mechanism.
- Added `Tcp.to_inet_address` and `to_unix_address`.
- Added `Tcp.to_socket` which creates a `Tcp.where_to_connect` from a
`Socket.Address.Inet.t`.
- Module `Weak_hashtbl` is now implemented as a wrapper around
`Core.Weak_hashtbl`.
No intended change in behavior.
## 109.52.00
- Added module `Cpu_usage`, which publishes CPU-usage statistics for
the running process.
- Fixed `Sequencer_table.enqueue` so that there is no deferred between
finding the state and calling the user function.
## 109.47.00
- Added `with sexp` to `Log.Output.machine_readable_format` and `format`.
## 109.45.00
- Added `?abort:unit Deferred.t` argument to
`Lock_file.waiting_create`, `Lock_file.Nfs.waiting_create` and
`critical_section`.
## 109.44.00
- Fixed a time-based race condition in `Log` rotation.
## 109.42.00
- Fixed `Log.Blocking` so that when async is running it writes the message in syslog before failing with an exception.
## 109.40.00
- Added to `Udp.Config` the ability to stop early, via `stop : unit Deferred.t`.
## 109.38.00
- In `Rpc`, exposed accessors for binary protocol values.
For example, this allows one to write a wrapper for `Pipe_rpc` that
allows for the easy re cording and replaying of values the come over
the pipe.
## 109.35.00
- Added module `Async.Udp`, aimed at high-performance UDP
applications.
- Added module `Lock_file.Nfs`, which wraps the functions in
`Core.Std.Lock_file.Nfs`.
## 109.33.00
- Change `Log.Global` to by default send all output, including `` `Info ``,
to `stderr`.
Replaced `Log.Output.screen` with `Log.Output.stderr`. There is now
also and `Log.Output.stdout`.
## 109.32.00
- Added `Dynamic_port_writer`.
`Dynamic_port_writer` solves the problem of communicating a
dynamically selected tcp port from a child process to its parent.
## 109.28.00
- Fixed an error message in `Versioned_rpc` that was swapping which
versions were supported by the caller and the callee.
## 109.27.00
- Added function `Versioned_typed_tcp.Client.shutdown`.
- Added new module `Sequencer_table`, which is a table of
`Throttle.Sequencer`'s indexed by keys.
## 109.24.00
- Made the `Caller_converts` interface in `Versioned_rpc` use the
`Connection_with_menu` idea introduced in `Both_convert`.
## 109.19.00
- Added function `Versioned_typed_tcp.Client.flushed : t ->
[ `Flushed | `Pending of Time.t Deferred.t ]`.
This exposes whether the underlying `Writer.t` has been flushed.
## 109.17.00
- Added an option to `Async.Log.Rotation` to include the date in
logfile names.
This is mostly for archiving purposes.
- Made `Versioned_rpc.Callee_converts.Pipe_rpc.implement_multi` agree
with `Rpc.Pipe_rpc.implement` on the type of pipe rpc
implementations.
- Improved the performance of `Versioned_typed_tcp`.
Avoided creating deferreds while reading the incoming messages.
## 109.15.00
- In `Rpc.client` and `Rpc.with_client`, allowed the client to
implement the rpcs.
Added a new optional argument: `?implementations:_ Client_implementations.t`.
- Added new module `Versioned_rpc.Both_convert` to allow the caller
and callee to independently upgrade to a new rpc.
This is a new flavor of `Versioned_rpc` in which both sides do some
type coercions.
## 109.12.00
- Made explicit the equivalence between type `Async.Command.t` and type `Core.Command.t`.
## 109.11.00
- Exposed a `version` function in `Pipe_rpc` and `State_rpc`.
## 109.10.00
- Fixed a race condition in `Pipe_rpc` and `State_rpc`. This race
could cause an exception to be raised on connection closing.
## 109.08.00
- Added module `Async.Command`
This is `Core.Command` with additional async functions. In particular
it contains a function `async_basic` that is exactly the same as
`Core.Command.basic`, except that the function it wraps returns
`unit Deferred.t`, instead of `unit`. `async_basic` will also start the
async scheduler before the wrapped function is run, and will stop the
scheduler when the wrapped function returns.
## 113.24.00
Initial release.
## 113.00.00
- Added `modify_event_selector` optional parameter to `Async_inotify.create`.
## 111.17.00
- Upgraded library to use inotify 2.0
## 113.33.00
- In `Pipe`, deprecated `read_at_most` and `read_now_at_most`, and
replaced them with `read'` and `read_now'`, respectively.
- Reverted a recent feature that changed `Pipe`'s default
`max_queue_length` from `Int.max_value` to `100`. It looks like 100
is to small to keep `Pipe` overhead to a minimum -- we saw a
noticeable slowdown in Async.Log. We're going to do some more
benchmarking and try to reduce the overhead and choose a better
number.
- Added `Async.Std.Let_syntax = Deferred.Let_syntax`, which makes it
possible to use `%bind` and `%map` after `open Async.Std`.
This required fixing a few places where the new `Let_syntax` in scope
shadowed `Command.Param.Let_syntax`.
- Improve stacktrace for unhandle async exception in js\_of\_ocaml.
Wrapping the unhandle exception with `Error.create` will serialize this exception
and prevent us to have good error reporting in Js\_of\_ocaml.
- Reworked `Async_kernel`'s clock handling to make it possible to use a
notion of time distinct from the wall-clock time used by `Clock_ns`
and maintained by the Async scheduler. There is now a self-contained
`Time_source` module, a data structure that holds a timing-wheel. All
of the code that was in `Clock_ns` and implicitly used the Async
scheduler and its timing wheel is now in `Time_source`, and is
suitably parameterized to work on an arbitrary time source with an
arbitrary timing wheel. `Clock_ns` is now a wrapper around
`Time_source` that implicitly uses the Async scheduler's time source.
`Time_source` still uses the Async scheduler for running jobs that
fire -- the new power comes from the user being able to advance time
distinctly from the wall clock.
- Changed `Time_source.sexp_of_t` to display "<wall_clock>" for the
wall-clock time source. We don't want to display the events because
that can be ridiculously large.
And, for non-wall-clock time sources, don't show the `Job.t`s in
events, because they are uninformative pool pointers.
- Added `Time_source.advance_by`.
- Added `Time_source.alarm_precision`.
- Added to `Async.Scheduler` `Time_ns` analogs of `cycle_start` and
`cycle_times`:
val cycle_start_ns : unit -> Time_ns.t
val cycle_times_ns : unit -> Time_ns.Span.t Stream.t
- Add `Deferred.map_choice` for transforming the output of `Deferred.choice`.
- Remove an avoidable call to `is_determined` in `Deferred.value_exn`. The patch is
meant to preserve current error messages without adding any allocation overhead
compared to the existing.
Context: implementation of Eager_deferred in the works that essentially wants to
redefine map, bind, etc, in the following way:
let map t ~f =
if Deferred.is_determined t
then return (f (Deferred.value_exn t))
else Deferred.map t ~f
;;
- Add `Pipe.read_choice` to encode the appropriate way of combining `values_available`
and `read_now` to conditionally read from a pipe.
## 113.24.00
N.B. some interface change in Core (notably to `Hashtbl` and `Map`) implied some
interface change in this package as well, although they are not mentionned in
this changelog.
- Switched to ppx.
- Improved the Async scheduler's to allocate a `handle_fired` function
once, rather than every time it calls `advance_clock`.
- Removed configurability of Monitor's `try_with`-ignored-exception
handling, i.e. removed `Monitor.try_with_rest_handling` and
`Monitor.try_with_ignored_exn_handling`.
The behavior of exceptions raised to a monitor after it returns is
unchanged -- i.e. they are logged, as they have been since 112.28.
Changed `Monitor.try_with`'s `?rest` argument from:
?rest : ` `Ignore | `Raise `
?rest : ` `Log | `Raise `
This naming reflects the fact that subsequent exceptions are logged,
not ignored.
- In `Async_kernel`, moved `Scheduler.set_execution_context` from the
`Types.Scheduler` module to its own file. Because `Types` is a
`module rec`, `set_execution_context` hadn't been inlined and was
called via `caml_apply2`. In its own file, it will be inlined.
This release creates a new scheduler0.ml, and moves the old
scheduler0.ml to scheduler1.ml.
- Fixed a space leak in `Pipe` due to a pipe holding pointers to its
`upstream_flusheds` after they are closed. The leak shows up in
`Pipe.transfer` and related functions, e.g. with:
Pipe.transfer temporary_pipe long_lived_pipe
called repeatedly, in which `long_lived_pipe` would accumulate a large
number of `upstream_flusheds`.
The fix is to maintain `upstream_flusheds` as a `Bag.t`, and to remove
an upstream pipe when it is closed.
- Implement `Pipe.of_sequence`
- Improved the error message when an exception is raised to a
`Monitor.try_with` that has returned before Async has initialized
`Monitor.try_with_log_exn`.
- Improved the implementation of `Monitor.get_next_error`, by replacing
the monitor's list of handlers:
; mutable handlers_for_next_error : (exn -> unit) list
with a single ivar:
; mutable next_error : exn Ivar.t
I think this wasn't done originally because of a dependency cycle.
But now that we have types.ml, we can do the clear thing.
- Improved the implementation of Monitor exception handling,
i.e. `detach_and_iter_errors`to make it clear that `Monitor.send_exn`
does not run user code -- it only schedules jobs.
- Fix an error message in `Pipe` to match the condition that led to it.
- Add a new pipe constructor:
val unfold : 'b -> f:('b -> ('a * 'b) option Deferred.t) -> 'a Reader.t
`unfold` is more powerful than the combination of
Useful for, e.g., creating a pipe of natural numbers:
Pipe.unfold 0 ~f:(fun n -> return (Some (n, n+1)))
- Add `Deferred.Map.all` similar to `Deferred.List.all`.
This does what you would expect:
val all
: ('a, 'b Deferred.t, 'cmp) Map.t
-> ('a, 'b, 'cmp) Map.t Deferred.t
- Added some simple functions that seem missing from `Deferred` and `Ivar`.
val Ivar.peek : 'a t -> 'a option
val Ivar.value_exn : 'a t -> 'a
val Deferred.value_exn : 'a t -> 'a
- Add `Monitor.catch_error`, which provides error handling for
processes/subsystems intended to run forever.
- Added to the Async scheduler a configurable:
min_inter_cycle_timeout : Time_ns.Span.t
When scheduler calls epoll(), it uses a timeout of at least
`min_inter_cycle_timeout`.
`min_inter_cycle_timeout` can be configured via `ASYNC_CONFIG` or via
val Scheduler.set_min_inter_cycle_timeout : Time_ns.Span.t -> unit
This allows one to tweak the scheduler to be more fair w.r.t. threads,
e.g. with:
Scheduler.set_min_inter_cycle_timeout <- Time_ns.Span.of_us 1.;
- Optimized `Scheduler.schedule'` to avoid a closure allocation.
- Removed `Monitor.kill`, which was unused internally. This removes the
`kill_index` field from `Execution_context.t`, which saves us a word
everytime we allocate or store an execution context.
- Assert that `Deferred.forever` never returns statically, rather than dynamically.
- Changed `Async.Std` to not include `Deferred.Monad_syntax`, so that
one must explicitly opt in (via `open Deferred.Monad_syntax`) to use
`let%bind` syntax with Async.
- Add `Pipe.to_sequence`
- Make `Stream.closed s` return immediately when `s` is already closed.
Currently the following property holds:
for any s, Deferred.peek (Stream.closed s) = None
- For `Pipe` functions that deal with batches of elements in a queue,
added an optional argument:
?max_queue_length : int (** default is `Int.max_value` *)
This limits the size of the queue that is used, which can improve
Async fairness.
Affected functions are:
filter_map
filter_map'
fold'
iter'
map'
read'
read_now'
transfer'
transfer_id
This also obviates `read_at_most` and `read_now_at_most`, which we
will deprecate in a later release.
Removed a couple helper types, `iter` and `fold`, that had been used
to express commonality among functions, but were becoming unwieldy due
to differences.
- Changed `Pipe`'s default `max_queue_length` from `Int.max_value` to
100.
- Added to `Pipe.iter_without_pushback` an optional argument:
?max_iterations_per_job : int (** default is `Int.max_value` *)
`iter_without_pushback` will not make more than
`max_iterations_per_job` calls to `f` in a single Async_job; this can
be used to increase Async-scheduling fairness.
- Added `Pipe.write_if_open` which does exactly what it says. This is a
common pattern. Also added a pushback-oblivious variant
`write_without_pushback_if_open`.
Call sites for these two new functions were introduced wherever I
found that doing so would not introduce any side effects (even
counting allocation) in the case of a closed pipe.
## 113.00.00
- Switched `Lazy_deferred` to use `Or_error.t` rather than `('a, exn) Result.t`.
Note: There is difference in the `run` argument between `Monitor.try_with`
and `Monitor.try_with_or_error`. In this module, the function is called
already in a closure inside a bind, so that difference is acceptable.
- Made `Deferred` match `Invariant.S1`.
- Improved `Async_kernel.Scheduler.run_cycles_until_no_jobs_remain` to use
`Timing_wheel.fire_past_alarms` rather than sleeping.
- Added `Quickcheck` module.
- Reworked the initialization of `Monitor.try_with_ignored_exn_handling` to log
exceptions using `Async.Log` so that it doesn't rely on top-level effects,
which may not happen without packed libraries.
## 112.35.00
- Added `Clock.Event.run_at` and `run_after`.
- Eliminated a space leak in `Clock.with_timeout`.
Previously `Clock.with_timeout span d` created a deferred that
waited for `span` even if `d` (and hence `with_timeout`) became
determined sooner. Now, `with_timeout` aborts the clock alarm if
`d` becomes determined, which saves space in Async's timing wheel.
- Added `Clock.Event.fired`, and removed the `fired` value that was
returned by `at` and `after`.
val fired : t -> [ `Happened | `Aborted ] Deferred.t
- Added `Clock.Event.reschedule_{at,after}`.
- Fixed the space leak that caused nested `Monitor.try_with` to use
linear space rather than constant space.
Changed `Monitor.try_with_ignored_exn_handling` so that with
``Eprintf` or `` `Run f ``, the error processing runs in
`Monitor.main` rather than in the monitor that called
`Monitor.try_with`. This avoids space leaks due to chains of
monitors, e.g.:
open! Core.Std
open! Async.Std
let () =
Monitor.try_with_ignored_exn_handling := `Run ignore;
let num_monitors = 10_000_000 in
let num_remaining = ref num_monitors in
let rec loop n : unit =
if n > 0
then
upon
(Monitor.try_with
(fun () ->
loop (n - 1);
return ()))
(function
| Error _ -> assert false
| Ok () ->
decr num_remaining;
if !num_remaining = 0 then shutdown 0)
in
loop num_monitors;
never_returns (Scheduler.go ());
;;
Added a unit test to detect if nested monitors leak space.
- Removed `Lazy_deferred.follow`, which is not used in the tree anymore.
Removing this function allows `Lazy_deferred.t` to be implemented as:
type 'a t = 'a Deferred.t Lazy.t
although that's not done yet.
- Added hooks to `Async_kernel.Scheduler` for `js_of_ocaml`.
This hook aims to be called every time one add a job to the
scheduler (enqueue + timing_wheel).
- Made `Async_kernel` not depend on thread.
- Added `Deferred.Memo`, which wraps functions in `Core.Memo` to
correctly handle asynchronous exceptions.
- Renamed `Pipe` and `Thread_safe_pipe` functions that clear their input
queue so that their name starts with `transfer_in`, to make it clearer
that they side effect their input.
| old name | new name |
| ------------------------- | ------------------------------ |
| `write'` | `transfer_in` |
| `write_without_pushback'` | `transfer_in_without_pushback` |
- Added `Pipe.init_reader`, symmetric to `Pipe.init`.
val init : ('a Writer.t -> unit Deferred.t) -> 'a Reader.t
val init_reader : ('a Reader.t -> unit Deferred.t) -> 'a Writer.t
- Changed `Async_kernel.Job_queue.run_jobs` to call `Exn.backtrace`
immediately after catching an unhandled exception
There should be no change in behavior. This change was to make it
more clear that there is no intervening code that interferes with
the global backtrace state.
- Made `Deferred` functions that take an argument
`?how:[ `Parallel | `Sequential ]` accept
`` `Max_concurrent_jobs of int``, which operates in a sequence in
parallel, limited via a throttle.
- Made `Deferred.Or_error` match `Applicative.S`.
- Fixed `Scheduler.run_cycles_until_no_jobs_remain` so that it continues
running if one has done `Scheduler.yield`.
- Split the implementation of `Deferred` into a number of files, to
solve some problems with circularities.
Split into:
- deferred.ml
- deferred_sequence.ml
- deferred_list.ml
- deferred_array.ml
- deferred_queue.ml
- deferred_map.ml
- deferred_result.ml
- deferred_option.ml
For a sequence of multiple modules used to construct a module,
switched from the `Raw_*` prefix convention to the numeric suffix
convention. E.g. we now have `Deferred0`, `Deferred1`, `Deferred`.
## 112.24.00
- Now depends on `Core_kernel` instead of `Core`.
`Async_kernel.Clock` uses `Core_kernel.Time_ns` and
`Core_kernel.Timing_wheel_ns` rather than `Core.Time` and
`Core.Timing_wheel_float`.
- Added `Async_kernel.Types` module to deal with the mutual recrsion of
`Async_kernel`'s types.
This should help eliminate the complexity and make it easier to make changes
without running into as many constraints due to module/type ordering.
Merged `Types.Jobs` into `Types.Scheduler`.
- Improved the performance of `Deferred.bind`, eliminating an allocation in
`Ivar.connect`.
- Optimized `Deferred.bind`, removing a closure allocation by inlining
`Deferred.create`.
- Added `Pipe.interleave_pipe`, which is like `interleave`, but takes a pipe
rather than a list.
## 112.17.00
- Fixed a space leak in `Clock.Event.abort`, making it free the job
that was created and stored in the timing wheel.
- Moved `Scheduler.yield` from `Async_unix`.
- Fixed a bug in `Scheduler.yield_every`, so that it doesn't
initialize the scheduler until the staged function is called.
- Added `concat_map` function to `Monad_sequence` interface.
- Added `Shutdown.shutdown_on_unhandled_exn`.
- Added some functions to `Deferred.Or_error` to parallel
`Core.Or_error`: `errorf`, `tag`, `tag_arg`.
```ocaml
val errorf : ('a, unit, string, _ t) format4 -> 'a
val tag : 'a t -> string -> 'a t
val tag_arg : 'a t -> string -> 'b -> ('b -> Sexp.t) -> 'a t
```
- Added `Gc.Alarm`, an Async-friendly wrapper around
`Core.Gc.Expert.Alarm`.
- Removed `Gc.Expert`, whose functions are superseded by
Async-friendly functions in `Gc` proper.
- Added `Pipe.read_now_at_most`.
- Changed `Pipe.merge` to check whether its output is closed, and if
so, stop rather than write to it (which raised).
Also, made `Pipe.merge` close its inputs whenever its output is
closed.
- Changed `Clock.at` to return `Deferred.unit` if it is supplied a
time in the past.
Previously, it would create an empty ivar and a job to fill it that
would run in the next cycle.
- Changed `Clock.Event.status` to return ````Will_happen_at of
Time.t``` rather than ````Waiting```, if applicable.
- Added `Ivar.create_full`.
- Moved the use of `Linux_ext` to `Async_unix`.
This is one of the necessary steps in making `Async_kernel` depend
on `Core_kernel` rather than `Core`.
## 112.06.00
- Added `Deferred.Sequence` module, analogous to `Deferred.List` but for
`Core_kernel.Std.Sequence`.
- Modernized code style.
## 112.01.00
- Optimized `Monitor.try_with ~run:\`Now f` to return a determined
deferred if `f ()` returns a determined deferred.
Previously, `Monitor.try_with ~run:\`Now f` always introduced a
`Deferred.map`, which made it impossible to do some optimizations
that bypass the scheduler overhead.
- Added an `ASYNC_CONFIG` field that causes the program to dump core
if Async jobs are delayed too much.
The new field is `dump_core_on_job_delay`.
- Switched `Async_kernel` from using `Core.Sys` to `Pervasives.Sys`
eliminating one of the dependencies on `Core`.
## 111.25.00
- Fixed `Clock.run_at_intervals` to make the initial callback at an
interval multiple.
Previously, if `start` was in the past, `f` would run immediately
rather than waiting for an interval of the form `start + i * span`.
Now it always waits for an interval, even the first time it runs.
## 111.17.00
- Renamed `Monitor.errors` to `Monitor.detach_and_get_error_stream`
and `Monitor.error` as `Monitor.get_next_error`.
The use of `detach` in the name is intended to make clear that
errors do not propagate to the parent.
Added several other non-stream =Monitor= functions to capture common
use cases of `Monitor.detach_and_get_error_stream`:
```ocaml
detach_and_get_next_error
detach_and_iter_errors
detach
```
## 111.11.00
- Added `Clock.run_at_intervals`, which runs a job at regular
intervals.
## 111.08.00
- Changed low-level error messages to use `Sexp.to_string_hum` rather
than `to_string_mach`.
## 111.06.00
- Improved the performance of `Pipe.filter_map` by using batching.
## 110.01.00
- Added `Deferred.Result.map_error`.
## 109.60.00
- Changed the scheduler to clear a job from its queue when it runs the
job, eliminating a performance regression from 109.57.
Clearing avoids spurious promotion of what would otherwise be dead
data associated with already-executed jobs.
## 109.58.00
- Renamed the `Async_core` library as `Async_kernel`, to parallel
`Core_kernel`.
Someday `Async_core` will depend only on `Core_kernel`, but not yet.
- Added a thread-safe queue of "external actions" that is checked
after each job.
- Fixed a race condition in `Clock.Event.abort`.
Here is the race condition:
* `Clock.Event.at` adds an alarm, its value is a job (let's call it
job1) with this run function:
```ocaml
let fire () =
t := Happened;
Ivar.fill ready `Happened;
```
* later a job (let's call it job2) aborting the clock event is
queued in the async scheduler
* in the same cycle, the `Timing_wheel.advance_clock` fires the
alarm and job1 scheduled
* at this point:
+ job1 and job2 are still pending
+ the alarm was removed so it is invalid
+ the clock event is still in the state `Waiting`
* job2 is executed before job1: the clock event is still in the
`Waiting` state, so the abort tries to remove the alarm from the
timing wheel: CRASH
The bugfix is for `Clock.Event.abort` to check if the alarm has
already been removed from the timing wheel and if so, don't remove
it again.
- Changed `Monitor.try_with` when run with ``~rest:`Ignore``, the
default, so that the created monitor is detached from the monitor
tree.
The detached monitor has no parent, rather than being a child of the
current monitor. This will eliminate recently observed space leaks
in `Sequencer_table` and `Throttle`, like:
```ocaml
let leak () =
let seq = Throttle.Sequencer.create () in
let rec loop n =
Throttle.enqueue seq (fun () ->
loop (n + 1);
Deferred.unit
)
|> don't_wait_for
in
loop 0
```
- Changed Async's scheduler to pool jobs rather than heap allocate
them, decreasing the cost of a job by 30-40%.
Changed the main scheduler queue of jobs to be an `Obj_array.t` that
is essentially a specialized `Flat_queue` (the specialization was
necessary for speed).
Also, cleaned up the scheduler run-job loop.
With these changes, the cost of a simple job decreases significantly
(30-40%), across a range of live data sizes. Here are the
nanoseconds-per-job numbers for a microbenchmark with the old and
new approaches.
| num live jobs | old ns/job | new ns/job |
|---------------|------------|------------|
| 1 | 74 | 53 |
| 2 | 75 | 47 |
| 4 | 76 | 41 |
| 8 | 63 | 39 |
| 16 | 62 | 38 |
| 32 | 61 | 37 |
| 64 | 61 | 37 |
| 128 | 60 | 37 |
| 256 | 60 | 38 |
| 512 | 60 | 38 |
| 1024 | 60 | 39 |
| 2048 | 61 | 40 |
| 4096 | 67 | 41 |
| 8192 | 65 | 45 |
| 16384 | 75 | 56 |
| 32768 | 115 | 67 |
| 65536 | 171 | 108 |
| 131072 | 255 | 158 |
| 262144 | 191 | 130 |
| 524288 | 216 | 139 |
| 1048576 | 238 | 152 |
See async/bench/nanos\_per\_job.ml for the benchmark.
- Removed `debug_space_leaks` from Async's internals. It hadn't been
used in years.
## 109.52.00
- Changed `Pipe.iter_without_pushback` to never call `f` after
`Pipe.close_read` has been called.
The new behavior is like `Pipe.iter`.
- Changed the implementation of `Pipe.fold_gen` and `Pipe.transfer_gen`
to be analogous to `Pipe.iter_without_pushback`, and in particular to
process as many elements as possible before calling `values_available`.
## 109.47.00
- Fix a bug introduced in `Monitor.error` in 109.28, in which the error wasn't seen unless someone is listening to the monitor.
## 109.45.00
- Removed internal `Backpatched` module.
Async used to use this module, but it doesn't anymore.
## 109.44.00
- Documented that `Throttle.enqueue t f` never runs `f` immediately,
and added unit tests.
## 109.42.00
- In `ASYNC_CONFIG`, replaced `alarm_precision` and `timing_wheel_level_bits` with `timing_wheel_config`.
This parallels the new `Timing_wheel.Config` module.
## 109.35.00
- Added new configuration options for Async, `max_inter_cycle_timeout`
and `max_num_jobs_per_priority_per_cycle`.
```ocaml
val max_inter_cycle_timeout : Time.Span.t
val max_num_jobs_per_priority_per_cycle : int
```
These are configurable as usual via `ASYNC_CONFIG`.
- Added an `ASYNC_CONFIG` option to debug the `Shutdown` module.
- Added `find` and `find_map` to `Deferred.Monad_sequence`.
## 109.34.00
- Added a function to `Pipe` that merges a list of sorted pipes
`val Pipe.merge : 'a Reader.t list -> cmp:('a -> 'a -> int) -> 'a Reader.t`
- Improved the performance of `Ivar.squash` by removing the allocation of the list of ivars.
Instead, `squash` does one loop to find the end of the chain and a
second loop to set all the indirections.
- Changed `Scheduler.run_cycles_until_no_jobs_remain` to raise an exception if there is an unhandled exception when it finishes.
## 109.32.00
- Improved the batching of `Pipe.fold` and other `Pipe` functions that handle batches.
Previously, such functions used a loop with `Pipe.read`. This
didn't batch as well as it might. If values were put in the pipe
after the `read` becomes determined but before the values are
handled, then they wouldn't be handled until the next batch. Now,
batching functions use `values_available` and then pull elements out
of the pipe synchronously after waking up. This makes the batch as
large as possible.
## 109.30.00
- Added function `Throttle.kill`.
`Throttle.kill` aborts all jobs that have been enqueued but not
started, and immediately aborts all jobs subsequently enqueued.
Split out `Throttle` debugging and unit-testing code into their own
modules.
- Changed the semantics of `Throttle.enqueue` on a dead throttle so that
the exception is sent to the monitor rather than raised synchronously.
This gives more uniform treatment to the race between enqueueing a
job and an already running job raising. Now the enqueued job is
always aborted, whether enqueued before or after the raise.
- Added an ASYNC_CONFIG option to print debug messages when `Monitor.send_exn` is called.
This is useful when one is debugging an application in which an
exception is being unexpectedly swallowed.
- Allow one to dynamically configure the behavior of =Monitor.try_with=.
This is to allow experimentation with different handling of
asynchronous exceptions after `Monitor.try_with` has become
determined.
## 109.28.00
- Eliminated a messy dependency cycle in `async_core`, so that
`Monitor.t` no longer contains a `Tail.t`.
`async_core` was messy because of cycle between the following types:
```
Execution_context
--> Scheduler
--> Ivar
--> Deferred
--> Tail
--> Monitor
```
This messiness caused the need for the `Raw` signature, for the
various `Scheduler_dependent` functors, for making various types
polymorphic in `execution_context`, and then instantiating the
polymorphism later.
The cause of the problem was that `Monitor` contained a `Tail`. We
eliminated that, so that there is no longer a cycle, and defined
things in order:
```
Monitor
Execution_context
Job
Scheduler
Ivar
Deferred
Tail
Stream
```
Replaced the `errors` tail from the monitor type:
```ocaml
errors : (exn, 'execution_context) Raw_tail.t;
```
with a list of handlers:
```ocaml
mutable error_handlers : (exn -> unit) list;
```
Cleaned up all the messiness caused by the cycle -- eliminated the
`Raw` signature, the `Scheduler_dependent` functors, and the
unnecessary polymorphism.
Cleaned up the long standing annoyance with `Async.Stream`, in which
we couldn't expose the `next` sum type and people had to use
annoying `Stream.of_raw` calls. `Stream.of_raw` is now gone.
## 109.27.00
- Fixed `Monitor.catch_stream` to prevent missing a synchronous
exception.
## 109.24.00
- Reworked the `Throttle` module.
Made both `Throttle.t` and `Throttle.Sequencer.t` instances of the
same type, using a phantom type to distinguish them. Removed all
`Throttle.Sequencer` functions -- one can now use the `Throttle`
functions directly.
Added new functions:
```ocaml
(*** [max_concurrent_jobs t] returns the maximum number of jobs that [t] will run
concurrently. *)
val max_concurrent_jobs : (_, _) t_ -> int
(*** [num_jobs_running t] returns the number of jobs that [t] is currently running. It
is guaranteed that if [num_jobs_running t < max_concurrent_jobs t] then
[num_jobs_waiting_to_start t = 0]. That is, the throttle always uses its maximum
concurrency if possible. *)
val num_jobs_running : (_, _) t_ -> int
(*** [num_jobs_waiting_to_start t] returns the number of jobs that have been [enqueue]d but
have not yet started. *)
val num_jobs_waiting_to_start : (_ , _) t_ -> int
(*** [capacity_available t] becomes determined the next time that [t] has fewer than
[max_concurrent_jobs t] running, and hence an [enqueue]d job would start
immediately. *)
val capacity_available : (_, _) t_ -> unit Deferred.t
```
Replaced the `Pipe` used inside a `Throttle` with a `Queue`, and
simplified the implementation. This fixed a bug in
`num_jobs_waiting_to_start`, which could have missed a job that was
not in the pipe but had not started.
## 109.20.00
- Added the ability for a `Throttle` to have resources that are exclusively available to running jobs.
## 109.13.00
- Fixed `Pipe.iter`'s handling of a closed pipe.
Fixed the handling by `Pipe.iter` and related foldy functions that
handle one element at a time, which behaved surprisingly with a pipe
whose read end has been closed. These functions had worked by
reading a queue as a batch and then applying the user function to
each queue element. But if the pipe's read end is closed during the
processing of one queue element, no subsequent element should be
processed. Prior to this fix, the `iter` didn't notice the pipe was
closed for read until it went to read the next batch.
- Renamed `Pipe.read_one` as `Pipe.read_one`', and added
`Pipe.read_one` that reads a single element.
## 109.11.00
- Extended `Deferred.Or_error` to parallel almost all of the
`Core.Or_error` interface.
- Improved the performance of `Clock.at`, and added a more efficient
version, `Clock.run_at`.
Reworked the async heap of clock alarms to use async jobs as alarms.
Reworked `Clock.at` to use this and to not use abortable events,
which is a performance improvement.
Added a more efficient version of `Clock.at`, for the common
situation when one doesn't need a deferred.
```ocaml
(*** [run_at time ~f] is a more efficient version of [at time >>> f]. *)
val run_at : Time.t -> f:(unit -> unit) -> unit
```
## 109.09.00
- Fixed bug in `Async.Throttle`, in which jobs weren't started in order.
## 113.33.00
- Add an option `~close_stdout_and_stderr` to `Async_parallel_deprecated.Std.Parallel.init`
to close the `stdout` & `stderr` fds.
This is needed when using `Async_parallel_deprecated` in a daemonized processes, such as
the in-development jenga server.
Without this option, Calling ` Process.run ~prog:"jenga" ~args:`"server";"start"` ` from
build-manager is problematic because the resulting deferred never becomes determined.
## 113.24.00
- Switched to ppx.
## 112.35.00
- Renamed `Async_parallel` as `Async_parallel_deprecated`; one should
use `Rpc_parallel` instead.
## 112.17.00
- Modernize the code
## 111.25.00
- improve error handling
## 109.41.00
Rename library from Parallel to Async_parallel
## 113.33.00
- Cleans up the implementation-side interface for aborting `Pipe_rpc`s.
Summary
The `aborted` `Deferred.t` that got passed to `Pipe_rpc` implementations is
gone. The situations where it would have been determined now close the reading
end of the user-supplied pipe instead.
Details
Previously, when an RPC dispatcher decided to abort a query, the RPC
implementation would get its `aborted` `Deferred.t` filled in, but would remain
free to write some final elements to the pipe.
This is a little bit more flexible than the new interface, but it's also
problematic in that the implementer could easily just not pay attention to
`aborted`. (They're not obligated to pay attention to when the pipe is closed,
either, but at least they can't keep writing to it.) We don't think the extra
flexibility was used at all.
In the future, we may also simplify the client side to remove the `abort`
function on the dispatch side (at least when not using `dispatch_iter`). For the
time being it remains, but closing the received pipe is the preferred way of
aborting the query.
There are a couple of known ways this might have changed behavior from before.
Both of these appear not to cause problems in the jane repo.
- In the past, an implementation could write to a pipe as long as the client
didn't disconnect, even if it closed its pipe. Now writes will raise after
a client closes its pipe (or calls `abort`), since the implementor's pipe will
also be closed in this case. Doing this was already unsafe, though, since the
pipe *was* closed if the RPC connection was closed.
- `aborted` was only determined if a client aborted the query or the connection
was closed. The new alternative, `Pipe.closed` called on the returned pipe,
will also be determined if the implementation closes the pipe itself. This is
unlikely to cause serious issues but could potentially cause some confusing
logging.
- Blocking RPC implementations (i.e., ones made with `Rpc.implement'`) now capture
the backtrace when they raise. This is consistent with what happens in the
deferred implementation case, since in that case the implementation is run
inside a `Monitor.try_with`, which captures backtraces as well.
Here's an example of what a new error looks like:
((rpc_error
(Uncaught_exn
((location "server-side blocking rpc computation")
(exn
(Invalid_argument
"Float.iround_up_exn: argument (100000000000000000000.000000) is too large"))
(backtrace
"Raised at file \"pervasives.ml\", line 31, characters 25-45\
\nCalled from file \"result.ml\", line 43, characters 17-22\
\nCalled from file \"monad.ml\", line 17, characters 20-28\
\n"))))
(connection_description ("Client connected via TCP" (localhost 3333)))
(rpc_tag foo) (rpc_version 1))
- Actually deprecated `deprecated_dispatch_multi` functions in
`Versioned_rpc`.
## 113.24.00
- When `Transfer.Writer.send*` raises, send an error to the client.
- Added `Pipe_rpc` in `Versioned_rpc.Both_convert`.
- Switched to ppx.
- Expose the lower-level registration hook in `Versioned_rpc`.
- Allow custom handling of missed async\_rpc heartbeats.
- Client-side State\_rpc `dispatch` function does not behave well when the reader side
of the pipe is closed.
It should gracefully abort the rpc instead of raising exceptions, or whatever it currently does.
- Add `Rpc.Expert.implement` and `Rpc.Expert.implement'` with a similar
interface as `One_way.Expert.implement` but for 2-way rpcs.
Exceptions raised by an expert implementations are handled as follow:
- if the query has already been answered, stop the server (as for one-way expert)
- if not, send a `Rpc_error.Uncaught_exn` (as for 2-way rpc)
- Adds `Rpc.Pipe_rpc.dispatch_iter`, plus a bunch of additional types to support
it. The main reason for this is to reduce space usage: `Pipe_rpc.dispatch`
followed by `Pipe.iter_without_pushback` consumes ~105 words in the steady state
(i.e., when no messages are coming in) while `dispatch_iter` consumes ~15. I'm
sure `dispatch` can be improved a lot, but a pipe by itself is 46 words, so it
can't possibly become as small as `dispatch_iter`.
Both cases can be made smaller by making `Connection.response_handler` a GADT
instead of a closure. I plan to do this later.
One annoying property of the interface is that the only way to cancel
a subscription is to use `Pipe_rpc.abort`, which has a terrible interface.
The logical way to improve the interface is to return a record of
a `Pipe_rpc.t`, a `Connection.t`, and a `Query_id.t`, which allocates an
additional few words. I'd kind of like to do this but it seems counter to the
goal of reducing space usage.
- Adds `Rpc.Pipe_rpc.implement_direct`, which uses a "direct stream writer" to
write results to the other side, rather than using a `Pipe.Writer.t`. This
consumes much less memory, ~15 words per open query as opposed to ~225 for
a regular `Pipe_rpc` implementation.
A large part of the diff in this feature is the addition of a module
`Implementation_types`, which just contains copies of type definitions from
`Implementation` and `Implementations`. This is necessary to handle some cyclic
type definitions (both of these modules now depend on types defined in the other
module).
This is the implementation-side dual of `Pipe_rpc.dispatch_iter`.
- Change `Command_rpc.Command` to use `Versioned_rpc.Callee_converts` instead of
`Versioned_rpc.Both_convert` so that commands can be constructed without client-side
conversions. Clients remain free to use conversions or not, as appropriate.
Removed `val rpcs` from `Callee_converts` interfaces because nothing appears to use it,
and `Both_convert` does not provide it. Now `Both_convert.S` can be supplied to satisfy
`Callee_converts.S`.
- Annotate errors returned by the async-rpc library with the name of the RPC for
which the error was returned (if it's an rpc-level error) and a description of
the remote side of the connection (the ip:host if connected via a network
socket).
- Bring back `val rpcs` in versioned\_rpc modules.
## 113.00.00
- Fixed race in `Rpc` that caused double connection cleanup.
Two errors, `Connection_closed` and a Writer error,
`(Uncaught_exn(monitor.ml.Error_((exn(\"writer error\"....))))))`,
occurring at the same time will cleanup the connection twice and call
response_handler of open_queries twice with two different errors.
(((pid 31291) (thread_id 0))
((human_readable 2015-05-25T10:47:18+0100)
(int63_ns_since_epoch 1432547238929886105))
"unhandled exception in Async scheduler"
("unhandled exception"
((monitor.ml.Error_
((exn
("Ivar.fill of full ivar" (Full _)
lib/async_kernel/src/ivar0.ml:329:14))
(backtrace
("Raised at file \"error.ml\", line 7, characters 21-29"
"Called from file \"rpc.ml\", line 101, characters 8-31"
"Called from file \"connection.ml\", line 251, characters 8-172"
"Called from file \"core_hashtbl.ml\", line 244, characters 36-48"
"Called from file \"connection.ml\", line 248, characters 2-278"
"Called from file \"async_stream.ml\", line 49, characters 53-56"
"Called from file \"async_stream.ml\", line 21, characters 34-39"
"Called from file \"job_queue.ml\", line 124, characters 4-7" ""))
(monitor
(((name main) (here ()) (id 1) (has_seen_error true)
(is_detached false) (kill_index 0))))))
((pid 31291) (thread_id 0)))))
- Fixed bugs in `Rpc` in which a TCP connection's reader was closed before its
writer.
- In `Versioned_rpc`, eliminated an unnecessary Async cycle when placing RPC
messages.
- Added `Rpc.Pipe_rpc.close_reason` and `Rpc.State_rpc.close_reason`, which
give the reason why a pipe returned by an RPC was closed.
These functions take the IDs that are returned along with the pipes by
the dispatch functions, so the interface of `dispatch` did not need to
change.
- Made `Rpc.Expert.dispatch` expose that the connection was closed, just like
`One_way.Expert.dispatch`.
- Expose the name of the `Versioned_rpc.Menu` RPC.
## 112.35.00
- Moved `Async_extra.Rpc` to its own library, `Async_kernel_rpc`, and
abstracted its transport layer.
`Async_kernel_rpc` depends only on `Async_kernel`. This allows
`Async_rpc` to be used in javascript or to try transports tuned for
different use cases. `Versioned_rpc` was moved to
`Async_rpc_kernel` as well.
- Added `Rpc.One_way` module, for RPCs that do not expect any response
or acknowledgment.
- Sped up `Rpc.Connection`.
We have been able to send 6_000_000 (contentless) one-way messages
per second under some idealized circumstances.
- In `Rpc`, added an optional `heartbeat_config` argument to configure
the heartbeat interval and timeout.
- In `Rpc`, added some information to `Connection_closed` exceptions.
- In `Rpc.Implementations.create`'s `on_unknown_rpc` argument, added
a `connection_state` argument to the `` `Call`` variant.
When using `Rpc.Connection.serve`, one can put client addresses in
the `connection_state`, so this makes it possible to identify who
sent the unknown RPC instead of just saying what the RPC's name and
version are.
- Added `Rpc.One_way.Expert`, which has an `implement` function that
gives direct access to the internal buffer instead of using a
bin-prot reader.
- Made `Rpc` not raise an exception if a connection is closed due to
heartbeating.
- Reworked `Async_rpc_kernel`'s `Transport` implementation to not
require a `transfer` function similar to `Async_unix.Writer.transfer`.
Changed the RPC connection to flush the pipe when the writer is
closed, which was the only behavior of `Async_unix.Writer.transfer`
that had been relied on.
With this change, if someone closes the underlying writer by hand
the pipes won't be flushed, which should be expected anyway.
- Fixed an issue where "normal" `Pipe_rpc` errors caused the connection
to shutdown.
Such errors include querying an unknown RPC or getting an exception
raised by the RPC implementation shutdown. Now such errors behave
like `Rpc` errors, i.e. they are completely ignored besides being
put in the return value of `Pipe_rpc.dispatch`.
Errors that occur later in `Pipe_rpc` still cause the connection to
close, since these should only occur if there is a bug somewhere.
- In `Rpc`, connection-closing errors no longer raise top-level
exceptions.
One can now call `close_reason : t -> Info.t Deferred.t` to get the
reason the connection was closed.
- Added `One_way` rpcs to `Versioned_rpc`.
- Fixed `Rpc` to not write if the transport is closed.
The fix doesn't check that the writer is closed, but instead ensure
that we don't try to write when we shouldn't. This means that it
will still fail if the user close the transport by hand, which they
shouldn't do.
This change requires transport implementations to fail after they
have been closed. This is different from the semantics of
`Async_unix.Writer`, but the latter is non-intuitive and makes it
hard to check the correctness of the code. Moreover it is only
required for `Async_unix.Writer.with_flushed_at_close` which we
don't use.
## 113.24.00
Initial release.
## 113.33.00
- Allow an smtp\_client to connect to a local unix socket
- Better logging
## 113.24.00
- Switched to PPX.
- Follow Core & Async evolution.
## 113.00.00
- Improve the async\_smtp client interface so that it is suitable as a
replacement for Core\_extended.Std.Sendmail.
## 112.17.00
Moved from janestreet-alpha
## 113.33.00
- Make sure to close the `Pipe.Writer.t` that goes back to the application, otherwise the
application will never get an `Eof if the connection is closed.
## 113.24.00
- Switched to ppx.
## 113.00.00
- Added `Ssl.Connection.close`.
## 112.35.00
- Fix github issue #4 (some comments swapped).
## 112.24.00
- By default OpenSSL ignores the result of certificate validation, so we need to
tell it not to.
- Expose session details such as checked certificates and negotiated version.
Add session resumption.
## 112.17.00
- moved ffi_bindings and ffi_stubgen in separate libraries
## 111.21.00
- Upgraded to use new ctypes and its new stub generation methods.
## 111.08.00
- Improved the propagation of SSL errors to the caller.
## 111.06.00
Initial release
## 113.33.00
- expose a function to get the number of jobs that async has run since Scheduler.go
- In `Log` change `sexp` to be immediate rather than lazy.
This changes the behavior the `sexp` function. I've gone through the entire
tree rewriting `sexp` to `create_s`, attempting to follow these guidelines:
- If the logging is clearly intended to always happen (error logging,
transaction log logging, etc.) I translated the call unguarded.
- If the logging was already guarded with an if statetment I translated
the call unguarded.
- Otherwise, I added a call to `Log.would_log` as a guarding if. This duplicates
the behavior of `sexp`, which would avoid the sexp conversion if the log
message was never going to be logged.
- `Writer.with_file_atomic` checks if destination file exists and then
stats it to get existing permissions. File can go away before the call
to stat, which would make the `with_file_atomic` to error out, which
seems harsh. I think it is better to continue on in this case.
Besides, `Async.file_exists` is essentially just another stat, so we might as
well just do the stat without checking whether file exists or not.
- Moved various `let%test`'s in `Async_unix` library into their own
module. I'd like the `let%test`'s to be in files that depend on
`Std`, so that they can pick up a top-level side effect that `Std`
does, specifically the assignment of `Monitor.try_with_log_exn`. The
child feature of this feature makes the change to do that assignment.
- Changed the `Async_unix` library's assignment of
`Monitor.try_with_log_exn` to be a top-level side effect that happens
if `Async_unix.Std` is used. This fixes a bug in which
`Thread_safe.block_on_async` (and other bits of `Async_unix`) failed to
to do the assignment. The assignment was part of `Scheduler.go`,
which isn't called by `Thread_safe.block_on_async`. This in turn
cause programs that use `Thread_safe.block_on_async` and do not use
`Scheduler.go`, like inline tests, to raise if they needed to report
an exception raised to `Monitor.try_with` that already returned.
- Deprecate the (blocking) `Sexp.save_*` functions in `Async_unix.Std`.
Please do not switch from `Sexp.save*` to `Writer.save_sexp*` in this
feature -- this feature is just for the deprecation. You can do the
switch in a subfeature or later feature.
A note aboute `Core_extended.Sexp`
----------------------------------
This feature causes surprising behavior in `Core_extended.Sexp`, where
opening `Async.Std` undoes any previous open of `Core_extended.Std`:
open Core.Std
open Core_extended.Std
type t = int Sexp.Comprehension.t `@@deriving sexp`
open Async.Std
type u = int Sexp.Comprehension.t `@@deriving sexp`
The type `t` is fine but `u` fails to compile because at that point
the module Sexp has no submodule Comprehension.
But we already have the same problem with module `Unix` if you open
`Async.Std` after `Core_extended.Std`, so I left the `Sexp` module as is.
- Added `Async.Unix.Stats.compare`.
- Changed Async's logging of exceptions raised to a `Monitor.try_with`
that already returned to use `Log.Global.sexp` rather than
`Log.global.error`. For logs that use single-line sexps, that makes
them much nicer.
- Added to `Async.Scheduler` `Time_ns` analogs of `cycle_start` and
`cycle_times`:
val cycle_start_ns : unit -> Time_ns.t
val cycle_times_ns : unit -> Time_ns.Span.t Stream.t
- I'm tired of having to write `>>| ok_exn` after most calls to Process, let's just make
Process provide these functions directly.
Also you can't write `>>| ok_exn` nicely anyway when using the let%bind and friends.
- Added a test demonstrating that `Async.Process.create` returns `Ok`
when `exec` fails. And updated the `create`'s documentation.
## 113.24.00
- In the periodic check for a Writer buffer have too old data,
eliminated allocation and generally improved performance.
This eliminated a large source of allocation in a simple TCP pingpong
benchmark `bench/pingpong`.
- Removed allocation in the Async scheduler's code that detects the
thread-pool being stuck. This involved switching it to use `Time_ns`
rather than `Time`.
This eliminates a relatively large source of allocation in a simple
TCP-pingpong benchmark `bench/pingpong`.
- Switched to ppx.
- Improved the Async scheduler's to allocate a `handle_fired` function
once, rather than every time it calls `advance_clock`.
- Added `Fd_by_descr.find_exn`, to avoid the option allocated by
`Fd_by_descr.find`. Used it to reduce allocation in the Async
scheduler.
- Improved `Reader.load_sexp*` functions to behave better when loading
from a non files, e.g. a pipe. Previously, it produced an empty error
message because it mistakenly attempted to read the sexp a second time
in order to determine the error position. Now it produces a good
error message, but without the (impossible to obtain) error position.
- In `Async_unix.Syscall`, added a zero-allocation syscall interface,
removing sources of allocation as observed when running a simple TCP
pingpong benchmark (found in `bench/pingpong`).
- Added
val time_spent_waiting_for_io : unit -> Time_ns.Span.t
to `Scheduler` which returns the amount of time that the Async scheduler has
spent in calls to `epoll_wait` (or `select`) since the start of the program.
- Changed `In_thread.Helper_thread.create` from:
val create : ?priority:Priority.t -> ?name:string -> unit -> t Or_error.t
to:
val create : ?priority:Priority.t -> ?name:string -> unit -> t Deferred.t
Kept around the prior function, renamed as `create_now`.
Switching `create` to return a deferred allows it to, when there are
no available threads, wait until one becomes available. This, in
turn, avoids rare nondeterminstic failures in programs that make heavy
use of the thread pool and create a helper thread, when the creation
happens at just the wrong time, when no thread is available.
Split out `Thread_safe_ivar` from the internals of `Thread_pool`, so
that it can be used in other tests, and in particular in a new
unified test added by this feature.
- Make `Unix_syscalls.Stats` bin-io-able.
- Fixed a bug in `Thread_safe.block_on_async*`, in which the execution
context wasn't properly restored before returning.
- Add a function in `Process` that expects empty output, mirroring `Shell.run`.
- Added `Reader.read_one_iobuf_at_a_time`, which is like
`read_one_chunk_at_a_time`, except that the user-supplied
`handle_chunk` function receives its data in an `Iobuf.t`, and uses
the `Iobuf` position to communicate how much data was consumed.
This facilitates using reader in scenarios (such as with protogen)
where `Iobuf`s are expected (and presently allocated around the
bigstring at each call) and the calculation of consumed bytes from the
`Iobuf` is duplicated in few places.
- `Log.message` used to always logs the message, even if its log level was too low.
This has been fixed.
- Add writer functions to schedule an iobuf to be written out.
- Add `Unix.Inet_addr.Stable`.
- Alter `Async.Std.Socket.Address.Inet.Blocking_sexp` to expose the
polymorphic variant functions, so that you can include it in a
separate polymorphic variant type.
Also, expose `Async.Std.Socket.Address.Inet.__t_of_sexp__` to give a
deprecation message, instead of a message about the function not
existing.
- Fixed a bug in Async's `In_thread.Helper_thread`, which wasn't
finalizing helper threads, due to a bug in `Thread_pool`, which wasn't
finalizing helper threads. The fix was to move the finalization out
of `Thread_pool`, where we don't care about it, to
`In_thread.Helper_thread`, where we do.
Added `Scheduler.max_num_threads : unit -> int`.
- Make `Epoll_file_descr_watcher` trigger callbacks for error conditions such as closed pipes.
Testing
-------
Three new unit tests, all validating appropriate behavior in the case that a Unix pipe is
opened, then the read end is closed after reading only part of the data sent by the write
end.
1. A test in writer.ml verifying that `Writer.consumer_left` is triggered. Before the fix
to `Epoll_file_descr_watcher`, `Writer.consumer_left` would never become determined in
this case.
2. A test in fd.ml verifying that `Fd.ready_to` is triggered for the writing fd. Before
the fix to `Epoll_file_descr_watcher`, `Fd.ready_to` would never become determined in
this case.
3. A test in linux_ext.ml verifying that `Epoll.wait_timeout_after` is triggered. This
test shows that epoll reports the ERR flag for the file descriptor in this case, and
therefore that `Epoll_file_descr_watcher` needs to pay attention to the ERR flag.
- Added to `Writer.write_sexp` an optional `?terminate_with` argument,
that specifies how to terminate the string representation of the sexp.
This also makes it clear that the default behavior,
`~terminate_with:Space_if_needed`, might append a space to the sexp
you are outputting if its representation is not enclosed in either ()
or "" . `Sexp.output_hum` an `Sexp.output_mach` do not have this
behavior, so porting non-async code to async could introduce
unexpected differences in the output.
- Add an Async wrapper for `Core.Std.Unix.getifaddrs`.
## 113.00.00
- Made Async dump core when it reports a "bug in async scheduler".
There is no change for toplevel unhandled user exceptions, for which Async
does not dump core.
- Added `Dump_core_on_job_delay.dump_core` function, which exposes the
core-dumping functionality in the C stubs for `Dump_core_on_job_delay`.
- Made `Dump_core_on_job_delay.How_to_dump` an ordinary variant and moved it
into `Async_kernel.Config`.
- Changed `Thread_safe_pipe` functions that write to the pipe to take an
additional argument, an `If_closed.t`, that says how to behave if the pipe is
closed.
The previous behavior is achieved with `~if_closed:Raise`. One can also
now use `~if_closed:Return` to they return a variant reporting whether the
pipe was closed, rather than raising.
Returning a variant allows callers to distinguish the pipe-closed case from
other errors. This change also allows us to do a a single acquisition of
the Async lock, with the pipe-closed check synchronously immediately
preceding the operation, avoiding a race.
- Added `Fd.with_file_descr_deferred_exn`.
- Improved the performance of `Clock.every`, and in particular reduced its
allocation.
It now allocates much less, especially with `~continue_on_error:false`.
Handled `Clock.every`'s `~stop` argument directly using timing-wheel
alarms, rather than using `Deferred.choose`.
Slightly changed the behavior of
Clock.every' f ~continue_on_error:false
in the corner case where `f` raises but its result also becomes
determined. Prior to this feature, iteration would stop. After this
feature, iteration will continue, because `~continue_on_error:false`
just looks at the deferred resulting from `f`. This doesn't affect:
Clock.every f ~continue_on_error:false
because if `f` raises, then there is no resulting deferred.
Benchmark:
+----------------------------------------------------+----------+------------+----------+----------+------------+
| Name | Time/Run | mWd/Run | mjWd/Run | Prom/Run | Percentage |
+----------------------------------------------------+----------+------------+----------+----------+------------+
| [clock_ns.ml:Clock.every] ~continue-on-error:false | 54.21us | 91.03w | 0.36w | 0.36w | 22.06% |
| [clock_ns.ml:Clock.every] ~continue_on_error:true | 245.80us | 93_208.27w | 7.31w | 7.31w | 100.00% |
+----------------------------------------------------+----------+------------+----------+----------+------------+
- Added to `Clock.Event.t` type parameters so that one can record a value in
the event when it happens or is aborted, and read that value via
`Event.status`.
type ('a, 'h) t
val status
: ('a, 'h) t -> [ `Aborted of 'a
| `Happened of 'h
| `Scheduled_at of Time.t
]
val run_at : Time.t -> ('z -> 'h) -> 'z -> (_, 'h) t
val abort : ('a, 'h) t -> 'a -> [ `Ok
| `Previously_aborted of 'a
| `Previously_happened of 'h
]
- Fixed a (never observed) race in the Async scheduler's closing of file
descriptors.
Previously, when the number of active system calls on an `Fd.t`
reached zero, the scheduler would call a closure that would
immediately schedule the `close()` system call in a thread. It was
possible (albeit very unlikely) that that `close()` would run before
the scheduler got a chance to update the epoll set, violating the
invariant that `close` is only ever called on fds not in the epoll
set.
Now, the scheduler enqueues an ordinary Async job to do the `close`,
and thus the `close` cannot happen until the next cycle, after the
scheduler has updated the epoll set.
- Changed `Reader` to treat `read` returning `EPIPE` as end-of-file rather than
fail, to deal with OpenOnload.
This fixes an issue where reading from a TCP connection can return an
`EPIPE` if the tcp connection is immediately closed. This happens
when the application is running with onload and when the tcp
connection is closed immediately after creation.
- Reduced allocation of the Async scheduler's `File_descr_watcher`, by using
callbacks to handle ready file descriptors.
- Fixed `In_thread.Helper_thread.create`'s error message if there are no
available threads in the thread pool.
The error message is now constructed eagerly. It had been constructed
lazily, so by the time it was rendered, the state might have changed,
possibly making threads available. This leads to a
nonsensical-looking error message that claims that there are no
available threads, immediately followed by a list of available
threads.
- Moved `Log` from `Async_extra` to `Async_unix`, so that the scheduler can
refer to it.
- When `Writer.with_file_atomic` is unable to clean up its temp file, raise
synchronously rather than asynchronously.
This eliminates complaints about an exception being thrown after a deferred
has been computed.
- Added `Log.rotate` to force log rotation.
val rotate : t -> unit Deferred.t.
- Fixed `Log` rotation to correctly reset the size and number of lines.
## 112.35.00
- Made `Unix.File_kind.t` be `Comparable`, so it can be used in
`<:test_result< >>`.
- Reduced allocation in Async's scheduler in the common path.
The allocation was in
`Raw_scheduler.be_the_scheduler.compute_timeout`, which was
(statistically, based on perf) the largest single allocator in one
of our applications. Now, it way down the list.
Note that the application is not a typical Async app in that it does
not sit in epoll very much, due to the way we do low-latency I/O.
This change will benefit everyone, but only a tiny bit.
- Added `Writer.write_bin_prot_no_size_header`.
This is needed for Async RPC as it writes a different size on
its own.
- Fixed a bug in `Writer.transfer`, which didn't close the pipe when the
consumer leaves.
Simplified the implementation of `Writer.transfer`:
- replaced the big loop by a simple iteration function on the pipe
that just stop without filling its ivar when it sees the iteration
should stop for other reason that `` `Eof `` on the pipe: writer
closed, consumer left or stop requested by the user.
- replaced the various `choose` by a single one and deal with the
closing reason only at this point.
- Added `Writer.close_started`, symmetric to Writer.close_finished.
## 112.24.00
- Made `Process.env` type equal `Core.Std.Unix.env` type, effectively adding the
``Replace_raw` variant.
- Renamed `Process.wait` as `collect_output_and_wait`, and added a `wait`
function that is a thin wrapper around `waitpid`.
Also renamed:
wait_stdout --> collect_stdout_and_wait
wait_stdout_lines --> collect_stdout_lines_and_wait
- Added `Unix.getgrouplist`, a wrapper around the eponymous function in core
- Change the Async scheduler to run external actions immediately upon
dequeueing them, rather than first enqueueing them in the normal job queue.
Also, made external actions be jobs rather than closures.
- Changed `Unix.Inet_addr.of_string_or_gethostbyname` to not use a sequencer.
We had used a sequencer to workaround bugs in winbind, which we don't
use anymore.
Reported on github: https://github.com/janestreet/async_unix/issues/4
## 112.17.00
- Moved `Scheduler.yield` to `Async_kernel`.
- Added `Reader.load_annotated_sexp*` functions.
These are like the existing `Reader.load_sexp*` functions, except
they return annotated sexps rather than sexps. Having annotated
sexps is useful so that one can report error positions to the user
when processing values built by the `t_of_sexp_` functions /after/
they return. I.e. when there aren't syntax errors in the sexps, but
rather semantic errors detected later.
- Removed noise and redundancy from `Reader.load_sexp` error messages.
- Added `Writer.save_sexps`, analogous to `Reader.load_sexps`.
- Made `Writer` errors raised by the background flush job include the
entire `Writer.t`, rather than just the `Fd.t`.
- Added to `Writer.transfer` an optional argument to limit the number
of values read at once from the pipe.
The old behavior is to have no limit and remains the default.
- Added to `Writer` some missing checks for functions that should
ensure the input writer isn't closed.
- Changed `Scheduler.run_cycles_until_no_jobs_remain` to pause so that
alarms scheduled to fire in the past actually fire.
This is necessary because of the timing-wheel, which doesn't
guarantee to fire an event until alarm-precision after it was
scheduled.
Without this change, some tests unexpectedly fail, due to jobs not
running that should have.
## 112.06.00
- Added `Writer.behave_nicely_in_pipeline`, which makes a program behave
nicely when used in a shell pipeline where the consumer goes away.
- Modernized code style.
- Removed spurious overrides in `Signal`: `set` and `signal`.
These overrides are no longer necessary because the functions moved
from `Core.Signal` to `Core.Signal.Expert`.
- Moved `async_extra`'s `Udp.bind_to_interface_exn` to `Unix`.
## 112.01.00
- Changed `Writer.transfer write pipe` to close `pipe` when the
`writer`, is closed.
Previously, `Writer.transfer` did not close the pipe when the
underlying writer is closed. This was strange because:
1. Callers would have to consistently check for the writer being
closed and close the `Pipe.Reader`t= themselves
2. The analogous function `Pipe.transfer` closes the reader on
similar circumstances.
The absence of the close was noticed as a bug in `Rpc`, which
assumed that `Writer.transfer` did the close.
- Fixed a bug in `Scheduler.yield` that caused it to pause for 50ms if
there is no other pending work and no I/O.
- Exposed type equivalence between `Unix.Passwd.t` and
`Core.Std.Unix.Passwd.t`.
- Changed `Writer.write_bin_prot` to use the new
`Bigstring.write_bin_prot`.
## 111.28.00
- Added `Shutdown.set_default_force`, which allows one to change the
default `force` value used by `shutdown`.
This is useful for applications that call `shutdown` indirectly.
val set_default_force : (unit -> unit Deferred.t) -> unit
## 111.25.00
- Added `Unix.Addr_info` and `Name_info`, which wrap `getaddrinfo` and
`getnameinfo`.
- Improved the scheduler's error message when the thread pool is
stuck.
## 111.21.00
- Added `Process.wait_stdout` and `wait_stdout_lines`, which are like
`run` and `run_lines`, but take a `Process.t`.
## 111.13.00
- Added `Scheduler.yield_every`, which returns a function that calls
`Scheduler.yield` every n-th call.
This is useful in circumstances where you don't have strict control
over where a deferred is examined, as in a `Deferred.List.iter`.
## 111.11.00
- Added `val Scheduler.yield : unit -> unit Deferred.t`, which becomes
determined after the current cycle finishes.
- Improved the behavior of the scheduler's thread pool when
`Thread.create` raises.
With this improvement, when the thread pool is unable to create a
thread, it presses on with the threads it has rather than raise.
Subsequent attempts to add work to the thread pool will cause the
pool to attempt to create the thread, as long as enough time has
passed since the most recent thread-creation failure.
Before this change, the thread pool wouldn't handle a
`Thread.create` exception, and the exception would get raised to
whatever code happened to be calling the `Thread_pool` function that
tried to create a thread, e.g. `Thread_pool.add_work`. This caused
`In_thread.run` to unexpectedly raise, and in turn
`In_thread.syscall` to unexpectedly raise, leading to:
```
"Fd.syscall_in_thread bug -- should be impossible"
```
Also, changed `should be impossible` text to `please report`, since
there may be other lurking rare exceptions that `In_thread.syscall`
can raise, and we'd like to hear about them.
We rely on thread-pool-stuck detection to report problems where the
inability to create threads causes the inability of the thread pool
to make progress. A tweak was needed to make that work -- now the
thread-pool-stuck warning is based on whether the thread pool has
unstarted work, rather than on whether the thread pool has an
"available thread". The latter would no longer work, since it is
now possible for the thread pool to have unstarted work and to
appear to have an available thread, i.e. `num_threads <
max_num_threads`.
## 111.08.00
- Added `Sys.when_file_changes : string -> Time.t Pipe.Reader.t`.
- Added `Time.now ()` to some error messages.
## 111.06.00
- In the `Busy_pollers.t` record, made the `kernel_scheduler` field be
`sexp_opaque`.
Did this so that one doesn't get two copies of the kernel scheduler
in sexps of the scheduler, which already has its own
`kernel_scheduler` field.
## 111.03.00
- Improved `Socket.accept` to abort and return `` `Socket_closed`` when
the file descriptor underlying the socket is closed.
- Added to `Socket.bind` a `?reuseaddr:bool` argument, preserving the
default as `true`.
- Added `Fd.close_started`, which becomes determined when `close` is
called on an `Fd.t`.
## 109.60.00
- Fixed a bug in detection of the thread pool being stuck that could
overstate the amount of time the pool was stuck.
It had been incorrectly reporting the duration of the thread pool
being stuck if the pool had no work in it and then got enough jobs
to be stuck. In that situation, the duration included the time span
before the pool got stuck. If the pool had been idle long enough,
this could even spuriously abort the program.
## 109.58.00
- Improved fairness of the async scheduler with respect to external
threads, including I/O done in external threads.
The change is to add a thread-safe queue of "external actions" that
is checked after each job.
Previously, when a job given to `In_thread.run` finished,
`In_thread.run` would take the async lock, fill the result ivar and
run a cycle. The problem is that in some situations, due to poor OS
scheduling, the helper thread never had a chance to grab the lock.
Now, `In_thread.run` tries to take the lock:
- if it can it does as before
- if it can't it enqueues a thunk in the external actions queue and
wakes up the scheduler
With this change, the helper thread doing an `In_thread.run` will
always quickly finish once the work is done, and the async scheduler
will fill in the result ivar as soon as the current job finishes.
- Fixed `Epoll_file_descr_watcher.invariant` to deal with the timerfd,
which has the edge-triggered flag set.
- Added `Writer.write_gen`, a generic functor for blitting directly to
a writer's buffer.
## 109.55.00
- Fixed `Scheduler.is_running` to not initialize the scheduler.
- Added `Writer.make_write`, which is a general function for blitting
directly to a writer's buffer.
- Added `Writer.transfer'`, which is like `Writer.transfer` but allows
async actions in the callback.
This was requested in pull request #1.
- Added `Writer.write_iobuf`, which blits the contents of an iobuf
directly to a writer's buffer.
## 109.53.00
- Changed the scheduler to calibrate `Time_stamp_counter` every
second.
- Improved error messages in the scheduler when `epoll` functions
raise.
- Made `Scheduler.reset_in_forked_process` close the `epoll` file
descriptor.
## 109.52.00
- Fixed a bug in `Unix.mkstemp`, which had a race because it used
`Fd.create` in a thread.
This bug affected `Writer.with_file_atomic`, `save`, `save_lines`,
and `save_sexp`, and could cause corruption of the async scheduler
data structures.
- Changed async to never do `set_nonblock` on `std{in,out,err}`, which
allows `Core` I/O to use the standard file descriptors
simultaneously with async.
Before this change, the Core I/O libraries could (and sometimes did)
fail due to `Sys_blocked_io`.
- Changed `Pipe.iter_without_pushback` to never call `f` after
`Pipe.close_read` has been called.
The new behavior is like `Pipe.iter`.
Changed the implementation of `Pipe.fold_gen` and `Pipe.transfer_gen`
to be analogous to `Pipe.iter_without_pushback`, and in particular to
process as many elements as possible before calling `values_available`.
- Added `?expand_macros:bool` argument to `Reader.load_sexp*`
functions, to support the new `Sexplib` macros.
- Added an optional argument to `Process.run` to accept nonzero exits
as successful runs.
## 109.47.00
- Added `Socket.Address.Inet.to_host_and_port`.
- Changed `Fd_by_descr` so that it actually calls `Bounded_int_table.invariant`.
## 109.45.00
- Added `Fd.every_ready_to` `Fd.interruptible_every_ready_to` which
register a callback to be called every time the fd becomes ready.
These can significantly reduce allocation.
- Renamed `Fd.ready_to_interruptible` as `Fd.interruptible_ready_to`.
- Changed `Fd.ready_fold` to use `Fd.interruptible_ready_to`, to
improve its performance.
## 109.42.00
- Added `Reader.drain`.
```ocaml
val drain : t -> unit Deferred.t
```
- Added `Writer.with_close`.
```ocaml
val with_close : t -> f:(unit -> 'a Deferred.t) -> 'a Deferred.t
```
## 109.41.00
- Changed `Reader` to treat more `errno` responses to a `read()` system call as `EOF` rather than raise.
The following are now treated as `EOF`.
```
ENETDOWN
ENETRESET
ENETUNREACH
ETIMEDOUT
```
- Improved the error message that async prints when the thread pool is stuck, including the time of the error.
## 109.40.00
- Added value `Socket.Type.unix_dgram`, which represents a UNIX domain
datagram socket.
- Added UDP socket functionality: `Socket.Opt.mcast_{loop,ttl}` and
`Socket.mcast_{join,leave}`.
- Improved `Fd.ready_fold` to accept `?stop:(unit Deferred.t)` rather
than `?stop:('a -> bool)`.
## 109.39.00
- Added "thread-local" storage, `Scheduler.{find,with}_local`, for
`LWT` emulation.
```ocaml
(** [with_local key value ~f] runs [f] right now with the binding [key ` value]. All
calls to [find_local key] in [f] and computations started from [f] will return
[value]. *)
val with_local : 'a Univ_map.Key.t -> 'a option -> f:(unit -> 'b) -> 'b
(** [find_local key] returns the value associated to [key] in the current execution
context. *)
val find_local : 'a Univ_map.Key.t -> 'a option
```
## 109.38.00
- Added `Reader.of_pipe` and `Writer.of_pipe`, for converting from `string Pipe.t`'s.
These can be used to add arbitrary transformations (e.g. encryption, compression)
to code that expects plain file- or socket-based readers and writers.
## 109.36.00
- Added `Process.run_lines`, which runs a process and returns stdout as a list of strings.
## 109.35.00
- Made some configuration possible via additional optional arguments
to `go_main`.
```ocaml
?max_num_open_file_descrs:int
?max_num_threads:int
```
- Made some aspects of the async scheduler configurable via functions
in `Scheduler`.
```ocaml
val set_check_invariants : bool -> unit
val set_detect_invalid_access_from_thread : bool -> unit
val set_max_inter_cycle_timeout : Time.Span.t -> unit
val set_record_backtraces : bool -> unit
```
- Added a dynamic check in `Pipe` that a consumer is used with the
correct pipe.
Specifically, check that a consumer supplied to a read operation on
a `Pipe.Reader.t` was previously created by `add_consumer` with that
same reader.
- Renamed `Pipe.fold` as `fold_without_pushback` and added `Pipe.fold`
with an analogous type to `Pipe.iter`.
- Fixed a bug in `Pipe.merge`, which did not always close the
resulting pipe when the merge was finished.
This had prevented medusa regtests from working correctly.
- In `Writer`, changed the default `buffer_age_limit` for files to
``Unlimited`.
THis was done for the same reason that we treat files specially in
flush on close -- slowness will likely be resolved eventually with a
file, unlike with a socket.
## 109.34.00
- Changed the scheduler to detect when the thread pool is stuck, i.e. when all threads are blocked and haven't made progress.
Added default handlers for when the thread pool is stuck, and the
ability for the user to configure their own handlers.
- Changed low-level I/O to not use nonblocking I/O for char devices.
This fixes a problem due to `epoll` not working with `/dev/null`. For
example:
```ocaml
let () =
Reader.read_line (Lazy.force Reader.stdin)
>>> fun _ ->
shutdown 0
;;
let () = never_returns (Scheduler.go ())
```
had failed when run like:
```
+ ./z.exe </dev/null
("bug in async scheduler"
((Unix.Unix_error "Operation not permitted" epoll_ctl "")
...
```
- Made `Unix.openfile` use `fstat` to determine the kind of file for a file descriptor rather than assuming it's a regular file.
- Improved the `ASYNC_CONFIG` option `detect_invalid_access_from_thread` by having it include a backtrace in the error message.
## 109.31.00
- Renamed `Reader.read_one_chuck_at_a_time_until_eof` as `Reader.read_one_chunk_at_a_time`,
and added a new case to the `handle_chunk` callback.
The name change is to reflect that one can stop early, before EOF.
The new `handle_chunk` case allows one to specify the number of bytes
that were read in the `Stop` case.
Also, changed `read_one_chunk_at_a_time` to use `do_read` instead of
just locking the file without unlocking it. This allows subsequent
read operations to read from the file.
## 109.30.00
- Changed aync's scheduler to use `epoll` rather than `select` by default.
This is based on a dynamic test to see whether `timerfd_create` works.
- Added support for "busy polling".
This runs a thread that busy loops running user-supplied polling
functions. The busy-loop thread is distinct from async's scheduler
thread, but it acquires the async lock so that the user-supplied
function can do ordinary async operations, e.g. fill an ivar.
Busy polling is useful for a situation like a shared-memory ringbuffer
being used for IPC. One can poll the ringbuffer with a busy poller,
and then when data is detected, fill some ivar that causes async code
to handle the data.
- Added `Async.Fd.clear_nonblocking`.
This clears the nonblocking bit on the file descriptor underlying the
fd, and causes async to treat the fd as though it doesn't support
nonblocking I/O.
This is useful for applications that want to share a file descriptor
between async and non-async code and want to avoid `Sys_blocked_io`
being seen by the non-async code.
## 109.27.00
- Fixed a performance problem in the scheduler due to repeated calls
of `Timing_wheel.min_elt`.
`Timing_wheel.min_elt` is an important part of async, since the
scheduler calls it once per cycle to know when to timeout for
`epoll` or `select`. This causes a problem if `min_elt` is slow and
called repeatedly, which happens in an application where the next
clock event is a second out, and yet there are lots of cycles per
second.
`Timing_wheel.min_elt` now caches the minimum element, which
eliminates the problem.
- Fixed async's clock to work on 32-bit machines.
With the change to `Timing_wheel` in 109.22, async no longer worked
on 32-bit machines, due to the clock overflowing. This is because
it is initialized to `Time.epoch`, and can only handle 6 days.
The fix now in place is to start the clock at `Time.now ()` rather
than `Time.epoch`.
- Added many functions to `Async.Sys` so that it looks more like
`Core.Sys`.
- Changed `Reader.read_one_chunk_at_a_time_until_eof` to not destroy
the reader buffer.
Destroying the buffer failed if user code held on to the buffer.
## 109.24.00
- Changed `Reader.close` so that it frees the reader buffer using `Bigstring.unsafe_destroy`.
This is an improvement over the previous situation, in which the
buffer wasn't freed until its finalizer fired.
- Fixed a bug in `Reader.read_bin_prot`.
It was missing a try-with that could cause it to raise without
cleaning up the reader.
## 109.21.00
- Added `Unix.remove`.
## 109.20.00
- Set `close-on-exec` for both ends of the pipe used to wake up the scheduler.
## 109.19.00
- Reworked a number of `Reader` functions to improve performance by
avoiding deferreds.
This is a followup to the `Reader` improvements in 109.14, and
eliminates some last vestiges of performance degradation that had
been introduced in 109.04.
- Added function `Reader.lseek : t -> int64 -> mode:[< `Set | `End] ->
int64 Deferred.t`.
`lseek t offset ~mode` clears `t`'s buffer and calls `Unix.lseek` on
`t`'s file descriptor.
- Added function `Writer.bytes_received : t -> int`.
- Added function `Unix.mkfifo : ?perm:file_perm -> string -> unit
Deferred.t`, which was mistakenly missing.
This is a simple wrapper around `Core.Unix.mkfifo`.
## 109.18.00
- added `Async.Unix.fcntl_{get,set}fl`.
Made `Reader` and `Writer` detect if they are passed a file
descriptor with incorrect permissions (`O_WRONLY` for `Reader`,
`O_RDONLY` for `Writer`).
## 109.15.00
- The `epoll`-based scheduler now supports sub-millisecond timeouts,
using `Linux_ext.Timerfd`.
Async still uses the `select`-based scheduler by default. We plan
to switch the default to `epoll` in a few weeks, once we have done
more testing.
- Eliminated module `Work_group`, which was for limiting the number of
threads used by jobs.
This was a little-used module that significantly complicated the
implementation of the Async thread pool.
One should consider using a `Throttle` instead.
Along the way, fixed a bug in Async helper threads in which the
finalizer could fire too early, causing an unhandled exception. The
fix involves relaxing the requirements on when
`Thread_pool.finished_with_helper_thread` functions can be called,
allowing it to be called while the helper thread still has work, but
so long as no future work will be added.
## 109.14.00
- Fixed major performance degradation (since 109.04) in `Reader.read*`
functions.
- Added function `Rpc.Implementation.map_inv`.
```ocaml
val map_inv : 'a t -> f:('b -> 'a) -> 'b t
```
- Add functions `Reader.file_lines` and `Writer.save_lines`.
These deal with files as lists of their lines.
```ocaml
val Reader.file_lines : string -> string list Deferred.t
val Writer.save_lines : string -> string list -> unit Deferred.t
```
- Added a `?wakeup_scheduler:bool` optional argument to functions in
the `Thread_safe` module.
The default is `true`, which continues the behavior that has been in place since 109.09.
However, once can use `~wakeup_scheduler:false` to reduce CPU use, in return for increased
latency (because the scheduler won't run a cycle immediately).
## 109.13.00
- Added `Writer.write_line`, which is `Writer.write` plus a newline at
the end.
- Added `?close_on_exec:bool` argument to `{Reader,Writer}.open_file`
and `Async.Unix.open_file`.
Made the default `close_on_exec:true` for `Reader` and `Writer`.
- Added a `compare` function to `Socket.Address.Inet`.
## 109.12.00
- Fixed a bug in `Fd.syscall_in_thread`.
The bug could cause:
```ocaml
Fd.syscall_in_thread bug -- should be impossible
```
The bug was that `syscall_in_thread` raised rather than returning `Error`.
- Changed `Tcp.connect` and `Tcp.with_connect` to also supply the connected socket.
Supplying the connected socket makes it easy to call `Socket`
functions, e.g. to find out information about the connection with
`Socket.get{peer,sock}name`. This also gives information about the IP
address *after* DNS, which wouldn't otherwise be available.
One could reconstruct the socket by extracting the fd from the
writer, and then calling `Socket.of_fd` with the correct
`Socket.Type`. But that is both error prone and not discoverable.
- Added `Writer.schedule_bigsubstring`, which parallels
`Writer.schedule_bigstring`.
## 109.11.00
- Added a check to fail if `Scheduler.go` is called more than once.
## 109.10.00
- Added `Shutdown.do_not_finish_shutdown_before`. This allows one to
add `unit Deferred.t`'s that will delay the `shutdown` from
finishing. The implementation is more efficient than using
`at_shutdown`.
## 109.09.00
- Added module `Thread_safe_pipe`, for streaming data outside async into async.
This a more efficient and feature-ful way to send a sequence of values
from outside async into async than `Thread_safe.pipe`, which has been
eliminated.
- Changed functions in `Thread_safe` to always wake up the scheduler.
Changed `Thread_safe.run_in_async{,_exn}` to not run a cycle, and
instead rely on the scheduler to run the cycle.
## 109.08.00
- Added module `Async.Process`
This is a new module for creating and dealing with child processes.
- For `Writer.save`, replaced the `temp_prefix` argument with `temp_file`.
- Added `Ivar.invariant` function.
- Added value `Scheduler.fold_fields`
This lets one fold over the fields in the scheduler, eliminates an
annoying place in catalog browser that reached into the internals of
async to compute the sizes of the scheduler fields
## 109.07.00
- Changed the async scheduler so that if there are no upcoming events,
it times out in 50ms rather than waiting forever.
- Improved `Reader.read_one_chunk_at_a_time_until_eof`:
- the callback need not consume everything
- add `\`Eof_with_unconsumed_data` as a possible result
- grow internal buffer of the reader when needed
- Added `Shutdown.exit`, removed `Shutdown.shutdown_and_raise`.
- Added `Scheduler.force_current_cycle_to_end`.
## 113.33.00
- This release improves the slow path of bignum of string. The previous
version used a split on `'_'` followed by a concat, which allocated a
bunch of intermediate strings.
## 113.24.00
- Switched to PPX.
- The library used polymorphic compare, rather than `Zarith.Q`'s compare, in a
few locations. Fixed this.
- Previously stable types in Bignum were defined with unstable types in the scope.
Fixd this.
- Update to zarith-1.4
- `Bignum.of_string` needs to handle different formats for its input. The
previous version of the code was trying to parse the common format
(floats), and in case of failure, was attempting to use a different
format (based on the error). This resulted in the string being parsed
twice in some cases.
This version is a complete rewriting of `of_string` to do the parsing
in one step. The new code for `to_string` encode an automaton and
remembers the positions of the various elements of the string
(depending on the format).
This feature uses a function which has been upstreamed in the new
version of ZArith (1.4) which is a variant of the `Zarith.of_string`
function to work with substrings. This variant alone is responsible
for a big part of the performance improvement.
Summary of benchmarks
-----------------
The new version of the code performs better than the original one in
all cases. The performance improvement are variable depending on the
micro benchmark. See below.
Follow ups
----------
We also tried to implement the lexing engine using OCamllex.
This makes for a much more concise description, but the
performance are significantly lower. OCamllex produces code which
allocates some table and some state, which is avoided in the hand
written code. Also, it will allocate the sub strings matched.
Benchmark results
-----------------
New version (patch for ZArith + of\_substring, reimplementation of of\_string)
┌─────────────────────────────────────────────────────────────────────┬──────────────┬───────────┬──────────┬──────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├─────────────────────────────────────────────────────────────────────┼──────────────┼───────────┼──────────┼──────────┼────────────┤
│ `bigint\_bench.ml` random │ 48\_381.13ns │ 7\_166.00w │ 1.24w │ 1.24w │ 45.12% │
│ `bigint\_bench.ml:vs. Big\_int` plus\_self │ 293.96ns │ 72.00w │ │ │ 0.27% │
│ `bigint\_bench.ml:vs. Big\_int` plus\_other │ 807.62ns │ 124.00w │ │ │ 0.75% │
│ `bigint\_bench.ml:vs. Big\_int` mult\_self │ 353.98ns │ 91.00w │ │ │ 0.33% │
│ `bigint\_bench.ml:vs. Big\_int` mult\_other │ 783.78ns │ 128.00w │ │ │ 0.73% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` of\_string (decimal) │ 14\_415.44ns │ 475.00w │ │ │ 13.44% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` of\_string (scientific) │ 61\_363.80ns │ 3\_929.00w │ │ │ 57.23% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` of\_string (fraction) │ 24\_957.02ns │ 303.00w │ │ │ 23.28% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` to\_string (decimal) │ 15\_867.52ns │ 1\_523.00w │ │ │ 14.80% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` to\_string (scientific) │ 33\_345.31ns │ 4\_206.00w │ │ │ 31.10% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` to\_string (fraction) │ 31\_770.26ns │ 3\_779.00w │ │ │ 29.63% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` of\_sexp (decimal) │ 9\_726.82ns │ 380.00w │ │ │ 9.07% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` of\_sexp (scientific) │ 28\_141.40ns │ 2\_059.00w │ │ │ 26.25% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` of\_sexp (fraction) │ 70\_436.16ns │ 5\_541.00w │ │ │ 65.69% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` to\_sexp (decimal) │ 27\_000.73ns │ 1\_994.00w │ │ │ 25.18% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` to\_sexp (scientific) │ 66\_057.63ns │ 6\_217.00w │ │ │ 61.61% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` to\_sexp (fraction) │ 107\_219.89ns │ 8\_097.00w │ │ │ 100.00% │
│ `bignum\_bench.ml:Bignum binprot` roundtrip compact │ 5\_997.81ns │ 581.00w │ │ │ 5.59% │
│ `bignum\_bench.ml:Bignum binprot` roundtrip classic │ 18\_522.20ns │ 779.00w │ │ │ 17.27% │
│ `bignum\_bench.ml:round` round\_decimal:0 │ 8\_479.49ns │ 463.00w │ │ │ 7.91% │
│ `bignum\_bench.ml:round` round\_decimal:3 │ 24\_621.71ns │ 2\_115.00w │ │ │ 22.96% │
│ `bignum\_bench.ml:round` round\_decimal:6 │ 26\_896.35ns │ 2\_437.00w │ │ │ 25.09% │
│ `bignum\_bench.ml:round` round\_decimal:9 │ 29\_428.19ns │ 2\_730.00w │ │ │ 27.45% │
│ `bignum\_bench.ml:round` round │ 8\_452.31ns │ 459.00w │ │ │ 7.88% │
└─────────────────────────────────────────────────────────────────────┴──────────────┴───────────┴──────────┴──────────┴────────────┘
Original version
┌─────────────────────────────────────────────────────────────────────┬──────────────┬───────────┬──────────┬──────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├─────────────────────────────────────────────────────────────────────┼──────────────┼───────────┼──────────┼──────────┼────────────┤
│ `bigint\_bench.ml` random │ 51\_218.04ns │ 7\_166.00w │ 1.25w │ 1.25w │ 43.26% │
│ `bigint\_bench.ml:vs. Big\_int` plus\_self │ 336.84ns │ 72.00w │ │ │ 0.28% │
│ `bigint\_bench.ml:vs. Big\_int` plus\_other │ 837.73ns │ 124.00w │ │ │ 0.71% │
│ `bigint\_bench.ml:vs. Big\_int` mult\_self │ 411.03ns │ 91.00w │ │ │ 0.35% │
│ `bigint\_bench.ml:vs. Big\_int` mult\_other │ 808.03ns │ 128.00w │ │ │ 0.68% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` of\_string (decimal) │ 29\_650.60ns │ 2\_415.00w │ │ │ 25.04% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` of\_string (scientific) │ 92\_495.93ns │ 6\_465.00w │ │ │ 78.12% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` of\_string (fraction) │ 39\_482.77ns │ 2\_060.00w │ │ │ 33.35% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` to\_string (decimal) │ 16\_195.93ns │ 1\_523.00w │ │ │ 13.68% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` to\_string (scientific) │ 34\_227.78ns │ 4\_059.00w │ │ │ 28.91% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` to\_string (fraction) │ 32\_856.17ns │ 3\_779.00w │ │ │ 27.75% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` of\_sexp (decimal) │ 19\_745.71ns │ 2\_149.00w │ │ │ 16.68% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` of\_sexp (scientific) │ 51\_024.99ns │ 3\_853.00w │ │ │ 43.09% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` of\_sexp (fraction) │ 88\_884.15ns │ 7\_819.00w │ │ │ 75.07% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` to\_sexp (decimal) │ 32\_812.27ns │ 2\_498.00w │ │ │ 27.71% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` to\_sexp (scientific) │ 77\_518.77ns │ 6\_369.00w │ │ │ 65.47% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` to\_sexp (fraction) │ 118\_402.78ns │ 8\_907.00w │ │ │ 100.00% │
│ `bignum\_bench.ml:Bignum binprot` roundtrip compact │ 8\_947.02ns │ 371.00w │ │ │ 7.56% │
│ `bignum\_bench.ml:Bignum binprot` roundtrip classic │ 22\_799.74ns │ 1\_039.00w │ │ │ 19.26% │
│ `bignum\_bench.ml:round` round\_decimal:0 │ 8\_176.74ns │ 463.00w │ │ │ 6.91% │
│ `bignum\_bench.ml:round` round\_decimal:3 │ 25\_798.77ns │ 2\_115.00w │ │ │ 21.79% │
│ `bignum\_bench.ml:round` round\_decimal:6 │ 28\_561.23ns │ 2\_437.00w │ │ │ 24.12% │
│ `bignum\_bench.ml:round` round\_decimal:9 │ 30\_861.38ns │ 2\_730.00w │ │ │ 26.06% │
│ `bignum\_bench.ml:round` round │ 8\_237.26ns │ 459.00w │ │ │ 6.96% │
└─────────────────────────────────────────────────────────────────────┴──────────────┴───────────┴──────────┴──────────┴────────────┘
Tentative version using OCamllex
┌─────────────────────────────────────────────────────────────────────┬──────────────┬────────────┬──────────┬──────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├─────────────────────────────────────────────────────────────────────┼──────────────┼────────────┼──────────┼──────────┼────────────┤
│ `bigint\_bench.ml` random │ 48\_164.21ns │ 7\_166.00w │ 1.25w │ 1.25w │ 39.99% │
│ `bigint\_bench.ml:vs. Big\_int` plus\_self │ 285.84ns │ 72.00w │ │ │ 0.24% │
│ `bigint\_bench.ml:vs. Big\_int` plus\_other │ 768.12ns │ 124.00w │ │ │ 0.64% │
│ `bigint\_bench.ml:vs. Big\_int` mult\_self │ 343.14ns │ 91.00w │ │ │ 0.28% │
│ `bigint\_bench.ml:vs. Big\_int` mult\_other │ 780.00ns │ 128.00w │ │ │ 0.65% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` of\_string (decimal) │ 26\_931.12ns │ 3\_108.00w │ │ │ 22.36% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` of\_string (scientific) │ 79\_750.28ns │ 6\_599.00w │ 0.11w │ 0.11w │ 66.21% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` of\_string (fraction) │ 34\_988.94ns │ 4\_300.00w │ │ │ 29.05% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` to\_string (decimal) │ 15\_958.17ns │ 1\_523.00w │ │ │ 13.25% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` to\_string (scientific) │ 32\_495.25ns │ 4\_059.00w │ │ │ 26.98% │
│ `bignum\_bench.ml:Bignum of\_string/to\_string` to\_string (fraction) │ 31\_802.75ns │ 3\_779.00w │ │ │ 26.40% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` of\_sexp (decimal) │ 18\_742.81ns │ 2\_924.00w │ │ │ 15.56% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` of\_sexp (scientific) │ 45\_282.09ns │ 4\_622.00w │ │ │ 37.60% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` of\_sexp (fraction) │ 86\_907.83ns │ 8\_777.00w │ 0.15w │ 0.15w │ 72.16% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` to\_sexp (decimal) │ 35\_727.73ns │ 4\_493.00w │ │ │ 29.66% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` to\_sexp (scientific) │ 82\_247.61ns │ 8\_273.00w │ 0.13w │ 0.13w │ 68.29% │
│ `bignum\_bench.ml:Bignum of\_sexp/to\_sexp` to\_sexp (fraction) │ 120\_445.25ns │ 10\_688.00w │ 0.12w │ 0.12w │ 100.00% │
│ `bignum\_bench.ml:Bignum binprot` roundtrip compact │ 6\_734.49ns │ 371.00w │ │ │ 5.59% │
│ `bignum\_bench.ml:Bignum binprot` roundtrip classic │ 21\_773.79ns │ 1\_890.00w │ │ │ 18.08% │
│ `bignum\_bench.ml:round` round\_decimal:0 │ 8\_306.45ns │ 463.00w │ │ │ 6.90% │
│ `bignum\_bench.ml:round` round\_decimal:3 │ 24\_714.96ns │ 2\_115.00w │ │ │ 20.52% │
│ `bignum\_bench.ml:round` round\_decimal:6 │ 26\_894.27ns │ 2\_437.00w │ │ │ 22.33% │
│ `bignum\_bench.ml:round` round\_decimal:9 │ 29\_343.81ns │ 2\_730.00w │ │ │ 24.36% │
│ `bignum\_bench.ml:round` round │ 8\_296.05ns │ 459.00w │ │ │ 6.89% │
└─────────────────────────────────────────────────────────────────────┴──────────────┴────────────┴──────────┴──────────┴────────────┘
## 113.00.00
- Fixed a bug in the =Zarith= library's `to_float` function.
These fixes first introduce tests from the base distribution, and then
backport a bugfix to the handling of to_float.
## 112.35.00
- Upgraded from Zarith 1.2 to 1.3.
- Removed dependence on `Big_int`.
## 112.24.00
- Fixed exception raised by `Bignum.sexp_of_t` when the denominator is zero.
## 112.17.00
- Added `Bigint.random` function, which produces a uniformly
distributed value.
## 112.06.00
- Added functions to round from `Bignum.t` to `Bigint.t`, and to convert
`Bigint.t` into `Bignum.t`.
## 112.01.00
- Added `Bignum.Bigint` module, with arbitrary-precision integers
based on `Zarith`, which is significantly faster than the
`Num.Big_int` library.
## 111.17.00
- Improved the performance of binprot deserialization by removing the
allocation of an intermediate type.
## 111.13.00
- Eliminated the dependence of `Bignum` on `Re2`, and reduced dependence
from `Core` to `Core_kernel`.
- Extended the rounding interface to bring it in line with int and float
rounding.
- Improved the performance of `Bignum`'s binprot.
`Bignum`'s binprot had been to just binprot the decimal string
representation. This is both slow to do and unnecessarily big in
the majority of cases. Did something better in the majority of
cases and fell back to this representation in the exceptional case.
$ ./inline_benchmarks_runner
Estimated testing time 20s (2 benchmarks x 10s). Change using -quota SECS.
| Name | Time/Run | mWd/Run | Percentage |
|------------------------------------------------------|----------|-----------|------------|
| bignum0.ml:Stable:Bignum binprot roundtrip compact | 7.87us | 490.00w | 32.88% |
| bignum0.ml:Stable:Bignum binprot roundtrip classic | 23.94us | 1_079.00w | 100.00% |
## 113.24.00
- Bin\_prot can be configured to use the primitives to read/write
integers from bigarrays. This was never enabled due to missing tests
that selecting this code path doesn't change the format.
This version add these tests and enable the use of the fast
primitives.
- Add benchmarks for all exposed bin\_prot read/write functions.
These are intended to check performance regressions.
- Remove most use of cpp in bin\_prot.
Replace the pre-processor conditionals by runtime one. This make the
code a little less obfuscated.
- Remove big literals so that the compiler does not complain in 32bit
## 113.00.00
- Switched build to use =config.h= rather than the command-line for
preprocessor variables.
- Switched from `ARCH_SIXTYFOUR` to `JSC_ARCH_SIXTYFOUR`.
- Fixed to support 32-bit integers, which are used in `js_of_ocaml`.
Do not make too many assumptions on integer size.
Integers are 32bit in Javascript.
Do not use the "get_float_offset" hack on 32bit
as it cannot be implemented in javascript.
## 112.35.00
- Sped up `bin_io` of `float array`.
`Bin_prot` already had special fast handling for `float array`'s but
`with bin_io` did not use it except for the special type
`float_array`. Now, there is fast handling for `float array` and
its aliases, for example `price array` when `type price = float`.
- Changed `Size.bin_size_array`, `Write.bin_write_array` and
`Read.bin_read_array` short circuit to the fast path when it detects
that `float array` is handled. Each of these functions receives
a function for handling array elements and short circuits when the
function for handling elements is equal to the function for handling
floats, using physical equality of closures.
- To cause short circuiting for aliases of `float`, changed `bin_io`
so that aliased `bin_io` functions are equal the the `bin_io`
functions of the original type. That is an optimization for itself
regardless whether it's used for `float`. Before this change, every
function generated for aliases were eta-expanded leading to
different closures at runtime for each type.
Short circuiting needs to apply to the handling function rather than
to the value at hand because:
* the value is available only in `size` and `write`, and we need
a way to make `read` work as well.
* even when the value is a float at runtime, the handling of
a specific float alias may have been overridden by a custom one.
Made a slight improvement to `bin_read_float_array`: since the array
is going to be filled with read values, there is no need to fill it
with `0.` after allocation:
let next = pos + size in
check_next buf next;
-| let arr = Array.create len 0. in
+| let arr = Array.make_float len in
unsafe_blit_buf_float_array buf arr ~src_pos:pos ~dst_pos:0 ~len;
pos_ref := next;
The difference in speed when optimal and non optimal way of handling
floats is used:
| Name | Time/Run | mWd/Run | mjWd/Run |
|--------------------------------------------|-------------|-----------|----------|
| [bench.ml:float array] size non optimal | 3_403.80ns | 2_000.00w | |
| [bench.ml:float array] size float_array | 5.55ns | | |
| [bench.ml:float array] size Price.t array | 6.18ns | | |
| [bench.ml:float array] write non optimal | 7_839.89ns | 2_000.00w | |
| [bench.ml:float array] write float_array | 292.42ns | | |
| [bench.ml:float array] write Price.t array | 293.16ns | | |
| [bench.ml:float array] read non optimal | 9_665.06ns | 2_002.00w | 1.00kw |
| [bench.ml:float array] read float_array | 461.01ns | 2.00w | 1.00kw |
| [bench.ml:float array] read Price.t array | 449.43ns | 2.00w | 1.00kw |
There is no observed speed penalty for runtime check for short
circuiting. The following benchmark shows the speed of handling
`int array` without and with the check:
| Name | Time/Run | mWd/Run | mjWd/Run |
|--------------------------------------------|-------------|-----------|----------|
| [bench.ml:float array] int array size | 3_910.64ns | | |
| [bench.ml:float array] int array write | 6_548.40ns | | |
| [bench.ml:float array] int array read | 14_928.11ns | 2.00w | 1.00kw |
| Name | Time/Run | mWd/Run | mjWd/Run |
|--------------------------------------------|-------------|-----------|----------|
| [bench.ml:float array] int array size | 3_906.86ns | | |
| [bench.ml:float array] int array write | 5_874.63ns | | |
| [bench.ml:float array] int array read | 14_225.06ns | 2.00w | 1.00kw |
## 112.24.00
Minor commit: comments.
## 112.17.00
- Added `Bin_prot.Blob`, formerly known as `Core_extended.Wrapped`,
which has efficient handling of size-prefixed bin-io values in cases
where serialization can be bypassed.
## 112.06.00
- Sped up `float` and `float array` operations.
- Removed a use of `Obj.magic` in code generated by `pa_bin_prot` for
polymorphic variants that led to memory unsafety.
Previously, `pa_bin_prot` generated this kind of code for
polymorphic variants:
match Obj.magic (read_int buf pos) with
| `A as x -> x
| `B as x -> x
| `C -> `C (read_float buf pos)
| _ -> fail
and this caused the compiler to assume the result is an immediate
value. To fix this we removed the `as x -> x` and used the computed
integer hash.
## 112.01.00
- In `Write`, improved some OCaml macros to name values and avoid
calling C functions multiple times.
## 111.03.00
- Fixed build on ARM.
## 109.53.00
- Bump version number
## 109.47.00
- Compilation fix for 32-bit systems
## 109.44.00
- Remove "unwrapped" pointers used by `Bin_prot`, with the bug from
109.41 fixed.
Unwrapped pointers cannot coexist with the remove-page-table
optimization.
Removed all the C stubs for reading/writing and used instead either
the new primitives of the next OCaml or standard OCaml code
reading/writing integers byte by byte.
Since we don't have unsafe/safe functions anymore but only safe
ones, removed all the `bin_{read,write}_t_` functions.
Also renamed `bin_read_t__` to `__bin_read_t__` for the same reason
as sexplib: to avoid confusion with the function generated for `t_`
and hide it in the toplevel.
## 109.42.00
- Backed out the changes introduced in 109.41
## 109.41.00
- Remove all uses of "unwrapped" pointers
Unwrapped pointers cannot coexist with the remove-page-table
optimization.
Removed all the C stubs for reading/writing and used instead either
the new primitives of the next OCaml or standard OCaml code
reading/writing integers byte by byte.
Since we don't have unsafe/safe functions anymore but only safe ones,
removed all the `bin_{read,write}_t_` functions.
Also renamed `bin_read_t__` to `__bin_read_t__` for the same reason as
sexplib: to avoid confusion with the function generated for `t_` and
hide it in the toplevel.
## 109.10.00
- Improved error messages in presence of GADTs.
## 2012-07-15
- Rewrote README in Markdown and improved documentation.
- Eliminated new warnings available in OCaml 4.00.
## 2012-02-28
- Improved portability by better supporting the C99-standard and
non-GNU compilers.
## 2011-11-10
- Improved portability to older glibc distributions.
## 2011-09-15
- Fixes to improve package dependency resolution.
## 2011-07-04
- Internal updates to sync with Jane Street.
## 2011-06-29
- Fixed bigstring layout bug, which should only affect value
comparisons with OCaml 3.12.1 or later.
- Made 64-bit detection more reliable on Mac OS X.
## 2010-03-20
- Fixed linking of toplevels to require bigarrays.
- Improved compilation on Mac OS X.
## 2010-03-17
- Fixed small name capture bug.
## 2009-12-21
- Updated contact information.
## 2009-09-19
- Added missing type cases for supporting variant types.
- Fixed handling of variance annotations.
## 2009-07-27
- Fixed build problem with gcc 4.4 due to stricter checking
for empty macro arguments.
Thanks to Nobuyuki Tomiza <nobuyuki.tomizawa@gmail.com>
for the patch!
## 2009-07-20
- Merged tiny Jane Street improvements.
## 2009-07-03
- Made byte swapping more portable.
## 2009-07-02
- Added support for network byte order integers.
## 2009-04-22
- Added macro support for all kinds of vectors (vec,
float32_vec, float64_vec) and matrices (mat, float32_mat,
float64_mat), and for bigstrings (bigstring).
## 2009-04-16
- Fixed a bug leading to an exception when writing
extremely large values (>4 GB buffer size). Does not cause
data corruption.
Releases of biniou
==================
!!! = some incompatibilities
opt = optimizations
+ui = additions in the user interface
-ui = restrictions in the user interface
bug = bug or security fix
doc = major changes in the documentation
pkg = changes in the structure of the package or in the installation procedure
2012-03-19 1.0.2: [+ui] support for flushing output to abstract OO channels
2012-01-03 1.0.1: [+ui] new experimental array streaming utility
[+ui] compiling with -g, allowing stack trace recording
[doc] fixed description of the format for string encoding
2010-12-04 1.0.0: [+ui] added system of references for sharing values
[!!!] new variant `Shared
[!!!] new fields in input and output buffers
[+ui] bdump: option -h to specify alternate dictionary
[pkg] standalone reference for the biniou format
2010-09-13 0.9.1: [bug] fixed Bi_inbuf.from_channel
[pkg] added INSTALL file
2010-08-04 0.9.0: first release
-------------------------
(2016-01-30) version 4.0:
* Drop the '_t' suffix from type names.
-------------------------
(2016-01-26) version 3.1:
* Use PPX-based syntax extensions (Sexplib and Lwt)
instead of the old Camlp4-based ones.
-------------------------
(2015-08-17) version 3.0:
* New simpler API for Bookaml_isbn.
* Renaming modules and exceptions: 'ISBN' -> 'isbn'.
-------------------------
(2015-02-26) version 2.1:
* Port to OCamlnet 4.
-------------------------
(2015-02-02) version 2.0:
* Update to latest version of Amazon Product Advertising API.
* Add Brazil locale and fix Japan endpoint.
* Make author and publisher fields optional.
-------------------------
(2014-08-06) version 1.0:
* First public release.
v0.1.2 2016-06-17 Cambridge (UK)
--------------------------------
- Fix `OS.File` creation mode from `0o622` to `0o644` (#55).
- Fix semantics of dotfile handling in `OS.Path.{matches,query}`.
`~dotfile:false` (default) used to not return any path that had a
dot segment, even if this was a constant segment without pattern
variables. This is no longer the case, `~dotfile:false` now only
prevents segments starting with a pattern variable to match against
dot files, i.e. it controls the exploration of the file system made
by the function. Thanks to David Kaloper for the discussion.
v0.1.1 2016-06-08 Cambridge (UK)
--------------------------------
- Fix `OS.Cmd` combinators on Linux. Thanks to Andreas Hauptmann for
the help (#51)
- Fix `OS.Dir.delete` on Linux and Windows. Thanks to Andreas Hauptmann
for the help (#50).
- Fix `OS.Cmd.exists` on Linux. Thanks to Andreas Hauptmann and
Petter Urkedal for the help (#52).
v0.1.0 2016-05-23 La Forclaz (VS)
---------------------------------
First release.
---------------------------
(2016-01-27) version 5.0:
* Port to the new wrapping signature introduced with Tyxml 3.6.
---------------------------
(2016-01-26) version 4.0:
* Split Camlhighlight_write_html5.write function
into write_inline/write_block variants.
* Drop the '_t' suffix from types names.
* Use ppx_type_conv instead of Camlp4.
* Minor updates and tweaks to build system.
-------------------------
(2014-08-18) version 3.0:
* Depend on Tyxml instead of Eliom.
* Use Batteries instead of ExtLib.
* Build system generated by OASIS.
-------------------------
(2010-03-03) version 2.0:
* Now using GNU Source-highlight as backend.
* Added Camlhighlight_parser.set_tabspaces to API.
* Improved error handling.
-------------------------
(2010-01-29) version 1.0:
* First public release.
Camlp5 Version 6.15:
--------------------
* [23 Jan 16] Fixed bug on optional types (ocaml 4.02).
* [15 Jan 16] Fixed bug on methods wrongly interpreted as vals.
* [05 Jan 16] Updated for ocaml trunk 4.03.0
(git version be2a7e2f830911b331657b8cfa462f5219dfec5b)
* [26 Nov 15] Updated again for ocaml trunk current version (4.03.0).
* [23 Sep 15] Updated for ocaml trunk current version (4.03.0).
Camlp5 Version 6.14:
--------------------
* [30 Jul 15] Updated for ocaml version 4.02.3 and 4.02.4
Camlp5 Version 6.13:
--------------------
* [20 Apr 15] Accept 'fun/try' case list like the change of 22nd Apr 13
on 'match' in revised syntax, allowing them to write "|" .. "end" or
"[" .. "]", both being accepted.
* [12 May 15] Updated for ocaml version 4.02.2
Camlp5 Version 6.12:
--------------------
* [17 Apr 14] Updated for ocaml trunk (4.02.0) svn rev 14621.
* [14 Apr 14] Updated for ocaml version 4.01.1.
* [19 Dec 13] Dummy line numbers are now 1 instead of -1 to prevent
errors that sometimes happen later at assembling phase.
* [19 Dec 13] Fixed problem in top/Makefile when OCLIBDIR contains spaces.
* [06 Sep 13] Added flag Grammar.utf8_print to print grammars entries
(with Grammar.Entry.print) displaying strings in utf-8 (default: True).
Usefull e.g. for Coq in command 'Print Grammar constr' when using utf8.
* [27 Aug 13] Fixed bug in normal syntax: "let f { x } = ...", "{ x }"
and "let open ..." were refused.
Camlp5 Version 6.11:
--------------------
* [22 Jul 13] Updated for ocaml version 4.01.0
* [02 Jul 13] Added 'MLast.loc_of_with_constr'.
* [02 Jul 13] Fixed bug toplevel with revised syntax; "= 'a" was missing
in output in that example:
# module type A = sig module type S = 'a; end;
module type A = sig module type S; end
* [02 Jul 13] Now accept lowercase ident for module types, like ocaml does.
Accepted also in revised syntax.
Camlp5 Version 6.10:
--------------------
* [19 Jun 13] Updated for ocaml version 4.01.0
* [14 Jun 13] (experimental) Now, in revised syntax, a "." followed by
a newline is interpreted as a ";", allowing to end phrases with ".".
Drawback: will syntax error when writing a record/module access in two
lines ending the first one with "." like:
foo.
bar
Camlp5 Version 6.09:
--------------------
* [22 Apr 13] Accept now "match with | | ... end" in revised syntax, with
a required "|" in the first case, as alternative syntax for match.
* [19 Apr 13] Added function 'Pcaml.value greek_ascii_equiv' giving
an ascii equivalent to a greek (utf8) letter representing a type
parameter. E.g. 'a' for 'α', 'b' for 'β', and so on.
* [19 Mar 13] Fixed bug no locations built in some cases of constructors.
* [15 Mar 13] Updated for ocaml version 4.00.2.
* [13 Mar 13] Fixed bug: in toplevel, the highlighting of errors did not
work.
* [13 Mar 13] Added option '-dquot' to specify the default quotation name.
and the ability to use "#option" directive with two parameters. Therefore,
we can use either (e.g.):
-dquot "expr"
in the command line of camlp5 or
#option "-dquot" "expr"
inside a file.
Camlp5 Version 6.08:
--------------------
* [06 Mar 13] Now 'make' displays a message how to compile, instead
of doing 'make out'. Old behaviour of 'make' must be now 'make out'.
* [28 Feb 13] Now accept identifiers starting with a greek letter as
variable names.
* [28 Jan 13] Fixed bug: DEFINE FOO=32 while using pa_macro.cmo did not work
due to a bad order in grammar insertion.
* [08 Oct 12] Fixed bug: parsing greek letters as type variable in
constructor declaration did not work when building Camlp5.
Camlp5 Version 6.07:
--------------------
* [12 Sep 12] Added compatibility with OCaml 4.00.1.
* [06 Jun 12] Fixed bug: open record patterns {a=b;c=d;_} did not work.
Camlp5 Version 6.06:
--------------------
* [01 Jun 12] Added compatibility with OCaml 4.00.0 and (incoming) 4.01.0.
* [18 Mar 12] Fixed bug in pr_o: [(let module M = ... in x); y] was
displayed without parentheses.
* [14 Mar 12] Added compatibility with OCaml 3.12.2.
* [02 Mar 12] Added compatibility with JoCaml 3.12.0 and 3.12.1.
* [02 Mar 12] Completed with all JoCaml statements in ocaml syntax.
Todo: pretty print.
Camlp5 Version 6.05:
--------------------
* [02 Mar 12] Added compatibility with JoCaml trunk.
* [02 Mar 12] Added option -oname in configure to change ocaml
command name. The bytecode compiler, native compiler and bytecode
runtime are respectively <oname>c, <oname>opt and <oname>run.
The default is 'ocaml', implying that the executables are ocamlc,
ocamlopt and ocamlrun. Setting it to 'jocaml', fo example, use
jocamlc, jocamlopt and jocamlrun.
Camlp5 Version 6.04:
--------------------
* [01 Mar 12] Added option -name in configure to change command name
useful to have transitional and strict versions installed with
different names. Default: camlp5.
* [01 Mar 12] The default mode at configuration time is now 'strict'.
Camlp5 Version 6.03:
--------------------
* [09 Jan 12] Updated compatibility with OCaml trunk version (3.13.0).
Camlp5 Version 6.02.3:
----------------------
* [20 Oct 11] Updated compatibility with OCaml current version 3.13.0.
* [20 Sep 11] Added missing syntax "_" in ending patt records (rev: "_ = _").
* [20 Sep 11] Fixed bug pattern -1L was refused in normal syntax.
* [21 May 11] Fixed bug impacting files using q_ast.cmo extension (bad ast).
* [03 May 11] Fixed bug: lexeme errors in revised syntax + utf8.
* [24 Mar 11] Fixed bug: M.(a+b) was refused in normal syntax.
* [16 Mar 11] Fixed bug: incorrect compilation of label patterns of the
form ~a:b (or ~{a = b} in revised syntax) in class declarations.
* [16 Mar 11] Fixed bug: error while printing label patterns ~a:b with
pr_o.cmo (error message "labels not pretty printed (in patt)").
Camlp5 Version 6.02.2:
----------------------
* [15 Mar 11] Fixed bug: bad AST generated for class identifier prefixed
by a module.
* [15 Mar 11] Fixed differences of locations between OCaml and camlp5o (e.g.
in .annot files)
* [17 Feb 11] Pretty module now considers strings as utf8 encoded (impacts
computation of strings lengths).
* [04 Feb 11] Revised syntax: completed syntax multi labels, ~{x=y; z=t}
(equivalent to ~{x=y} ~{z=t}) in patterns (in 6.02.1 was implemented
only in expressions).
* [28 Jan 11] Added installed module 'Reloc': relocations and equalities
over syntax trees.
* [26 Jan 11] Fixed bug in camlp5o.opt: did not accept '$' as token.
* [18 Jan 11] Fixed bug: private flags in type manifest were not correctly
treated.
* [06 Dec 10] Fixed bug in pr_o.cmo: label expressions were not correctly
pretty printed: f ~a gave f a.
Camlp5 Version 6.02.1:
----------------------
* [05 Dec 10] In module Grammar.Entry.print, added extra parameter ppf
to print in other formatter than (the default) stdout.
* [21 Nov 10] Revised syntax: added syntax multi labels, ~{x=y; z=t}
equivalent to ~{x=y} ~{z=t}
* [16 Nov 10] Updated compatibility with OCaml version 3.13.0-gadt.
Camlp5 Version 6.02.0:
----------------------
* [16 Nov 10] Fixed bug in pa_o.ml: !foo.(bar) was interpreted as !(foo.(bar))
instead of (!foo).(bar). Fixed compilation bug in pa_o.ml in transitional
mode.
* [16 Nov 10] Added parsing and printing utf8 greek letters and arrow in
revised syntax.
Camlp5 Version 6.02:
--------------------
* [12 Nov 10] Added compatibility with OCaml GADT version.
* [12 Nov 10] pa_macro: added ability to use ELSIFDEF in match cases (the
ending ELSE part being still optional).
* [08 Nov 10] Fixed bugs 1/ in pa_o: !Foo.bar was interpreted as (!Foo).bar
instead of !(Foo.bar) 2/ in top/camlp5_top.cma: the file ast2pt.cmo was
missing.
Camlp5 Version 6.01:
--------------------
* [03 Nov 10] Added in revised syntax for labels ~{lab x = y} as shortcut
for ~{lab = fun x -> y}.
* [30 Oct 10] Fixed bug in 'configure': option -libdir did not work.
Camlp5 Version 6.00:
--------------------
* [28 Oct 10] Updated compatibility with OCaml trunk version (3.13.0).
* [01 Oct 10] Make compilation with "make -j" (parallel make) work.
* [29 Sep 10] Fixed bug when using constructors named 'True' and 'False'.
* [24 Sep 10] Fixed many bugs of parsing comments (typically about quotes).
* [23 Sep 10] Fixed bug in pretty printing comments containing '"'.
* [22 Sep 10] Fixed bug bad result of unary minus functions.
* [22 Sep 10] Fixed bug in printing parameters of types of 'with constraint'.
* [22 Sep 10] Fixed bug in revised syntax for class_types. Now application.
does not need parenthesis any more (like for other entries of that kind).
* [19 Sep 10] In grammars, added list with separator with optional ending
separator (LIST0 .. SEP OPT_SEP and LIST1 .. SEP OPT_SEP).
* [19 Sep 10] Completed missing statements in particular in objects,
classes, and first class modules.
* [08 Sep 10] Added option '-flag O' of pr_r.cmo and pr_o.cmo which
add location comments in the output.
* [08 Sep 10] Added new chapters in the documentation:
- Directives
- Redefining OCaml syntax
* [08 Sep 10] Fixed option '-flag E' (equilibrate cases) of pr_r.cmo and
pr_o.cmo which did not work.
* [06 Sep 10] Changed revised syntax of 'inherit something [params]'
into 'inherit [params] something' (like in normal syntax).
* [06 Sep 10] Added missing statements:
- 'module type of' as module type,
- '(module ... : ...)' as expression,
- '(val ...)' ('value' in revised syntax) as module expression.
* [02 Sep 10] Added directive "#option" (in files, not in toplevel).
* [02 Sep 10] pa_macro.cmo: phrases inside IFDEF statements now are
implementation or interface items, which means:
- ability to use directives which are, therefore, conditional.
- in revised syntax must end with semicolon (incompatibility with
previous versions of Camlp5 where these semicolons are syntax
errors).
- in revised syntax, ability to put several phrases without having
to use "declare .. end".
* [30 Aug 10] pa_macro.cmo: added ability to use ELSIFDEF and ELSIFNDEF
in expressions, structure items and signature items.
* [27 Aug 10] Fixed bug in pa_macro.cmo A AND B computed B AND B.
* [26 Aug 10] Fixed wrong behaviour: char '"' was printed '\"'.
* [25 Aug 10] Added option -no-opt in configure, not to use .opt versions
of OCaml compilers.
* [20 Aug 10] Added compatibility for OCaml version 3.11.3.
* [18 Aug 10] Added function "get" in library module "Ploc", and a
statement "lprintf" similar to "pprintf" added by the syntax
extension kit "pa_pprintf.cmo".
Camlp5 Version 5.15:
--------------------
* [09 Aug 10] Updated compatibility for OCaml current version 3.12.1.
* [09 Aug 10] Upgraded compatibility for OCaml released version 3.12.0.
* [29 Jul 10] Added ability to write AST quotations with a colon before
the '<' (e.g. "<:expr:< foo >>") which, in pattern position, generates
a binding of the variable "loc" at the top node:
1/ normal usage (still working):
"fun [ <:expr< x >> -> 0 ]"
which is equivalent to:
"fun [ MLast.ExLid _ (Ploc.VaVal "x") -> 0 ]
2/ new usage:
"fun [ <:expr:< x >> -> 0 ]"
which is equivalent to:
"fun [ MLast.ExLid loc (Ploc.VaVal "x") -> 0 ]
* [21 Jun 10] Added compatibility for OCaml trunk version 3.13.0.
* [29 Apr 10] Fixed bug in pr_depend.cmo: a.B.c did not add module B.
Camlp5 Version 5.14:
--------------------
* [28 Apr 10] Updated compatibility for OCaml current version 3.12.0.
* [31 Mar 10] Fixed bug in pr_o.cmo: error message when using "#use"
Camlp5 Version 5.13:
--------------------
* [02 Nov 09] Added compatibility with OCaml 3.11.2.
* [02 Nov 09] Updated compatibility with OCaml 3.12.0.
* [30 Jul 09] Added 'lazy' patterns (added in OCaml version 3.11).
* [09 Jun 09] Fixed bug in pr_r.cmo: did not always break after "in" (in
"let..in" statements) even with -flag l.
* [08 Jun 09] Fixed bug in pr_r.cmo: missing case "#use" for structure and
signature items.
Camlp5 Version 5.12:
--------------------
* [23 May 09] Added compatibility with OCaml 3.11.1.
* [31 Dec 08] In macros (pa_macro.cmo):
- added ability to use IFDEF and IFNDEF for record labels declarations.
Camlp5 Version 5.11:
--------------------
* [19 Dec 08] Added compatibility with OCaml 3.12.0.
Camlp5 Version 5.10:
--------------------
* [16 Oct 08] Added compatibility with OCaml 3.11.0.
* [01 Aug 08] Added flag "Plexer.utf8_lexing" to specify that the lexers
built by "Plexer.gmake ()" must consider the input as utf-8 encoded.
Camlp5 Version 5.09:
--------------------
* [05 Jun 08] Changed all '#!/bin/bash" in shells scripts into '#!/bin/sh'
and changed all $(...) into `...` because there are compatibilities
problems according to Unix versions.
* [31 Mar 08] Fixed bug: "let f ~_x () = ()" generated syntax error.
* [31 Mar 08] Fixed bug: "x $ y" generated syntax error (normal syntax).
* [02 Jan 08] Added compatibility with OCaml 3.10.3.
Camlp5 Version 5.08:
--------------------
* [08 Feb 08] Fixed bug in normal syntax: a.{x,y} (access to big array) was
interpreted as a.{(x,y)}.
* [22 Jan 08] Added missing cases in printers pr_o and pr_r which displayed
the message "unable to print ...".
* [02 Jan 08] Added compatibility with OCaml 3.09.4 and 3.10.2.
* [21 Jan 08] Fixed bug under windows: the file META could not be build
if the library path name contained colons.
* [13 Jan 08] Added missing man page for camlp5sch (link to the same man
page as camlp5).
* [05 Jan 08] Added "pr_extprint.cmo", printer rebuilding EXTEND_PRINTER
statements in their original syntax.
* [05 Jan 08] Fixed bug in EXTEND_PRINTER statement: the match cases with
"when" did not work.
Camlp5 Version 5.07:
--------------------
* [02 Jan 08] Added "pprintf" statement to use the Camlp5 pretty print
system more easily and shortly.
* [27 Dec 07] Added function [Grammar.Entry.parse_all] returning the
list of all solutions when using the parsing algorithm [Backtracking].
Camlp5 Version 5.06:
--------------------
* [19 Dec 07] Upgraded to add compatibilitly with OCaml version 3.10.1.
Camlp5 Version 5.05:
--------------------
* [17 Dec 07] Added function [Pcaml.quotation_location] returning the
location of the quotation in the source in the context of a quotation
expander.
* [04 Dec 07] Added generation of file META for ocamlfind in directory
etc (built but not installed).
* [28 Nov 07] Upgraded to reflect changes done in parse tree in current
OCaml (version 3.11+dev6).
* [27 Nov 07] Fixed bug in installation. Some files where installed in
the bin directory instead of lib directory.
* [27 Nov 07] Fixed bug in parsing comments: comments containing '\' where
incorrectly parsed.
Camlp5 Version 5.04:
--------------------
* [24 Nov 07] Fixed bug in install under MSVC Windows: object and library
files were not installed (using wrong extensions).
* [24 Nov 07] Fixed bug under Windows: line numbers in error messages were
wrong (twice the normal value).
* [24 Nov 07] Added ability to change the parsing algorithm of extensible
grammars, with the function "Grammar.set_algorithm" whose parameter can
be "predictive" or "backtracking".
* [22 Nov 07] Added backtracking parsers. Functions defined in the module
Fstream (already containing functional streams and parsers). Syntax
added in pa_fstream.cmo (already containing syntax for functinal streams
and parsers). The new syntax uses "bparser" instead of "fparser" and
a backtracking parser returns, together with its result and its
remaining stream, the continuation to compute the next solution.
Camlp5 Version 5.03:
--------------------
* [20 Nov 07] Added commands mkcamlp5 and mkcamlp5.opt to build camlp5
executables with predefined loaded modules. Added installation of ocpp
with name ocpp5, instead of just ocpp.
* [19 Nov 07] Added more installed cmx and cmxa files to allow building
native code linking of all combinations of Camlp5.
* [14 Nov 07] Fixed bug in pr_o.cmo: failed with printing "{a.(i) with ...}".
* [14 Nov 07] Fixed bug under Windows for the printers (pr_o.cmo, pr_r.cmo
and pr_scheme.cmo): extra return character '\r' was added at end of
lines.
* [09 Nov 07] Fixed bug in camlp5o.opt in strict mode: did not parse
correctly, in particular type expression (the version "camlp5o" without
".opt" however worked).
* [29 Oct 07] Added [Pcaml.inter_phrases], a way to set, by program,
the value of the "-sep" option of the printers kits.
* [28 Oct 07] Fixed bug in pa_fstream.cmo (functional parsers): the
keyword after "match with" was "parser" instead of "fparser" and
its code was wrong.
* [27 Oct 07] Added a default lexing buffer (in module [Plexing]) for
pa_lexer.cmo: then, the programmer does not need to write it any
more.
Camlp5 Version 5.02:
--------------------
* [14 Oct 07] Changed 'pa_lex.cmo' into 'pa_lexer.cmo' with a different
syntax (see the documentation).
* [14 Oct 07] In the EXTEND statement, added "LIKE s" as possible
level position to specify a level containing a rule containing "s"
in its keywords or tokens.
* [11 Oct 07] Rewritten parsers and printers in Scheme syntax. Deleted
old module Spretty.
Camlp5 Version 5.01:
--------------------
* [06 Oct 07] Fixed bug in grammars: there was a parsing confusion with
entries with qualified names with same final identifier, resulting
bad results. Example: (qualified names "Prim.ident" and "Constr.ident"
have the same final identifier "ident").
EXTEND
Prim.ident: [ [ ... ] ];
Constr.ident: [ [ ... ] ];
END;
* [05 Oct 07] In Scheme syntax (pa_scheme.cmo), added "type*" (symmetric
to "define*") and "exceptionrebind".
* [04 Oct 07] Added flag C in pr_r.cmo and pr_o.cmo to add comments inside
phrases (default = True).
* [01 Oct 07] Added flag E in pr_r.cmo and pr_o.cmo to ask to equilibrate
cases in 'match', 'if', 'parse', 'EXTEND' statements, i.e if one case does
not fit on the line, all cases must be cut (default = False).
* [01 Oct 07] Added module "Diff" in the library (general comparison of
two arrays). Implemented with the same algorithm as the Unix 'diff'
command.
* [01 Oct 07] Fixed bug in pa_o.cmo (normal syntax) introduced in version
5.00. The example: "function Atom atext as cur :: tl' -> 0" did not
parse, printing the error "incorrect alias pattern".
Camlp5 Version 5.00:
--------------------
* In Camlp5 compiled distributions, there are now two modes. If one wants
to compile Camlp5, the 'configure' script can select the mode:
The two modes are:
- transitional mode: the syntax tree is compatible with the previous
version; users don't have to change their programs, but in the
syntax tree quotations introduced by the new parsing kit
'q_ast.cmo', the antiquotations are not available.
- strict mode: the syntax tree is not compatible with the previous
version. The user programs may compile without change, but may
not. It depends on the fact that these programs use the syntax
tree with their constructors forms instead of their quotation
forms. There is a new feature: the syntax tree quotations in user
syntax, introduced by the new parsing kit 'q_ast.cmo".
* [25 Sep 07] Fixed bug: if parsing error at end of file, the error
message printed a bad line number.
* [17 Sep 07] Added [Ploc.call_with], a pervasive function.
* [15 Sep 07] Added 'q_ast.cmo': this is the syntax tree quotations in
the current syntax, including the possible user syntax extensions.
The antiquotations work only in 'strict' mode, not in 'transitional'
mode.
* [15 Sep 07] In module Pcaml, added grammar entries 'ipatt', 'match_case',
'constructor_declaration', 'with_constr', 'poly_variant'.
* [09 Sep 07] In macros (pa_macro.cmo):
- changed parameters syntax: now in curried form instead of parentheses,
- added ability to define macro type expressions in signatures, e.g.:
DEFINE V t = t -> t
- added ability to use IFDEF and IFNDEF for constructors declarations and
matchs cases.
* [08 Sep 07] Fixed bug in normal syntax (pa_o.cmo):
class foo : ?foo:unit -> bar
type foo = ?bar: unit -> unit;;
were accepted but not with space(s) after the colon:
class foo : ?foo: unit -> bar
type foo = ?bar : unit -> unit;;
* [06 Sep 07] Fixed problem of bad errors locations in Lisp and Scheme
syntaxes.
* [01 Sep 07] Renamed modules Stdpp into Ploc and Token into Plexing.
Changed the names of some of their definitions. Backward compatibility
assumed.
* [31 Aug 07] For packagers: added DESTDIR in Makefiles to allow installation
in fake root directories. Usage: make install DESTDIR=fake-root-dir
Camlp5 Version 4.08:
--------------------
* [] Updated documentation.
* [30 Aug 07] Added IFDEF macros for signatures (.mli files).
* [26 Aug 07] Added left factorization for consecutive rules of parsers
(and lexers).
* [21 Aug 07] Added equality functions over syntax trees in module Pcaml.
* [21 Aug 07] Improved compiled version (camlp5o.opt) to add the fact
that the grammar is LL(n) for rules starting with n terminals.
* [20 Aug 07] Updated library interface comments.
* [19 Aug 07] Added option -define with 'pa_macro.cmo' which prints the
predefined macros and exit.
* [16 Aug 07] Added pa_extprint.cmo, a new syntax for extensible pretty
printers adding a statement EXTEND_PRINTER (cf files pr_r.cmo and pr_o.ml
as examples). Added library module Eprinter. Changes (simplifications) in
interfaces of Pcaml for the printers.
Camlp5 Version 4.07:
--------------------
* [02 Aug 07] Fixed bug: option -o did not work for pr_r.cmo and pr_o.cmo
(was always stdout).
* [01 Aug 07] In EXTEND statement, added symbol FLAG: like OPT but return
a boolean value. The antiquotation kind "flag" must be used in this case,
but the "opt" still works by compatibility.
* [30 Jul 07] Fixed bug in normal syntax: let C x = C 1 was not accepted.
* [30 Jul 07] Changed pretty printing *normal* syntax: let C x = .. printed
like that, *not* transformed into let x = match .. with C x -> x.
Camlp5 Version 4.06:
--------------------
* [25 Jul 07] Fixed bug: in normal syntax, the declaration of a constructor
named "True" or "False" did not work.
* [25 Jul 07] While expanding stream parsers, transform unused bound
variables into wildcards to prevent compiler warnings.
* [21 Jul 07] Fixed bug in normal syntax and printing of normal syntax:
"poly type" was accepted with revised syntax, i.e. with "!" at beginning
and displayed like it. Fixed also the printing of abstract module type
which was not implemented. Added printing syntax of fun binding fof class
parameters.
* [20 Jul 07] Added revised syntax for bigarrays (same than normal syntax)
and pretty print them in their initial syntax.
* [18 Jul 07] In Grammar.Entry.print, local entries are displayed with
a star character "*".
* [18 Jul 07] In Grammar module, added type 'parsable', functions 'parsable'
and 'Entry.parse_parsable' like for the functorial interface.
Camlp5 Version 4.05:
--------------------
* [16 Jul 07] Fixed bug in normal syntax: optional semicolon was no more
accepted at end of stream patterns.
* [16 Jul 07] Fixed syntax problems with "~id:" and "~id :" (with a space).
Camlp5 Version 4.04:
--------------------
* [11 Jul 07] Renamed application as "camlp5".
* [11 Jul 07] Fixed compilation problems with ocaml version 3.08.1.
Camlp4s Version 4.03:
---------------------
* [10 Jul 07] Added argument "-name" in "configure" to specify another name
of commands and libraries (default = camlp4). E.g. "configure -name camlp5"
will build "camlp5", "camlp5r", "camlp5o", "camlp5.1", and so on, and
the library directory will be installed in ocaml library directory as
name "camlp5".
* [10 Jul 07] Deleted command "mkcamlp4" which seems not to work any more.
This will be fixed in a future version.
Camlp4s Version 4.02:
---------------------
* [08 Jul 07] Added missing compatibility with ocaml 3.10.0
* [05 Jul 07] Rebuilt pretty printers with new pretty printer module
* [27 Jun 07] Added private flag in type declarations and with constraints
* [21 Jun 07] Added "let..in" in parsers
* [14 Jun 07] Added html documentation for:
- the "extfun" statement
- the "fparser" statement
- the "lexer" statement
- the "parser" statement
- the "#pragma" directive
- the module Pretty
- the new pretty print in Camlp4 (using Pretty and "extfun")
* [14 Jun 07] Library module Sformat renamed Pretty. The first parameter
of the function horiz_vertic is now a function of type "unit -> 'a".
* [31 May 07] Quotation "row_field" renamed "poly_variant".
* [03 May 07] Fixed bug in pr_o: did not print "let f ?a = ()".
Camlp4s Version 4.01:
---------------------
* [27 Apr 07] Added compatibility with ocaml 3.11
Camlp4s Version 4.00:
---------------------
* [31 Jan 07] Added a new syntax, "lexer", to write parsers of characters
in a shorter way. New syntax extension "pa_lex.cmo".
* [26 Jan 07] Deleted "LOCATE" lexing token kind and associated parsing
stuff. Seems to be an old thing never used.
* [20 Jan 07] Added "lookahead" stream pattern component kind.
syntax ::= "?=" list lookhd_patt sep_by "|"
lookhd_patt ::= "[" list pattern sep_by ";" "]"
Checks the first stream elements against the pattern, without removing
them from the stream (but possibly unfreezing them), continues the stream
pattern if ok, fails (Stream.Failure or Stream.Error depending on the
position of the component) if not. If there are more than one lookahead
pattern, they must be of the same length. Examples in lib/plexer.ml.
* [31 Dec 06] Added the ability to add "!" (in Revised syntax) or "?!"
(in normal syntax) after a stream parser component to hint the preprocessor
that the called parser cannot fail (which must be true, but not checked)
which allows shorter code. E.g.
parser [: x = f; y = g ! :] -> (x, y)
This example is equivalent to:
parser [: x = f; s :] -> let y = g s in (x, y)
* [19 Dec 06] Added "pa_pragma.cmo" adding the directive "#pragma <expr>"
which executes <expr> in the context of the preprocessor.
* [16 Dec 06] Added ability to add directives: "Pcaml.add_directive".
* [05 Dec 06] Fixed old bug: "camlp4 foo/bar.cmo" now searchs from the
current directory (i.e in its subdirectory "foo"), instead of searching
in the path. Before, we had to write "camlp4 ./foo/bar.cmo".
* [01 Dec 06] In "pa_macro.cmo", the expression after IFDEF can use
the infix operators OR and AND, the prefix one NOT and expressions
between parentheses.
* [01 Dec 06] The same distribution can compile with several versions
of OCaml. After "./configure", the good version of OCaml interfaces
are selected.
* [01 Dec 06] The type "location" is now abstract. Defined in stdpp.mli.
* [01 Dec 06] First distributed version; started from old camlp4
version 3.06 and updated.
-------------------------
(2016-01-25) version 1.6:
* Better support for complex media queries.
* Add unit tests based on Alcotest.
* Migrate from OCaml-pcre to OCaml-re.
* Migrate from Ulex to Sedlex.
* Drop '_t' suffix from types internally.
-------------------------
(2014-05-21) version 1.5:
* Support for @keyframes (CSS animations).
* Minor grammar simplification: @charset now lumped with other at-rules.
-------------------------
(2013-09-27) version 1.4:
* Support for mixins.
* Support for Unicode ranges.
-------------------------
(2012-09-28) version 1.3:
* Now using OASIS for build system.
* Migrated from ExtLib to Batteries.
-------------------------
(2010-03-24) version 1.2:
* Handling of !important declarations.
* More leniency in characters allowed in identifiers.
* Allow division of quantities with the same unit (result is scalar).
* Always allow addition/subtraction when one of the operands is the scalar 0.
-------------------------
(2010-03-12) version 1.1:
* Added support for unit conversion.
-------------------------
(2010-03-10) version 1.0:
* First public release.
1.1.0 (2016-06-28)
- don't call `close` on `Eof`
- add `read_exactly`
- add LICENSE
- add conflict with old versions of tcpip
0.10.0 (2015-12-25):
* Add support for CA certificates in [Conduit_async.serve] (#98).
* Fix file descriptor leak in Lwt backend (#101 from @hannesm).
* Server in `Conduit_lwt_tls` waits for a user callback to finish
before accepting more connections. Instead, it should only wait
until the connection is accepted and detach client callback (#97).
* Close socket when `ssl_accept` fails, e.g. when cipher negotiation
mismatch (#104).
0.9.0 (2015-10-14):
* Add a `Launchd` argument for the Conduit_lwt_unix server listener
to support the MacOSX service launcher (#96).
0.8.8 (2015-09-15):
* Expose a new functor `Conduit_mirage.With_tcp` (#92, by @Drup)
* Expose a new functor: `Resolver_mirage.Make_with_stack` to build a DNS
resolver using an existing network stack (#92, by @Drup)
* Expose `Resolver_mirage.S`, the signature for Mirage's conduit resolvers than
can perform DNS lookups. These resolvers now expose their `DNS` implmentation
as a submodule (#92, by @Drup)
* Expose a ?version arg in Conduit_async_ssl.ssl_listen, default being TLS 1.2
(#94, by @vbmithr)
0.8.7 (2015-08-18):
* Do not ignore custom context when calling `Conduit_lwt_unix_ssl.accept`
(reported by @jrb467 in #88)
* `Conduit_lwt_unix.Serve` now passes the client `flow` to the server
callback instead of the listening server one. This lets servers
retrieve the peer endpoint correctly (reported by @fxfactorial in #87)
0.8.6 (2015-07-14)
* Add a `Conduit_mirage.Context`, a functor for creating HTTP(s) conduit
contexts (with a DNS resolver).
0.8.5 (2015-07-12)
* Fix client-side `https://` resolution for `Conduit_mirage`
0.8.4 (2015-05-29):
* Full support for `ocaml-tls.0.5.0`
* Breaking API change for mirage-conduit. Now all the flows are dynamic,
the functors are becoming first-class values so no big functor to build
first.
0.8.3 (2015-05-04):
* Partial support for `ocaml-tls.0.5.0`
* setsockopt TCP_NODELAY fails on a Unix domain socket (#63 by @djs55)
0.8.2 (2015-04-18):
* Make TLS optional in `Conduit_mirage`, and disable it by default
so that it is a developer-only option until it is properly released.
It can be enabled by setting the `HAVE_MIRAGE_LWT` env variable.
0.8.1 (2015-04-17):
* Support Async_SSL version 112.24.00 and higher.
* Add a TLS echo server in `tests/async/`
* [lwt] Do not leak socket fd when a connect or handshake
operation fails (#56 via Edwin Torok).
* [async] Do not leak pipes in SSL handling (#54 from Trevor Smith).
0.8.0 (2015-03-27):
* Add TLS client support for Mirage (#50)
* Do not overwrite the default name resolver for Mirage (#49)
* Add TLS support using the pure OCaml TLS stack (#46).
* Replace the Mirage `Make_flow` functor with `Dynamic_flow` that is
easier to extend with more flow types.
0.7.2 (2015-01-26):
* Add an `error_message` function to simplify error display (#38).
* Improvements to documentation (#37).
0.7.1 (2014-12-05):
* Do not emit debug output when the `CONDUIT_DEBUG` variable is not set.
* Do not create symlinks in a local build, which helps with OPAM pins.
* Improve ocamldoc for `Conduit_lwt_unix`.
0.7.0 (2014-12-04):
* Add Lwt-unix support for the native OCaml/TLS stack as an alternative
to OpenSSL. This can be activated by setting the `CONDUIT_TLS` environment
variable to `native`. If this is not set and OpenSSL is available, then
OpenSSL is used by in preference to the pure OCaml implementation.
* Add sexp convertors for `Conduit_lwt_unix.ctx` and `Conduit_mirage.ctx`
and the `Resolver` service types.
* Fix the Mirage tests to the Mirage 2.0.1+ Conduit interfaces.
* Add more debugging output when the `CONDUIT_DEBUG` variable is set on Unix.
* *Interface breaking:* The `client` and `server` types in `Conduit_lwt_unix`
now explicitly label the fields of the tuples with a polymorphic variant.
This allows them to remain independent of this library but still be
more self-descriptive (i.e. `Port of int` instead of just `int`).
0.6.1 (2014-11-07):
* When terminating conduits, always close the output channel first before
the input channel, so that any pending data in the underlying fd is flushed.
0.6.0 (2014-11-04):
* Add an explicit `ctx` content to track every conduit's runtime state.
* Allow the source interface for a conduit to be set.
* Support a `password` callback for the SSL layer (#4).
* [lwt] Add stop parameters in main-loop of the server (#5).
* Add `Conduit_mirage` with Mirage functor suport.
* Add ocamldoc of most interfaces.
* Add a `CONDUIT_DEBUG` environment variable to the Unix backends for
live debugging.
* Add a `conn` value to the callback to query more information about the
current connection (#2).
* Expose the representation of `Conduit_lwt_unix.flow` in the external signature.
This lets library users obtain the original `Lwt_unix.file_descr` when using
Conduit libraries like Cohttp.
0.5.1 (2014-08-07):
* Reenable Async SSL by default.
0.5.0 (2014-04-13):
* First public release.
Changes from V8.5pl1 to V8.5pl2
===============================
Critical bugfix
- Checksums of .vo files dependencies were not correctly checked.
Other bugfixes
- #4097: more efficient occur-check in presence of primitive projections
- #4398: type_scope used consistently in "match goal".
- #4450: eauto does not work with polymorphic lemmas
- #4677: fix alpha-conversion in notations needing eta-expansion.
- Fully preserve initial order of hypotheses in "Regular Subst Tactic" mode.
- #4644: a regression in unification.
- #4725: Function (Error: Conversion test raised an anomaly) and Program
(Error: Cannot infer this placeholder of type)
- #4747: Problem building Coq 8.5pl1 with OCaml 4.03.0: Fatal warnings
- #4752: CoqIDE crash on files not ended by ".v".
- #4777: printing inefficiency with implicit arguments
- #4818: "Admitted" fails due to undefined universe anomaly after calling
"destruct"
- #4823: remote counter: avoid thread race on sockets
- #4881: synchronizing "Declare Implicit Tactic" with backtrack.
- #4882: anomaly with Declare Implicit Tactic on hole of type with evars
- Fix use of "Declare Implicit Tactic" in refine.
triggered by CoqIDE
- #4069, #4718: congruence fails when universes are involved.
Universes
- Disallow silently dropping universe instances applied to variables
(forward compatible)
- Allow explicit universe instances on notations, when they can apply
to the head reference of their expansion.
Build infrastructure
- New update on how to find camlp5 binary and library at configure time.
Changes from V8.5 to V8.5pl1
============================
Critical bugfix
- The subterm relation for the guard condition was incorrectly defined on
primitive projections (#4588)
Plugin development tools
- add a .merlin target to the makefile
Various performance improvements (time, space used by .vo files)
Other bugfixes
- Fix order of arguments to Big.compare_case in ExtrOcamlZBigInt.v
- Added compatibility coercions from Specif.v which were present in Coq 8.4.
- Fixing a source of inefficiency and an artificial dependency in the printer in the congruence tactic.
- Allow to unset the refinement mode of Instance in ML
- Fixing an incorrect use of prod_appvect on a term which was not a product in setoid_rewrite.
- Add -compat 8.4 econstructor tactics, and tests
- Add compatibility Nonrecursive Elimination Schemes
- Fixing the "No applicable tactic" non informative error message regression on apply.
- Univs: fix get_current_context (bug #4603, part I)
- Fix a bug in Program coercion code
- Fix handling of arity of definitional classes.
- #4630: Some tactics are 20x slower in 8.5 than 8.4.
- #4627: records with no declared arity can be template polymorphic.
- #4623: set tactic too weak with universes (regression)
- Fix incorrect behavior of CS resolution
- #4591: Uncaught exception in directory browsing.
- CoqIDE is more resilient to initialization errors.
- #4614: "Fully check the document" is uninterruptable.
- Try eta-expansion of records only on non-recursive ones
- Fix bug when a sort is ascribed to a Record
- Primitive projections: protect kernel from erroneous definitions.
- Fixed bug #4533 with previous Keyed Unification commit
- Win: kill unreliable hence do not waitpid after kill -9 (Close #4369)
- Fix strategy of Keyed Unification
- #4608: Anomaly "output_value: abstract value (outside heap)".
- #4607: do not read native code files if native compiler was disabled.
- #4105: poor escaping in the protocol between CoqIDE and coqtop.
- #4596: [rewrite] broke in the past few weeks.
- #4533 (partial): respect declared global transparency of projections in unification.ml
- #4544: Backtrack on using full betaiota reduction during keyed unification.
- #4540: CoqIDE bottom progress bar does not update.
- Fix regression from 8.4 in reflexivity
- #4580: [Set Refine Instance Mode] also used for Program Instance.
- #4582: cannot override notation [ x ]. MAY CREATE INCOMPATIBILITIES, see #4683.
- STM: Print/Extraction have to be skipped if -quick
- #4542: CoqIDE: STOP button also stops workers
- STM: classify some variants of Instance as regular `Fork nodes.
- #4574: Anomaly: Uncaught exception Invalid_argument("splay_arity").
- Do not give a name to anonymous evars anymore. See bug #4547.
- STM: always stock in vio files the first node (state) of a proof
- STM: not delegate proofs that contain Vernac(Module|Require|Import), #4530
- Don't fail fatally if PATH is not set.
- #4537: Coq 8.5 is slower in typeclass resolution.
- #4522: Incorrect "Warning..." on windows.
- #4373: coqdep does not know about .vio files.
- #3826: "Incompatible module types" is uninformative.
- #4495: Failed assertion in metasyntax.ml.
- #4511: evar tactic can create non-typed evars.
- #4503: mixing universe polymorphic and monomorphic variables and definitions in sections is unsupported.
- #4519: oops, global shadowed local universe level bindings.
- #4506: Anomaly: File "pretyping/indrec.ml", line 169, characters 14-20: Assertion failed.
- #4548: Coqide crashes when going back one command
Changes from V8.5beta3 to V8.5
==============================
Tools
- Flag "-compat 8.4" now loads Coq.Compat.Coq84. The standard way of
putting Coq in v8.4 compatibility mode is to pass the command line flag
"-compat 8.4". It can be followed by "-require Coq.Compat.AdmitAxiom"
if the 8.4 behavior of admit is needed, in which case it uses an axiom.
Specification language
- Syntax "$(tactic)$" changed to "ltac:(tactic)".
Tactics
- Syntax "destruct !hyp" changed to "destruct (hyp)", and similarly
for induction (rare source of incompatibilities easily solvable by
removing parentheses around "hyp" when not for the purpose of keeping
the hypothesis).
- Syntax "p/c" for on-the-fly application of a lemma c before
introducing along pattern p changed to p%c1..%cn. The feature and
syntax are in experimental stage.
- "Proof using" does not clear unused section variables.
- Tactic "refine" has been changed back to the 8.4 behavior of shelving subgoals
that occur in other subgoals. The "refine" tactic of 8.5beta3 has been
renamed "simple refine"; it does not shelve any subgoal.
- New tactical "unshelve tac" which grab existential variables put on
the tactic shelve by the execution of "tac".
Changes from V8.5beta2 to V8.5beta3
===================================
Vernacular commands
- New command "Redirect" to redirect the output of a command to a file.
- New command "Undelimit Scope" to remove the delimiter of a scope.
- New option "Strict Universe Declaration", set by default. It enforces the
declaration of all polymorphic universes appearing in a definition when
introducing it.
- New command "Show id" to show goal named id.
- Option "Virtual Machine" removed.
Tactics
- New flag "Regular Subst Tactic" which fixes "subst" in situations where
it failed to substitute all substitutable equations or failed to simplify
cycles, or accidentally unfolded local definitions (flag is off by default).
- New flag "Loose Hint Behavior" to handle hints loaded but not imported in a
special way. It accepts three distinct flags:
* "Lax", which is the default one, sets the old behavior, i.e. a non-imported
hint behaves the same as an imported one.
* "Warn" outputs a warning when a non-imported hint is used. Note that this is
an over-approximation, because a hint may be triggered by an eauto run that
will eventually fail and backtrack.
* "Strict" changes the behavior of an unloaded hint to the one of the fail
tactic, allowing to emulate the hopefully future import-scoped hint mechanism.
- New compatibility flag "Universal Lemma Under Conjunction" which
let tactics working under conjunctions apply sublemmas of the form
"forall A, ... -> A".
- New compatibility flag "Bracketing Last Introduction Pattern" which can be
set so that the last disjunctive-conjunctive introduction pattern given to
"intros" automatically complete the introduction of its subcomponents, as the
the disjunctive-conjunctive introduction patterns in non-terminal position
already do.
- Importing Program no longer overrides the "exists" tactic (potential source
of incompatibilities).
- Hints costs are now correctly taken into account (potential source of
incompatibilities).
- Documented the Hint Cut command that allows control of the
proof-search during typeclass resolution (see reference manual).
API
- Some functions from pretyping/typing.ml and their derivatives were potential
source of evarmap leaks, as they dropped their resulting evarmap. The
situation was clarified by renaming them according to a unsafe_* scheme. Their
sound variant is likewise renamed to their old name. The following renamings
were made.
* Typing.type_of -> unsafe_type_of
* Typing.e_type_of -> type_of
* A new e_type_of function that matches the e_ prefix policy
* Tacmach.pf_type_of -> pf_unsafe_type_of
* A new safe pf_type_of function.
All uses of unsafe_* functions should be eventually eliminated.
Tools
- Added an option -w to control the output of coqtop warnings.
- Configure now takes an optional -native-compiler (yes|no) flag replacing
-no-native-compiler. The new flag is set to no by default under Windows.
- Flag -no-native-compiler was removed and became the default for coqc. If
precompilation of files for native conversion test is desired, use
-native-compiler.
- The -compile command-line option now takes the full path of the considered
file, including the ".v" extension, and outputs a warning if such an extension
is lacking.
- The -require and -load-vernac-object command-line options now take a logical
path of a given library rather than a physical path, thus they behave like
Require [Import] path.
- The -vm command-line option has been removed.
Standard Library
- There is now a Coq.Compat.Coq84 library, which sets the various compatibility
options and does a few redefinitions to make Coq behave more like Coq v8.4.
The standard way of putting Coq in v8.4 compatibility mode is to pass the command
line flags "-require Coq.Compat.Coq84 -compat 8.4".
Changes from V8.5beta1 to V8.5beta2
===================================
Logic
- The VM now supports inductive types with up to 8388851 non-constant
constructors and up to 8388607 constant ones.
Specification language
- Syntax "$(tactic)$" changed to "ltac: tactic".
Tactics
- A script using the admit tactic can no longer be concluded by either
Qed or Defined. In the first case, Admitted can be used instead. In
the second case, a subproof should be used.
- The easy tactic and the now tactical now have a more predictable
behavior, but they might now discharge some previously unsolved goals.
Extraction
- Definitions extracted to Haskell GHC should no longer randomly
segfault when some Coq types cannot be represented by Haskell types.
- Definitions can now be extracted to Json for post-processing.
Tools
- Option -I -as has been removed, and option -R -as has been
deprecated. In both cases, option -R can be used instead.
- coq_makefile now generates double-colon rules for rules such as clean.
API
- The interface of [change] has changed to take a [change_arg], which
can be built from a [constr] using [make_change_arg].
Changes from V8.4 to V8.5beta1
==============================
Logic
- Primitive projections for records allow for a compact representation
of projections, without parameters and avoid the behavior of defined
projections that can unfold to a case expression. To turn the use of
native projections on, use [Set Primitive Projections]. Record,
Class and Structure types defined while this option is set will be
defined with primitive projections instead of the usual encoding as
a case expression. For compatibility, when p is a primitive
projection, @p can be used to refer to the projection with explicit
parameters, i.e. [@p] is definitionally equal to [λ params r. r.(p)].
Records with primitive projections have eta-conversion, the
canonical form being [mkR pars (p1 t) ... (pn t)].
- New universe polymorphism (see reference manual)
- New option -type-in-type to collapse the universe hierarchy (this makes the
logic inconsistent).
- The guard condition for fixpoints is now a bit stricter. Propagation
of subterm value through pattern matching is restricted according to
the return predicate. Restores compatibility of Coq's logic with the
propositional extensionality axiom. May create incompatibilities in
recursive programs heavily using dependent types.
- Trivial inductive types are no longer defined in Type but in Prop, which
leads to a non-dependent induction principle being generated in place of
the dependent one. To recover the old behavior, explicitly define your
inductive types in Set.
Vernacular commands
- A command "Variant" allows to define non-recursive variant types.
- The command "Record foo ..." does not generate induction principles
(foo_rect, foo_rec, foo_ind) anymore by default (feature wish
#2693). The command "Variant foo ..." does not either. A flag
"Set/Unset Nonrecursive Elimination Schemes" allows changing this.
The tactic "induction" on a "Record" or a "Variant" is now actually
doing "destruct".
- The "Open Scope" command can now be given also a delimiter (e.g. Z).
- The "Definition" command now allows the "Local" modifier, allowing
for non-importable definitions. The same goes for "Axiom" and "Parameter".
- Section-specific commands such as "Let" (resp. "Variable", "Hypothesis") used
out of a section now behave like the corresponding "Local" command, i.e.
"Local Definition" (resp. "Local Parameter", "Local Axiom"). (potential source
of rare incompatibilities).
- The "Let" command can now define local (co)fixpoints.
- Command "Search" has been renamed into "SearchHead". The command
name "Search" now behaves like former "SearchAbout". The latter name
is deprecated.
- "Search", "About", "SearchHead", "SearchRewrite" and "SearchPattern"
now search for hypothesis (of the current goal by default) first.
They now also support the goal selector prefix to specify another
goal to search: e.g. "n:Search id". This is also true for
SearchAbout although it is deprecated.
- The coq/user-contrib directory and the XDG directories are no longer
recursively added to the load path, so files from installed libraries
now need to be fully qualified for the "Require" command to find them.
The tools/update-require script can be used to convert a development.
- A new Print Strategies command allows visualizing the opacity status
of the whole engine.
- The "Locate" command now searches through all sorts of qualified namespaces of
Coq: terms, modules, tactics, etc. The old behavior of the command can be
retrieved using the "Locate Term" command.
- New "Derive" command to help writing program by derivation.
- New "Refine Instance Mode" option that allows to deactivate the generation of
obligations in incomplete typeclass instances, raising an error instead.
- "Collection" command to name sets of section hypotheses. Named collections
can be used in the syntax of "Proof using" to assert which section variables
are used in a proof.
- The "Optimize Proof" command can be placed in the middle of a proof to
force the compaction of the data structure used to represent the ongoing
proof (evar map). This may result in a lower memory footprint and speed up
the execution of the following tactics.
- "Optimize Heap" command to tell the OCaml runtime to perform a major
garbage collection step and heap compaction.
- "Instance" no longer treats the {|...|} syntax specially; it handles it
in the same way as other commands, e.g. "Definition". Use the {...}
syntax (no pipe symbols) to recover the old behavior.
Specification Language
- Slight changes in unification error messages.
- Added a syntax $(...)$ that allows putting tactics in terms (may
break user notations using "$(", fixable by inserting a space or
rewriting the notation).
- Constructors in pattern-matching patterns now respect the same rules
regarding implicit arguments as in applicative position. The old
behavior can be recovered by the command "Set Asymmetric
Patterns". As a side effect, notations for constructors explicitly
mentioning non-implicit parameters can now be used in patterns.
Considering that the pattern language is already rich enough, binding
local definitions is however now forbidden in patterns (source of
incompatibilities for local definitions that delta-reduce to a constructor).
- Type inference algorithm now granting opacity of constants. This might also
affect behavior of tactics (source of incompatibilities, solvable by
re-declaring transparent constants which were set opaque).
- Existential variables are now referred to by an identifier and the
relevant part of their instance is displayed by default. They can be
reparsed. The naming policy is yet unstable and subject to changes
in future releases.
Tactics
- New tactic engine allowing dependent subgoals, fully backtracking
(also known as multiple success) tactics, as well as tactics which
can consider multiple goals together. In the new tactic engine,
instantiation information of existential variables is always
propagated to tactics, removing the need to manually use the
"instantiate" tactics to mark propagation points.
* New tactical (a+b) inserts a backtracking point. When (a+b);c fails
during the execution of c, it can backtrack and try b instead of a.
* New tactical (once a) removes all the backtracking points from a
(i.e. it selects the first success of a).
* Tactic "constructor" is now fully backtracking. In case of
incompatibilities (e.g. combinatoric explosion), the former
behavior of "constructor" can be retrieved by using instead
"[> once constructor ..]". Thanks to backtracking, undocumented
"constructor <tac>" syntax is now equivalent to
"[> once (constructor; tac) ..]".
* New "multimatch" variant of "match" tactic which backtracks to
new branches in case of a later failure. The "match" tactic is
equivalent to "once multimatch".
* New selector "all:" such that "all:tac" applies tactic "tac" to
all the focused goals, instead of just the first one as is the
default.
* A corresponding new option Set Default Goal Selector "all" makes
the tactics in scripts be applied to all the focused goal by default
* New selector "par:" such that "par:tac" applies the (terminating)
tactic "tac" to all the focused goal in parallel. The number of worker
can be selected with -async-proofs-tac-j and also limited using the
coqworkmgr utility.
* New tactics "revgoals", "cycle" and "swap" to reorder goals.
* The semantics of recursive tactics (introduced with "Ltac t := ..."
or "let rec t := ... in ...") changed slightly as t is now
applied to every goal, not each goal independently. In particular
it may be applied when no goals are left. This may cause tactics
such as "let rec t := constructor;t" to loop indefinitely. The
simple fix is to rewrite the recursive calls as follows:
"let rec t := constructor;[t..]" which recovers the earlier behavior
(source of rare incompatibilities).
* New tactic language feature "numgoals" to count number of goals. It is
accompanied by a "guard" tactic which fails if a Boolean test over
integers does not pass.
* New tactical "[> ... ]" to apply tactics to individual goals.
* New tactic "gfail" which works like "fail" except it will also
fail if every goal has been solved.
* The refine tactic is changed not to use an ad hoc typing algorithm
to generate subgoals. It also uses the dependent subgoal feature
to generate goals to materialize every existential variable which
is introduced by the refinement (source of incompatibilities).
* A tactic shelve is introduced to manage the subgoals which may be
solved by unification: shelve removes every goal it is applied to
from focus. These goals can later be called back into focus by the
Unshelve command.
* A variant shelve_unifiable only removes those goals which appear
as existential variables in other goals. To emulate the old
refine, use "refine c;shelve_unifiable". This can still cause
incompatibilities in rare occasions.
* New "give_up" tactic to skip over a goal. A proof containing
given up goals cannot be closed with "Qed", but only with "Admitted".
- The implementation of the admit tactic has changed: no axiom is
generated for the admitted sub proof. "admit" is now an alias for
"give_up". Code relying on this specific behavior of "admit"
can be made to work by:
* Adding an "Axiom" for each admitted subproof.
* Adding a single "Axiom proof_admitted : False." and the Ltac definition
"Ltac admit := case proof_admitted.".
- Matching using "lazymatch" was fundamentally modified. It now behaves
like "match" (immediate execution of the matching branch) but without
the backtracking mechanism in case of failure.
- New "tryif t then u else v" tactical which executes "u" in case of success
of "t" and "v" in case of failure.
- New conversion tactic "native_compute": evaluates the goal (or an hypothesis)
with a call-by-value strategy, using the OCaml native compiler. Useful on
very intensive computations.
- New "cbn" tactic, a well-behaved simpl.
- Repeated identical calls to omega should now produce identical proof terms.
- Tactics btauto, a reflexive Boolean tautology solver.
- Tactic "tauto" was exceptionally able to destruct other connectives
than the binary connectives "and", "or", "prod", "sum", "iff". This
non-uniform behavior has been fixed (bug #2680) and tauto is
slightly weaker (possible source of incompatibilities). On the
opposite side, new tactic "dtauto" is able to destruct any
record-like inductive types, superseding the old version of "tauto".
- Similarly, "intuition" has been made more uniform and, where it now
fails, "dintuition" can be used (possible source of incompatibilities).
- New option "Unset Intuition Negation Unfolding" for deactivating automatic
unfolding of "not" in intuition.
- Tactic notations can now be defined locally to a module (use "Local" prefix).
- Tactic "red" now reduces head beta-iota redexes (potential source of
rare incompatibilities).
- Tactic "hnf" now reduces inner beta-iota redexes
(potential source of rare incompatibilities).
- Tactic "intro H" now reduces beta-iota redexes if these hide a product
(potential source of rare incompatibilities).
- In Ltac matching on patterns of the form "_ pat1 ... patn" now
behaves like if matching on "?X pat1 ... patn", i.e. accepting "_"
to be instantiated by an applicative term (experimental at this
stage, potential source of incompatibilities).
- In Ltac matching on goal, types of hypotheses are now interpreted in
the %type scope (possible source of incompatibilities).
- "change ... in ..." and "simpl ... in ..." now properly consider nested
occurrences (possible source of incompatibilities since this alters
the numbering of occurrences), but do not support nested occurrences.
- Tactics simpl, vm_compute and native_compute can be given a notation string
to a constant as argument.
- When given a reference as argument, simpl, vm_compute and
native_compute now strictly interpret it as the head of a pattern
starting with this reference.
- The "change p with c" tactic semantics changed, now type-checking
"c" at each matching occurrence "t" of the pattern "p", and
converting "t" with "c".
- Now "appcontext" and "context" behave the same. The old buggy behavior of
"context" can be retrieved at parse time by setting the
"Tactic Compat Context" flag (possible source of incompatibilities).
- New introduction pattern p/c which applies lemma c on the fly on the
hypothesis under consideration before continuing with introduction pattern p.
- New introduction pattern [= x1 .. xn] applies "injection as [x1 .. xn]"
on the fly if injection is applicable to the hypothesis under consideration
(idea borrowed from Georges Gonthier). Introduction pattern [=] applies
"discriminate" if a discriminable equality.
- New introduction patterns * and ** to respectively introduce all forthcoming
dependent variables and all variables/hypotheses dependent or not.
- Tactic "injection c as ipats" now clears c if c refers to an
hypothesis and moves the resulting equations in the hypotheses
independently of the number of ipats, which has itself to be less
than the number of new hypotheses (possible source of incompatibilities;
former behavior obtainable by "Unset Injection L2R Pattern Order").
- Tactic "injection" now automatically simplifies subgoals
"existT n p = existT n p'" into "p = p'" when "n" is in an inductive type for
which a decidable equality scheme has been generated with "Scheme Equality"
(possible source of incompatibilities).
- New tactic "rewrite_strat" for generalized rewriting with user-defined
strategies, subsuming autorewrite.
- Injection can now also deduce equality of arguments of sort Prop, by using
the option "Set Injection On Proofs" (disabled by default). Also improved the
error messages.
- Tactic "subst id" now supports id occurring in dependent local definitions.
- Bugs fixed about intro-pattern "*" might lead to some rare incompatibilities.
- New tactical "time" to display time spent executing its argument.
- Tactics referring or using a constant dependent in a section variable which
has been cleared or renamed in the current goal context now fail
(possible source of incompatibilities solvable by avoiding clearing
the relevant hypotheses).
- New construct "uconstr:c" and "type_term c" to build untyped terms.
- Binders in terms defined in Ltac (either "constr" or "uconstr") can
now take their names from identifiers defined in Ltac. As a
consequence, a name cannot be used in a binder "constr:(fun x =>
...)" if an Ltac variable of that name already exists and does not
contain an identifier. Source of occasional incompatibilities.
- The "refine" tactic now accepts untyped terms built with "uconstr"
so that terms with holes can be constructed piecewise in Ltac.
- New bullets --, ++, **, ---, +++, ***, ... made available.
- More informative messages when wrong bullet is used.
- Bullet suggestion when a subgoal is solved.
- New tactic "enough", symmetric to "assert", but with subgoals
swapped, as a more friendly replacement of "cut".
- In destruct/induction, experimental modifier "!" prefixing the
hypothesis name to tell not erasing the hypothesis.
- Bug fixes in "inversion as" may occasionally lead to incompatibilities.
- Behavior of introduction patterns -> and <- made more uniform
(hypothesis is cleared, rewrite in hypotheses and conclusion and
erasing the variable when rewriting a variable).
- Tactics from plugins are now active only when the corresponding module
is imported (source of incompatibilities, solvable by adding an "Import";
in the particular case of Omega, use "Require Import OmegaTactic").
- Semantics of destruct/induction has been made more regular in some
edge cases, possibly leading to incompatibilities:
- new goals are now opened when the term does not match a subterm of
the goal and has unresolved holes, while in 8.4 these holes were
turned into existential variables
- when no "at" option is given, the historical semantics which
selects all subterms syntactically identical to the first subterm
matching the given pattern is used
- non-dependent destruct/induction on an hypothesis with premises in
an inductive type with indices is fixed
- residual local definitions are now correctly removed.
- The rename tactic may now replace variables in parallel.
- A new "Info" command replaces the "info" tactical discontinued in
v8.4. It still gives informative results in many cases.
- The "info_auto" tactic is known to be broken and does not print a
trace anymore. Use "Info 1 auto" instead. The same goes for
"info_trivial". On the other hand "info_eauto" still works fine,
while "Info 1 eauto" prints a trivial trace.
- When using a lemma of the prototypical form "forall A, {a:A & P a}",
"apply" and "apply in" do not instantiate anymore "A" with the
current goal and use "a" as the proof, as they were sometimes doing,
now considering that it is a too powerful decision.
Program
- "Solve Obligations using" changed to "Solve Obligations with",
consistent with "Proof with".
- Program Lemma, Definition now respect automatic introduction.
- Program Lemma, Definition, etc.. now interpret "->" like Lemma and
Definition as a non-dependent arrow (potential source of
incompatibility).
- Add/document "Set Hide Obligations" (to hide obligations in the final
term inside an implicit argument) and "Set Shrink Obligations" (to
minimize dependencies of obligations defined by tactics).
Notations
- The syntax "x -> y" is now declared at level 99. In particular, it has
now a lower priority than "<->": "A -> B <-> C" is now "A -> (B <-> C)"
(possible source of incompatibilities)
- Notations accept term-providing tactics using the $(...)$ syntax.
- "Bind Scope" can no longer bind "Funclass" and "Sortclass".
- A notation can be given a (compat "8.x") annotation, making it behave
like a "only parsing" notation, but the annotation may lead to eventually
issue warnings or errors in further versions when this notation is used.
- More systematic insertion of spaces as a default for printing
notations ("format" still available to override the default).
- In notations, a level modifier referring to a non-existent variable is
now considered an error rather than silently ignored.
Tools
- Option -I now only adds directories to the ml path.
- Option -Q behaves as -R, except that the logical path of any loaded file has
to be fully qualified.
- Option -R no longer adds recursively to the ml path; only the root
directory is added. (Behavior with respect to the load path is
unchanged.)
- Option -nois prevents coq/theories and coq/plugins to be recursively
added to the load path. (Same behavior as with coq/user-contrib.)
- coqdep accepts a -dumpgraph option generating a dot file.
- Makefiles generated through coq_makefile have three new targets "quick"
"checkproofs" and "vio2vo", allowing respectively to asynchronously compile
the files without playing the proof scripts, asynchronously checking
that the quickly generated proofs are correct and generating the object
files from the quickly generated proofs.
- The XML plugin was discontinued and removed from the source.
- A new utility called coqworkmgr can be used to limit the number of
concurrent workers started by independent processes, like make and CoqIDE.
This is of interest for users of the par: goal selector.
Interfaces
- CoqIDE supports asynchronous edition of the document, ongoing tasks and
errors are reported in the bottom right window. The number of workers
taking care of processing proofs can be selected with -async-proofs-j.
- CoqIDE highlights in yellow "unsafe" commands such as axiom
declarations, and tactics like "give_up".
- CoqIDE supports Proof General like key bindings;
to activate the PG mode go to Edit -> Preferences -> Editor.
For the documentation see Help -> Help for PG mode.
- CoqIDE automatically retracts the locked area when one edits the
locked text.
- CoqIDE search and replace got regular expressions power. See the
documentation of OCaml's Str module for the supported syntax.
- Many CoqIDE windows, including the query one, are now detachable to
improve usability on multi screen work stations.
- Coqtop/coqc outputs highlighted syntax. Colors can be configured thanks
to the COQ_COLORS environment variable, and their current state can
be displayed with the -list-tags command line option.
- Third party user interfaces can install their main loop in $COQLIB/toploop
and call coqtop with the -toploop flag to select it.
Internal Infrastructure
- Many reorganizations in the ocaml source files. For instance,
many internal a.s.t. of Coq are now placed in mli files in
a new directory intf/, for instance constrexpr.mli or glob_term.mli.
More details in dev/doc/changes.
- The file states/initial.coq does not exist anymore. Instead, coqtop
initially does a "Require" of Prelude.vo (or nothing when given
the options -noinit or -nois).
- The format of vo files has slightly changed: cf final comments in
checker/cic.mli.
- The build system does not produce anymore programs named coqtop.opt
and a symbolic link to coqtop. Instead, coqtop is now directly
an executable compiled with the best OCaml compiler available.
The bytecode program coqtop.byte is still produced. Same for other
utilities.
- Some options of the ./configure script slightly changed:
* The -coqrunbyteflags and its blank-separated argument is replaced
by option -vmbyteflags which expects a comma-separated argument.
* The -coqtoolsbyteflags option is discontinued, see -no-custom instead.
Miscellaneous
- ML plugins now require a "DECLARE PLUGIN \"foo\"" statement. The "foo" name
must be exactly the name of the ML module that will be loaded through a
"Declare ML \"foo\"" command.
Changes from V8.4beta2 to V8.4
==============================
Vernacular commands
- The "Reset" command is now supported again in files given to coqc or Load.
- "Show Script" now indents again the displayed scripts. It can also work
correctly across Load'ed files if the option "Unset Atomic Load" is used.
- "Open Scope" can now be given the delimiter (e.g. Z) instead of the full
scope name (e.g. Z_scope).
Notations
- Most compatibility notations of the standard library are now tagged as
(compat xyz), where xyz is a former Coq version, for instance "8.3".
These notations behave as (only parsing) notations, except that they may
triggers warnings (or errors) when used while Coq is not in a corresponding
-compat mode.
- To activate these compatibility warnings, use "Set Verbose Compat Notations"
or the command-line flag -verbose-compat-notations.
- For a strict mode without these compatibility notations, use
"Unset Compat Notations" or the command-line flag -no-compat-notations.
Tactics
- An annotation "eqn:H" or "eqn:?" can be added to a "destruct"
or "induction" to make it generate equations in the spirit of "case_eq".
The former syntax "_eqn" is discontinued.
- The name of the hypothesis introduced by tactic "remember" can be
set via the new syntax "remember t as x eqn:H" (wish #2489).
Libraries
- Reals: changed definition of PI, no more axiom about sin(PI/2).
- SetoidPermutation: a notion of permutation for lists modulo a setoid equality.
- BigN: fixed the ocaml code doing the parsing/printing of big numbers.
- List: a couple of lemmas added especially about no-duplication, partitions.
- Init: Removal of the coercions between variants of sigma-types and
subset types (possible source of incompatibility).
Changes from V8.4beta to V8.4beta2
==================================
Vernacular commands
- Commands "Back" and "BackTo" are now handling the proof states. They may
perform some extra steps of backtrack to avoid states where the proof
state is unavailable (typically a closed proof).
- The commands "Suspend" and "Resume" have been removed.
- A basic Show Script has been reintroduced (no indentation).
- New command "Set Parsing Explicit" for deactivating parsing (and printing)
of implicit arguments (useful for teaching).
- New command "Grab Existential Variables" to transform the unresolved evars
at the end of a proof into goals.
Tactics
- Still no general "info" tactical, but new specific tactics info_auto,
info_eauto, info_trivial which provides information on the proofs found
by auto/eauto/trivial. Display of these details could also be activated by
"Set Info Auto"/"Set Info Eauto"/"Set Info Trivial".
- Details on everything tried by auto/eauto/trivial during a proof search
could be obtained by "debug auto", "debug eauto", "debug trivial" or by a
global "Set Debug Auto"/"Set Debug Eauto"/"Set Debug Trivial".
- New command "r string" in Ltac debugger that interprets "idtac
string" in Ltac code as a breakpoint and jumps to its next use.
- Tactics from the Dp plugin (simplify, ergo, yices, cvc3, z3, cvcl,
harvey, zenon, gwhy) have been removed, since Why2 has not been
maintained for the last few years. The Why3 plugin should be a suitable
replacement in most cases.
Libraries
- MSetRBT: a new implementation of MSets via Red-Black trees (initial
contribution by Andrew Appel).
- MSetAVL: for maximal sharing with the new MSetRBT, the argument order
of Node has changed (this should be transparent to regular MSets users).
Module System
- The names of modules (and module types) are now in a fully separated
namespace from ordinary definitions: "Definition E:=0. Module E. End E."
is now accepted.
CoqIDE
- Coqide now supports the "Restart" command, and "Undo" (with a warning).
Better support for "Abort".
Changes from V8.3 to V8.4beta
=============================
Logic
- Standard eta-conversion now supported (dependent product only).
- Guard condition improvement: subterm property is propagated through beta-redex
blocked by pattern-matching, as in "(match v with C .. => fun x => u end) x";
this allows for instance to use "rewrite ... in ..." without breaking
the guard condition.
Specification language and notations
- Maximal implicit arguments can now be set locally by { }. The registration
traverses fixpoints and lambdas. Because there is conversion in types,
maximal implicit arguments are not taken into account in partial
applications (use eta expanded form with explicit { } instead).
- Added support for recursive notations with binders (allows for instance
to write "exists x y z, P").
- Structure/Record printing can be disable by "Unset Printing Records".
In addition, it can be controlled on type by type basis using
"Add Printing Record" or "Add Printing Constructor".
- Pattern-matching compilation algorithm: in "match x, y with ... end",
possible dependencies of x (or of the indices of its type) in the type
of y are now taken into account.
Tactics
- New proof engine.
- Scripts can now be structured thanks to bullets - * + and to subgoal
delimitation via { }. Note: for use with Proof General, a cvs version of
Proof General no older than mid-July 2011 is currently required.
- Support for tactical "info" is suspended.
- Support for command "Show Script" is suspended.
- New tactics constr_eq, is_evar and has_evar for use in Ltac (DOC TODO).
- Removed the two-argument variant of "decide equality".
- New experimental tactical "timeout <n> <tac>". Since <n> is a time
in second for the moment, this feature should rather be avoided
in scripts meant to be machine-independent.
- Fix in "destruct": removal of unexpected local definitions in context might
result in some rare incompatibilities (solvable by adapting name hypotheses).
- Introduction pattern "_" made more robust.
- Tactic (and Eval command) vm_compute can now be interrupted via Ctrl-C.
- Unification in "apply" supports unification of patterns of the form
?f x y = g(x,y) (compatibility ensured by using
"Unset Tactic Pattern Unification"). It also supports (full) betaiota.
- Tactic autorewrite does no longer instantiate pre-existing
existential variables (theoretical source of possible incompatibilities).
- Tactic "dependent rewrite" now supports equality in "sig".
- Tactic omega now understands Zpred (wish #1912) and can prove any goal
from a context containing an arithmetical contradiction (wish #2236).
- Using "auto with nocore" disables the use of the "core" database (wish #2188).
This pseudo-database "nocore" can also be used with trivial and eauto.
- Tactics "set", "destruct" and "induction" accepts incomplete terms and
use the goal to complete the pattern assuming it is non ambiguous.
- When used on arguments with a dependent type, tactics such as
"destruct", "induction", "case", "elim", etc. now try to abstract
automatically the dependencies over the arguments of the types
(based on initial ideas from Chung-Kil Hur, extension to nested
dependencies suggested by Dan Grayson)
- Tactic "injection" now failing on an equality showing no constructors while
it was formerly generalizing again the goal over the given equality.
- In Ltac, the "context [...]" syntax has now a variant "appcontext [...]"
allowing to match partial applications in larger applications.
- When applying destruct or inversion on a fixpoint hiding an inductive
type, recursive calls to the fixpoint now remain folded by default (rare
source of incompatibility generally solvable by adding a call to simpl).
- In an ltac pattern containing a "match", a final "| _ => _" branch could be
used now instead of enumerating all remaining constructors. Moreover, the
pattern "match _ with _ => _ end" now allows to match any "match". A "in"
annotation can also be added to restrict to a precise inductive type.
- The behavior of "simpl" can be tuned using the "Arguments" vernacular.
In particular constants can be marked so that they are always/never unfolded
by "simpl", or unfolded only when a set of arguments evaluates to a
constructor. Last one can mark a constant so that it is unfolded only if the
simplified term does not expose a match in head position.
Vernacular commands
- It is now mandatory to have a space (or tabulation or newline or end-of-file)
after a "." ending a sentence.
- In SearchAbout, the [ ] delimiters are now optional.
- New command "Add/Remove Search Blacklist <substring> ...":
a Search or SearchAbout or similar query will never mention lemmas
whose qualified names contain any of the declared substrings.
The default blacklisted substrings are "_subproof" "Private_".
- When the output file of "Print Universes" ends in ".dot" or ".gv",
the universe graph is printed in the DOT language, and can be
processed by Graphviz tools.
- New command "Print Sorted Universes".
- The undocumented and obsolete option "Set/Unset Boxed Definitions" has
been removed, as well as syntaxes like "Boxed Fixpoint foo".
- A new option "Set Default Timeout n / Unset Default Timeout".
- Qed now uses information from the reduction tactics used in proof script
to avoid conversion at Qed time to go into a very long computation.
- New command "Show Goal ident" to display the statement of a goal, even
a closed one (available from Proof General).
- Command "Proof" accept a new modifier "using" to force generalization
over a given list of section variables at section ending (DOC TODO).
- New command "Arguments" generalizing "Implicit Arguments" and
"Arguments Scope" and that also allows to rename the parameters of a
definition and to tune the behavior of the tactic "simpl".
Module System
- During subtyping checks, an opaque constant in a module type could now
be implemented by anything of the right type, even if bodies differ.
Said otherwise, with respect to subtyping, an opaque constant behaves
just as a parameter. Coqchk was already implementing this, but not coqtop.
- The inlining done during application of functors can now be controlled
more precisely, by the annotations (no inline) or (inline at level XX).
With the latter annotation, only functor parameters whose levels
are lower or equal than XX will be inlined.
The level of a parameter can be fixed by "Parameter Inline(30) foo".
When levels aren't given, the default value is 100. One can also use
the flag "Set Inline Level ..." to set a level (DOC TODO).
- Print Assumptions should now handle correctly opaque modules (#2168).
- Print Module (Type) now tries to print more details, such as types and
bodies of the module elements. Note that Print Module Type could be
used on a module to display only its interface. The option
"Set Short Module Printing" could be used to switch back to the earlier
behavior were only field names were displayed.
Libraries
- Extension of the abstract part of Numbers, which now provide axiomatizations
and results about many more integer functions, such as pow, gcd, lcm, sqrt,
log2 and bitwise functions. These functions are implemented for nat, N, BigN,
Z, BigZ. See in particular file NPeano for new functions about nat.
- The definition of types positive, N, Z is now in file BinNums.v
- Major reorganization of ZArith. The initial file ZArith/BinInt.v now contains
an internal module Z implementing the Numbers interface for integers.
This module Z regroups:
* all functions over type Z : Z.add, Z.mul, ...
* the minimal proofs of specifications for these functions : Z.add_0_l, ...
* an instantation of all derived properties proved generically in Numbers :
Z.add_comm, Z.add_assoc, ...
A large part of ZArith is now simply compatibility notations, for instance
Zplus_comm is an alias for Z.add_comm. The direct use of module Z is now
recommended instead of relying on these compatibility notations.
- Similar major reorganization of NArith, via a module N in NArith/BinNat.v
- Concerning the positive datatype, BinPos.v is now in a specific directory
PArith, and contains an internal submodule Pos. We regroup there functions
such as Pos.add Pos.mul etc as well as many results about them. These results
are here proved directly (no Number interface for strictly positive numbers).
- Note that in spite of the compatibility layers, all these reorganizations
may induce some marginal incompatibilies in scripts. In particular:
* the "?=" notation for positive now refers to a binary function Pos.compare,
instead of the infamous ternary Pcompare (now Pos.compare_cont).
* some hypothesis names generated by the system may changed (typically for
a "destruct Z_le_gt_dec") since naming is done after the short name of
the head predicate (here now "le" in module Z instead of "Zle", etc).
* the internals of Z.add has changed, now relying of Z.pos_sub.
- Also note these new notations:
* "<?" "<=?" "=?" for boolean tests such as Z.ltb Z.leb Z.eqb.
* "÷" for the alternative integer division Z.quot implementing the Truncate
convention (former ZOdiv), while the notation for the Coq usual division
Z.div implementing the Flooring convention remains "/". Their corresponding
modulo functions are Z.rem (no notations) for Z.quot and Z.modulo (infix
"mod" notation) for Z.div.
- Lemmas about conversions between these datatypes are also organized
in modules, see for instance modules Z2Nat, N2Z, etc.
- When creating BigN, the macro-generated part NMake_gen is much smaller.
The generic part NMake has been reworked and improved. Some changes
may introduce incompatibilities. In particular, the order of the arguments
for BigN.shiftl and BigN.shiftr is now reversed: the number to shift now
comes first. By default, the power function now takes two BigN.
- Creation of Vector, an independent library for lists indexed by their length.
Vectors' names overwrite lists' one so you should not "Import" the library.
All old names changed: function names follow the ocaml ones and, for example,
Vcons becomes Vector.cons. You can get [..;..;..]-style notations by importing
Vector.VectorNotations.
- Removal of TheoryList. Requiring List instead should work most of the time.
- New syntax "rew Heq in H" and "rew <- Heq in H" for eq_rect and
eq_rect_r (available by importing module EqNotations).
- Wf.iter_nat is now Peano.nat_iter (with an implicit type argument).
Internal infrastructure
- Opaque proofs are now loaded lazily by default. This allows to be almost as
fast as -dont-load-proofs, while being safer (no creation of axioms) and
avoiding feature restrictions (Print and Print Assumptions work ok).
- Revised hash-consing code allowing more sharing of memory
- Experimental support added for camlp4 (the one provided alongside ocaml),
simply pass option -usecamlp4 to ./configure. By default camlp5 is used.
- Revised build system: no more stages in Makefile thanks to some recursive
aspect of recent gnu make, use of vo.itarget files containing .v to compile
for both make and ocamlbuild, etc.
- Support of cross-compilation via mingw from unix toward Windows,
contact P. Letouzey for more informations.
- New Makefile rules mli-doc to make html of mli in dev/doc/html and
full-stdlib to get a (huge) pdf reflecting the whole standard library.
Extraction
- By default, opaque terms are now truly considered opaque by extraction:
instead of accessing their body, they are now considered as axioms.
The previous behaviour can be reactivated via the option
"Set Extraction AccessOpaque".
- The pretty-printer for Haskell now produces layout-independant code
- A new command "Separate Extraction cst1 cst2 ..." that mixes a
minimal extracted environment a la "Recursive Extraction" and the
production of several files (one per coq source) a la "Extraction Library"
(DOC TODO).
- New option "Set/Unset Extraction KeepSingleton" for preventing the
extraction to optimize singleton container types (DOC TODO).
- The extraction now identifies and properly rejects a particular case of
universe polymorphism it cannot handle yet (the pair (I,I) being Prop).
- Support of anonymous fields in record (#2555).
CoqIDE
- Coqide now runs coqtop as separated process, making it more robust:
coqtop subprocess can be interrupted, or even killed and relaunched
(cf button "Restart Coq", ex-"Go to Start"). For allowing such
interrupts, the Windows version of coqide now requires Windows >= XP
SP1.
- The communication between CoqIDE and Coqtop is now done via a dialect
of XML (DOC TODO).
- The backtrack engine of CoqIDE has been reworked, it now uses the
"Backtrack" command similarly to Proof General.
- The Coqide parsing of sentences has be reworked and now supports
tactic delimitation via { }.
- Coqide now accepts the Abort command (wish #2357).
- Coqide can read coq_makefile files as "project file" and use it to
set automatically options to send to coqtop.
- Preference files have moved to $XDG_CONFIG_HOME/coq and accelerators
are not stored as a list anymore.
Tools
- Coq now searches directories specified in COQPATH, $XDG_DATA_HOME/coq,
$XDG_DATA_DIRS/coq, and user-contribs before the standard library.
- Coq rc file has moved to $XDG_CONFIG_HOME/coq.
- Major changes to coq_makefile:
* mli/mlpack/mllib taken into account, ml not preproccessed anymore, ml4 work;
* mlihtml generates doc of mli, install-doc install the html doc in DOCDIR
with the same policy as vo in COQLIB;
* More variables are given by coqtop -config, others are defined only if the
users doesn't have defined them elsewhere. Consequently, generated makefile
should work directly on any architecture;
* Packagers can take advantage of $(DSTROOT) introduction. Installation can
be made in $XDG_DATA_HOME/coq;
* -arg option allows to send option as argument to coqc.
Changes from V8.2 to V8.3
=========================
Rewriting tactics
- Tactic "rewrite" now supports rewriting on ad hoc equalities such as eq_true.
- "Hint Rewrite" now checks that the lemma looks like an equation.
- New tactic "etransitivity".
- Support for heterogeneous equality (JMeq) in "injection" and "discriminate".
- Tactic "subst" now supports heterogeneous equality and equality
proofs that are dependent (use "simple subst" for preserving compatibility).
- Added support for Leibniz-rewriting of dependent hypotheses.
- Renamed "Morphism" into "Proper" and "respect" into "proper_prf"
(possible source of incompatibility). A partial fix is to define
"Notation Morphism R f := (Proper (R%signature) f)."
- New tactic variants "rewrite* by" and "autorewrite*" that rewrite
respectively the first and all matches whose side-conditions are
solved.
- "Require Import Setoid" does not export all of "Morphisms" and
"RelationClasses" anymore (possible source of incompatibility, fixed
by importing "Morphisms" too).
- Support added for using Chung-Kil Hur's Heq library for rewriting over
heterogeneous equality (courtesy of the library's author).
- Tactic "replace" supports matching terms with holes.
Automation tactics
- Tactic "intuition" now preserves inner "iff" and "not" (exceptional
source of incompatibilities solvable by redefining "intuition" as
"unfold iff, not in *; intuition", or, for iff only, by using
"Set Intuition Iff Unfolding".)
- Tactic "tauto" now proves classical tautologies as soon as classical logic
(i.e. library Classical_Prop or Classical) is loaded.
- Tactic "gappa" has been removed from the Dp plugin.
- Tactic "firstorder" now supports the combination of its "using" and
"with" options.
- New "Hint Resolve ->" (or "<-") for declaring iff's as oriented
hints (wish #2104).
- An inductive type as argument of the "using" option of "auto/eauto/firstorder"
is interpreted as using the collection of its constructors.
- New decision tactic "nsatz" to prove polynomial equations
by computation of Groebner bases.
Other tactics
- Tactic "discriminate" now performs intros before trying to discriminate an
hypothesis of the goal (previously it applied intro only if the goal
had the form t1<>t2) (exceptional source of incompatibilities - former
behavior can be obtained by "Unset Discriminate Introduction").
- Tactic "quote" now supports quotation of arbitrary terms (not just the
goal).
- Tactic "idtac" now displays its "list" arguments.
- New introduction patterns "*" for introducing the next block of dependent
variables and "**" for introducing all quantified variables and hypotheses.
- Pattern Unification for existential variables activated in tactics and
new option "Unset Tactic Evars Pattern Unification" to deactivate it.
- Resolution of canonical structure is now part of the tactic's unification
algorithm.
- New tactic "decide lemma with hyp" for rewriting decidability lemmas
when one knows which side is true.
- Improved support of dependent goals over objects in dependent types for
"destruct" (rare source of incompatibility that can be avoided by unsetting
option "Dependent Propositions Elimination").
- Tactic "exists", "eexists", "destruct" and "edestruct" supports iteration
using comma-separated arguments.
- Tactic names "case" and "elim" now support clauses "as" and "in" and become
then synonymous of "destruct" and "induction" respectively.
- A new tactic name "exfalso" for the use of 'ex-falso quodlibet' principle.
This tactic is simply a shortcut for "elimtype False".
- Made quantified hypotheses get the name they would have if introduced in
the context (possible but rare source of incompatibilities).
- When applying a component of a conjunctive lemma, "apply in" (and
sequences of "apply in") now leave the side conditions of the lemmas
uniformly after the main goal (possible source of rare incompatibilities).
- In "simpl c" and "change c with d", c can be a pattern.
- Tactic "revert" now preserves let-in's making it the exact inverse of
"intro".
- New tactics "clear dependent H" and "revert dependent H" that
clears (resp. reverts) H and all the hypotheses that depend on H.
- Ltac's pattern-matching now supports matching metavariables that
depend on variables bound upwards in the pattern.
- New experimental option "Set Standard Proposition Elimination Names"
so that case analysis or induction on schemes in Type containing
propositions now produces "H"-based names.
Tactic definitions
- Ltac definitions support Local option for non-export outside modules.
- Support for parsing non-empty lists with separators in tactic notations.
- New command "Locate Ltac" to get the full name of an Ltac definition.
Notations
- Record syntax "{|x=...; y=...|}" now works inside patterns too.
- Abbreviations from non-imported module now invisible at printing time.
- Abbreviations now use implicit arguments and arguments scopes for printing.
- Abbreviations to pure names now strictly behave like the name they refer to
(make redirections of qualified names easier).
- Abbreviations for applied constant now propagate the implicit arguments
and arguments scope of the underlying reference (possible source of
incompatibilities generally solvable by changing such abbreviations from
e.g. "Notation foo' := (foo x)" to "Notation foo' y := (foo x (y:=y))").
- The "where" clause now supports multiple notations per defined object.
- Recursive notations automatically expand one step on the left for better
factorization; recursion notations inner separators now ensured being tokens.
- Added "Reserved Infix" as a specific shortcut of the corresponding
"Reserved Notation".
- Open/Close Scope command supports Global option in sections.
Specification language
- New support for local binders in the syntax of Record/Structure fields.
- Fixpoint/CoFixpoint now support building part or all of bodies using tactics.
- Binders given before ":" in lemmas and in definitions built by tactics are
now automatically introduced (possible source of incompatibility that can
be resolved by invoking "Unset Automatic Introduction").
- New support for multiple implicit arguments signatures per reference.
Module system
- Include Type is now deprecated since Include now accept both modules and
module types.
- Declare ML Module supports Local option.
- The sharing between non-logical object and the management of the
name-space has been improved by the new "Delta-equivalence" on
qualified name.
- The include operator has been extended to high-order structures
- Sequences of Include can be abbreviated via new syntax "<+".
- A module (or module type) can be given several "<:" signatures.
- Interactive proofs are now permitted in module type. Functors can hence
be declared as Module Type and be used later to type themselves.
- A functor application can be prefixed by a "!" to make it ignore any
"Inline" annotation in the type of its argument(s) (for examples of
use of the new features, see libraries Structures and Numbers).
- Coercions are now active only when modules are imported (use "Set Automatic
Coercions Import" to get the behavior of the previous versions of Coq).
Extraction
- When using (Recursive) Extraction Library, the filenames are directly the
Coq ones with new appropriate extensions : we do not force anymore
uncapital first letters for Ocaml and capital ones for Haskell.
- The extraction now tries harder to avoid code transformations that can be
dangerous for the complexity. In particular many eta-expansions at the top
of functions body are now avoided, clever partial applications will likely
be preserved, let-ins are almost always kept, etc.
- In the same spirit, auto-inlining is now disabled by default, except for
induction principles, since this feature was producing more frequently
weird code than clear gain. The previous behavior can be restored via
"Set Extraction AutoInline".
- Unicode characters in identifiers are now transformed into ascii strings
that are legal in Ocaml and other languages.
- Harsh support of module extraction to Haskell and Scheme: module hierarchy
is flattened, module abbreviations and functor applications are expanded,
module types and unapplied functors are discarded.
- Less unsupported situations when extracting modules to Ocaml. In particular
module parameters might be alpha-renamed if a name clash is detected.
- Extract Inductive is now possible toward non-inductive types (e.g. nat => int)
- Extraction Implicit: this new experimental command allows to mark
some arguments of a function or constructor for removed during
extraction, even if these arguments don't fit the usual elimination
principles of extraction, for instance the length n of a vector.
- Files ExtrOcaml*.v in plugins/extraction try to provide a library of common
extraction commands: mapping of basics types toward Ocaml's counterparts,
conversions from/to int and big_int, or even complete mapping of nat,Z,N
to int or big_int, or mapping of ascii to char and string to char list
(in this case recognition of ascii constants is hard-wired in the extraction).
Program
- Streamlined definitions using well-founded recursion and measures so
that they can work on any subset of the arguments directly (uses currying).
- Try to automatically clear structural fixpoint prototypes in
obligations to avoid issues with opacity.
- Use return type clause inference in pattern-matching as in the standard
typing algorithm.
- Support [Local Obligation Tactic] and [Next Obligation with tactic].
- Use [Show Obligation Tactic] to print the current default tactic.
- [fst] and [snd] have maximal implicit arguments in Program now (possible
source of incompatibility).
Type classes
- Declaring axiomatic type class instances in Module Type should be now
done via new command "Declare Instance", while the syntax "Instance"
now always provides a concrete instance, both in and out of Module Type.
- Use [Existing Class foo] to declare foo as a class a posteriori.
[foo] can be an inductive type or a constant definition. No
projections or instances are defined.
- Various bug fixes and improvements: support for defined fields,
anonymous instances, declarations giving terms, better handling of
sections and [Context].
Vernacular commands
- New command "Timeout <n> <command>." interprets a command and a timeout
interrupts the interpretation after <n> seconds.
- New command "Compute <expr>." is a shortcut for "Eval vm_compute in <expr>".
- New command "Fail <command>." interprets a command and is successful iff
the command fails on an error (but not an anomaly). Handy for tests and
illustration of wrong commands.
- Most commands referring to constant (e.g. Print or About) now support
referring to the constant by a notation string.
- New option "Boolean Equality Schemes" to make generation of boolean
equality automatic for datatypes (together with option "Decidable
Equality Schemes", this replaces deprecated option "Equality Scheme").
- Made support for automatic generation of case analysis schemes available
to user (governed by option "Set Case Analysis Schemes").
- New command "(Global?) Generalizable [All|No] Variable(s)? ident(s)?" to
declare which identifiers are generalizable in `{} and `() binders.
- New command "Print Opaque Dependencies" to display opaque constants in
addition to all variables, parameters or axioms a theorem or
definition relies on.
- New command "Declare Reduction <id> := <conv_expr>", allowing to write
later "Eval <id> in ...". This command accepts a Local variant.
- Syntax of Implicit Type now supports more than one block of variables of
a given type.
- Command "Canonical Structure" now warns when it has no effects.
- Commands of the form "Set X" or "Unset X" now support "Local" and "Global"
prefixes.
Library
- Use "standard" Coq names for the properties of eq and identity
(e.g. refl_equal is now eq_refl). Support for compatibility is provided.
- The function Compare_dec.nat_compare is now defined directly,
instead of relying on lt_eq_lt_dec. The earlier version is still
available under the name nat_compare_alt.
- Lemmas in library Relations and Reals have been homogenized a bit.
- The implicit argument of Logic.eq is now maximally inserted, allowing
to simply write "eq" instead of "@eq _" in morphism signatures.
- Wrongly named lemmas (Zlt_gt_succ and Zlt_succ_gt) fixed (potential source
of incompatibilities)
- List library:
- Definitions of list, length and app are now in Init/Datatypes.
Support for compatibility is provided.
- Definition of Permutation is now in Sorting/Permtation.v
- Some other light revisions and extensions (possible source
of incompatibilities solvable by qualifying names accordingly).
- In ListSet, set_map has been fixed (source of incompatibilities if used).
- Sorting library:
- new mergesort of worst-case complexity O(n*ln(n)) made available in
Mergesort.v;
- former notion of permutation up to setoid from Permutation.v is
deprecated and moved to PermutSetoid.v;
- heapsort from Heap.v of worst-case complexity O(n*n) is deprecated;
- new file Sorted.v for some definitions of being sorted.
- Structure library. This new library is meant to contain generic
structures such as types with equalities or orders, either
in Module version (for now) or Type Classes (still to do):
- DecidableType.v and OrderedType.v: initial notions for FSets/FMaps,
left for compatibility but considered as deprecated.
- Equalities.v and Orders.v: evolutions of the previous files,
with fine-grain Module architecture, many variants, use of
Equivalence and other relevant Type Classes notions.
- OrdersTac.v: a generic tactic for solving chains of (in)equalities
over variables. See {Nat,N,Z,P}OrderedType.v for concrete instances.
- GenericMinMax.v: any ordered type can be equipped with min and max.
We derived here all the generic properties of these functions.
- MSets library: an important evolution of the FSets library.
"MSets" stands for Modular (Finite) Sets, by contrast with a forthcoming
library of Class (Finite) Sets contributed by S. Lescuyer which will be
integrated with the next release of Coq. The main features of MSets are:
- The use of Equivalence, Proper and other Type Classes features
easing the handling of setoid equalities.
- The interfaces are now stated in iff-style. Old specifications
are now derived properties.
- The compare functions are now pure, and return a "comparison" value.
Thanks to the CompSpec inductive type, reasoning on them remains easy.
- Sets structures requiring invariants (i.e. sorted lists) are
built first as "Raw" sets (pure objects and separate proofs) and
attached with their proofs thanks to a generic functor. "Raw" sets
have now a proper interface and can be manipulated directly.
Note: No Maps yet in MSets. The FSets library is still provided
for compatibility, but will probably be considered as deprecated in the
next release of Coq.
- Numbers library:
- The abstract layer (NatInt, Natural/Abstract, Integer/Abstract) has
been simplified and enhance thanks to new features of the module
system such as Include (see above). It has been extended to Euclidean
division (three flavors for integers: Trunc, Floor and Math).
- The arbitrary-large efficient numbers (BigN, BigZ, BigQ) has also
been reworked. They benefit from the abstract layer improvements
(especially for div and mod). Note that some specifications have
slightly changed (compare, div, mod, shift{r,l}). Ring/Field should
work better (true recognition of constants).
Tools
- Option -R now supports binding Coq root read-only.
- New coqtop/coqc option -beautify to reformat .v files (usable
e.g. to globally update notations).
- New tool beautify-archive to beautify a full archive of developments.
- New coqtop/coqc option -compat X.Y to simulate the general behavior
of previous versions of Coq (provides e.g. support for 8.2 compatibility).
Coqdoc
- List have been revamped. List depth and scope is now determined by
an "offside" whitespace rule.
- Text may be italicized by placing it in _underscores_.
- The "--index <string>" flag changes the filename of the index.
- The "--toc-depth <int>" flag limits the depth of headers which are
included in the table of contents.
- The "--lib-name <string>" flag prints "<string> Foo" instead of
"Library Foo" where library titles are called for. The
"--no-lib-name" flag eliminates the extra title.
- New option "--parse-comments" to allow parsing of regular "(* *)"
comments.
- New option "--plain-comments" to disable interpretation inside comments.
- New option "--interpolate" to try and typeset identifiers in Coq escapings
using the available globalization information.
- New option "--external url root" to refer to external libraries.
- Links to section variables and notations now supported.
Internal infrastructure
- To avoid confusion with the repository of user's contributions,
the subdirectory "contrib" has been renamed into "plugins".
On platforms supporting ocaml native dynlink, code located there
is built as loadable plugins for coqtop.
- An experimental build mechanism via ocamlbuild is provided.
From the top of the archive, run ./configure as usual, and
then ./build. Feedback about this build mechanism is most welcome.
Compiling Coq on platforms such as Windows might be simpler
this way, but this remains to be tested.
- The Makefile system has been simplified and factorized with
the ocamlbuild system. In particular "make" takes advantage
of .mllib files for building .cma/.cmxa. The .vo files to
compile are now listed in several vo.itarget files.
Changes from V8.1 to V8.2
=========================
Language
- If a fixpoint is not written with an explicit { struct ... }, then
all arguments are tried successively (from left to right) until one is
found that satisfies the structural decreasing condition.
- New experimental typeclass system giving ad-hoc polymorphism and
overloading based on dependent records and implicit arguments.
- New syntax "let 'pat := b in c" for let-binding using irrefutable patterns.
- New syntax "forall {A}, T" for specifying maximally inserted implicit
arguments in terms.
- Sort of Record/Structure, Inductive and CoInductive defaults to Type
if omitted.
- (Co)Inductive types can be defined as records
(e.g. "CoInductive stream := { hd : nat; tl : stream }.")
- New syntax "Theorem id1:t1 ... with idn:tn" for proving mutually dependent
statements.
- Support for sort-polymorphism on constants denoting inductive types.
- Several evolutions of the module system (handling of module aliases,
functorial module types, an Include feature, etc).
- Prop now a subtype of Set (predicative and impredicative forms).
- Recursive inductive types in Prop with a single constructor of which
all arguments are in Prop is now considered to be a singleton
type. It consequently supports all eliminations to Prop, Set and Type.
As a consequence, Acc_rect has now a more direct proof [possible source
of easily fixed incompatibility in case of manual definition of a recursor
in a recursive singleton inductive type].
Vernacular commands
- Added option Global to "Arguments Scope" for section surviving.
- Added option "Unset Elimination Schemes" to deactivate the automatic
generation of elimination schemes.
- Modification of the Scheme command so you can ask for the name to be
automatically computed (e.g. Scheme Induction for nat Sort Set).
- New command "Combined Scheme" to build combined mutual induction
principles from existing mutual induction principles.
- New command "Scheme Equality" to build a decidable (boolean) equality
for simple inductive datatypes and a decision property over this equality
(e.g. Scheme Equality for nat).
- Added option "Set Equality Scheme" to make automatic the declaration
of the boolean equality when possible.
- Source of universe inconsistencies now printed when option
"Set Printing Universes" is activated.
- New option "Set Printing Existential Instances" for making the display of
existential variable instances explicit.
- Support for option "[id1 ... idn]", and "-[id1 ... idn]", for the
"compute"/"cbv" reduction strategy, respectively meaning reduce only, or
everything but, the constants id1 ... idn. "lazy" alone or followed by
"[id1 ... idn]", and "-[id1 ... idn]" also supported, meaning apply
all of beta-iota-zeta-delta, possibly restricting delta.
- New command "Strategy" to control the expansion of constants during
conversion tests. It generalizes commands Opaque and Transparent by
introducing a range of levels. Lower levels are assigned to constants
that should be expanded first.
- New options Global and Local to Opaque and Transparent.
- New command "Print Assumptions" to display all variables, parameters
or axioms a theorem or definition relies on.
- "Add Rec LoadPath" now provides references to libraries using partially
qualified names (this holds also for coqtop/coqc option -R).
- SearchAbout supports negated search criteria, reference to logical objects
by their notation, and more generally search of subterms.
- "Declare ML Module" now allows to import .cmxs files when Coq is
compiled in native code with a version of OCaml that supports native
Dynlink (>= 3.11).
- Specific sort constraints on Record now taken into account.
- "Print LoadPath" supports a path argument to filter the display.
Libraries
- Several parts of the libraries are now in Type, in particular FSets,
SetoidList, ListSet, Sorting, Zmisc. This may induce a few
incompatibilities. In case of trouble while fixing existing development,
it may help to simply declare Set as an alias for Type (see file
SetIsType).
- New arithmetical library in theories/Numbers. It contains:
* an abstract modular development of natural and integer arithmetics
in Numbers/Natural/Abstract and Numbers/Integer/Abstract
* an implementation of efficient computational bounded and unbounded
integers that can be mapped to processor native arithmetics.
See Numbers/Cyclic/Int31 for 31-bit integers and Numbers/Natural/BigN
for unbounded natural numbers and Numbers/Integer/BigZ for unbounded
integers.
* some proofs that both older libraries Arith, ZArith and NArith and
newer BigN and BigZ implement the abstract modular development.
This allows in particular BigN and BigZ to already come with a
large database of basic lemmas and some generic tactics (ring),
This library has still an experimental status, as well as the
processor-acceleration mechanism, but both its abstract and its
concrete parts are already quite usable and could challenge the use
of nat, N and Z in actual developments. Moreover, an extension of
this framework to rational numbers is ongoing, and an efficient
Q structure is already provided (see Numbers/Rational/BigQ), but
this part is currently incomplete (no abstract layer and generic
lemmas).
- Many changes in FSets/FMaps. In practice, compatibility with earlier
version should be fairly good, but some adaptations may be required.
* Interfaces of unordered ("weak") and ordered sets have been factorized
thanks to new features of Coq modules (in particular Include), see
FSetInterface. Same for maps. Hints in these interfaces have been
reworked (they are now placed in a "set" database).
* To allow full subtyping between weak and ordered sets, a field
"eq_dec" has been added to OrderedType. The old version of OrderedType
is now called MiniOrderedType and functor MOT_to_OT allow to
convert to the new version. The interfaces and implementations
of sets now contain also such a "eq_dec" field.
* FSetDecide, contributed by Aaron Bohannon, contains a decision
procedure allowing to solve basic set-related goals (for instance,
is a point in a particular set ?). See FSetProperties for examples.
* Functors of properties have been improved, especially the ones about
maps, that now propose some induction principles. Some properties
of fold need less hypothesis.
* More uniformity in implementations of sets and maps: they all use
implicit arguments, and no longer export unnecessary scopes (see
bug #1347)
* Internal parts of the implementations based on AVL have evolved a
lot. The main files FSetAVL and FMapAVL are now much more
lightweight now. In particular, minor changes in some functions
has allowed to fully separate the proofs of operational
correctness from the proofs of well-balancing: well-balancing is
critical for efficiency, but not anymore for proving that these
trees implement our interfaces, hence we have moved these proofs
into appendix files FSetFullAVL and FMapFullAVL. Moreover, a few
functions like union and compare have been modified in order to be
structural yet efficient. The appendix files also contains
alternative versions of these few functions, much closer to the
initial Ocaml code and written via the Function framework.
- Library IntMap, subsumed by FSets/FMaps, has been removed from
Coq Standard Library and moved into a user contribution Cachan/IntMap
- Better computational behavior of some constants (eq_nat_dec and
le_lt_dec more efficient, Z_lt_le_dec and Positive_as_OT.compare
transparent, ...) (exceptional source of incompatibilities).
- Boolean operators moved from module Bool to module Datatypes (may need
to rename qualified references in script and force notations || and &&
to be at levels 50 and 40 respectively).
- The constructors xI and xO of type positive now have postfix notations
"~1" and "~0", allowing to write numbers in binary form easily, for instance
6 is 1~1~0 and 4*p is p~0~0 (see BinPos.v).
- Improvements to NArith (Nminus, Nmin, Nmax), and to QArith (in particular
a better power function).
- Changes in ZArith: several additional lemmas (used in theories/Numbers),
especially in Zdiv, Znumtheory, Zpower. Moreover, many results in
Zdiv have been generalized: the divisor may simply be non-null
instead of strictly positive (see lemmas with name ending by
"_full"). An alternative file ZOdiv proposes a different behavior
(the one of Ocaml) when dividing by negative numbers.
- Changes in Arith: EqNat and Wf_nat now exported from Arith, some
constructions on nat that were outside Arith are now in (e.g. iter_nat).
- In SetoidList, eqlistA now expresses that two lists have similar elements
at the same position, while the predicate previously called eqlistA
is now equivlistA (this one only states that the lists contain the same
elements, nothing more).
- Changes in Reals:
* Most statement in "sigT" (including the
completeness axiom) are now in "sig" (in case of incompatibility,
use proj1_sig instead of projT1, sig instead of sigT, etc).
* More uniform naming scheme (identifiers in French moved to English,
consistent use of 0 -- zero -- instead of O -- letter O --, etc).
* Lemma on prod_f_SO is now on prod_f_R0.
* Useless hypothesis of ln_exists1 dropped.
* New Rlogic.v states a few logical properties about R axioms.
* RIneq.v extended and made cleaner.
- Slight restructuration of the Logic library regarding choice and classical
logic. Addition of files providing intuitionistic axiomatizations of
descriptions: Epsilon.v, Description.v and IndefiniteDescription.v.
- Definition of pred and minus made compatible with the structural
decreasing criterion for use in fixpoints.
- Files Relations/Rstar.v and Relations/Newman.v moved out to the user
contribution repository (contribution CoC_History). New lemmas about
transitive closure added and some bound variables renamed (exceptional
risk of incompatibilities).
- Syntax for binders in terms (e.g. for "exists") supports anonymous names.
Notations, coercions, implicit arguments and type inference
- More automation in the inference of the return clause of dependent
pattern-matching problems.
- Experimental allowance for omission of the clauses easily detectable as
impossible in pattern-matching problems.
- Improved inference of implicit arguments.
- New options "Set Maximal Implicit Insertion", "Set Reversible Pattern
Implicit", "Set Strongly Strict Implicit" and "Set Printing Implicit
Defensive" for controlling inference and use of implicit arguments.
- New modifier in "Implicit Arguments" to force an implicit argument to
be maximally inserted.
- New modifier of "Implicit Arguments" to enrich the set of implicit arguments.
- New options Global and Local to "Implicit Arguments" for section
surviving or non export outside module.
- Level "constr" moved from 9 to 8.
- Structure/Record now printed as Record (unless option Printing All is set).
- Support for parametric notations defining constants.
- Insertion of coercions below product types refrains to unfold
constants (possible source of incompatibility).
- New support for fix/cofix in notations.
Tactic Language
- Second-order pattern-matching now working in Ltac "match" clauses
(syntax for second-order unification variable is "@?X").
- Support for matching on let bindings in match context using syntax
"H := body" or "H := body : type".
- Ltac accepts integer arguments (syntax is "ltac:nnn" for nnn an integer).
- The general sequence tactical "expr_0 ; [ expr_1 | ... | expr_n ]"
is extended so that at most one expr_i may have the form "expr .."
or just "..". Also, n can be different from the number of subgoals
generated by expr_0. In this case, the value of expr (or idtac in
case of just "..") is applied to the intermediate subgoals to make
the number of tactics equal to the number of subgoals.
- A name used as the name of the parameter of a lemma (like f in
"apply f_equal with (f:=t)") is now interpreted as a ltac variable
if such a variable exists (this is a possible source of
incompatibility and it can be fixed by renaming the variables of a
ltac function into names that do not clash with the lemmas
parameter names used in the tactic).
- New syntax "Ltac tac ::= ..." to rebind a tactic to a new expression.
- "let rec ... in ... " now supported for expressions without explicit
parameters; interpretation is lazy to the contrary of "let ... in ...";
hence, the "rec" keyword can be used to turn the argument of a
"let ... in ..." into a lazy one.
- Patterns for hypotheses types in "match goal" are now interpreted in
type_scope.
- A bound variable whose name is not used elsewhere now serves as
metavariable in "match" and it gets instantiated by an identifier
(allow e.g. to extract the name of a statement like "exists x, P x").
- New printing of Ltac call trace for better debugging.
Tactics
- New tactics "apply -> term", "apply <- term", "apply -> term in
ident", "apply <- term in ident" for applying equivalences (iff).
- Slight improvement of the hnf and simpl tactics when applied on
expressions with explicit occurrences of match or fix.
- New tactics "eapply in", "erewrite", "erewrite in".
- New tactics "ediscriminate", "einjection", "esimplify_eq".
- Tactics "discriminate", "injection", "simplify_eq" now support any
term as argument. Clause "with" is also supported.
- Unfoldable references can be given by notation's string rather than by name
in unfold.
- The "with" arguments are now typed using informations from the current goal:
allows support for coercions and more inference of implicit arguments.
- Application of "f_equal"-style lemmas works better.
- Tactics elim, case, destruct and induction now support variants eelim,
ecase, edestruct and einduction.
- Tactics destruct and induction now support the "with" option and the
"in" clause option. If the option "in" is used, an equality is added
to remember the term to which the induction or case analysis applied
(possible source of parsing incompatibilities when destruct or induction is
part of a let-in expression in Ltac; extra parentheses are then required).
- New support for "as" clause in tactics "apply in" and "eapply in".
- Some new intro patterns:
* intro pattern "?A" genererates a fresh name based on A.
Caveat about a slight loss of compatibility:
Some intro patterns don't need space between them. In particular
intros ?a?b used to be legal and equivalent to intros ? a ? b. Now it
is still legal but equivalent to intros ?a ?b.
* intro pattern "(A & ... & Y & Z)" synonym to "(A,....,(Y,Z)))))"
for right-associative constructs like /\ or exists.
- Several syntax extensions concerning "rewrite":
* "rewrite A,B,C" can be used to rewrite A, then B, then C. These rewrites
occur only on the first subgoal: in particular, side-conditions of the
"rewrite A" are not concerned by the "rewrite B,C".
* "rewrite A by tac" allows to apply tac on all side-conditions generated by
the "rewrite A".
* "rewrite A at n" allows to select occurrences to rewrite: rewrite only
happen at the n-th exact occurrence of the first successful matching of
A in the goal.
* "rewrite 3 A" or "rewrite 3!A" is equivalent to "rewrite A,A,A".
* "rewrite !A" means rewriting A as long as possible (and at least once).
* "rewrite 3?A" means rewriting A at most three times.
* "rewrite ?A" means rewriting A as long as possible (possibly never).
* many of the above extensions can be combined with each other.
- Introduction patterns better respect the structure of context in presence of
missing or extra names in nested disjunction-conjunction patterns [possible
source of rare incompatibilities].
- New syntax "rename a into b, c into d" for "rename a into b; rename c into d"
- New tactics "dependent induction/destruction H [ generalizing id_1 .. id_n ]"
to do induction-inversion on instantiated inductive families à la BasicElim.
- Tactics "apply" and "apply in" now able to reason modulo unfolding of
constants (possible source of incompatibility in situations where apply
may fail, e.g. as argument of a try or a repeat and in a ltac function);
versions that do not unfold are renamed into "simple apply" and
"simple apply in" (usable for compatibility or for automation).
- Tactics "apply" and "apply in" now able to traverse conjunctions and to
select the first matching lemma among the components of the conjunction;
tactic "apply" also able to apply lemmas of conclusion an empty type.
- Tactic "apply" now supports application of several lemmas in a row.
- Tactics "set" and "pose" can set functions using notation "(f x1..xn := c)".
- New tactic "instantiate" (without argument).
- Tactic firstorder "with" and "using" options have their meaning swapped for
consistency with auto/eauto (source of incompatibility).
- Tactic "generalize" now supports "at" options to specify occurrences
and "as" options to name the quantified hypotheses.
- New tactic "specialize H with a" or "specialize (H a)" allows to transform
in-place a universally-quantified hypothesis (H : forall x, T x) into its
instantiated form (H : T a). Nota: "specialize" was in fact there in earlier
versions of Coq, but was undocumented, and had a slightly different behavior.
- New tactic "contradict H" can be used to solve any kind of goal as long as
the user can provide afterwards a proof of the negation of the hypothesis H.
If H is already a negation, say ~T, then a proof of T is asked.
If the current goal is a negation, say ~U, then U is saved in H afterwards,
hence this new tactic "contradict" extends earlier tactic "swap", which is
now obsolete.
- Tactics f_equal is now done in ML instead of Ltac: it now works on any
equality of functions, regardless of the arity of the function.
- New options "before id", "at top", "at bottom" for tactics "move"/"intro".
- Some more debug of reflexive omega (romega), and internal clarifications.
Moreover, romega now has a variant "romega with *" that can be also used
on non-Z goals (nat, N, positive) via a call to a translation tactic named
zify (its purpose is to Z-ify your goal...). This zify may also be used
independantly of romega.
- Tactic "remember" now supports an "in" clause to remember only selected
occurrences of a term.
- Tactic "pose proof" supports name overwriting in case of specialization of an
hypothesis.
- Semi-decision tactic "jp" for first-order intuitionistic logic moved to user
contributions (subsumed by "firstorder").
Program
- Moved useful tactics in theories/Program and documented them.
- Add Program.Basics which contains standard definitions for functional
programming (id, apply, flip...)
- More robust obligation handling, dependent pattern-matching and
well-founded definitions.
- New syntax " dest term as pat in term " for destructing objects using
an irrefutable pattern while keeping equalities (use this instead of
"let" in Programs).
- Program CoFixpoint is accepted, Program Fixpoint uses the new way to infer
which argument decreases structurally.
- Program Lemma, Axiom etc... now permit to have obligations in the statement
iff they can be automatically solved by the default tactic.
- Renamed "Obligations Tactic" command to "Obligation Tactic".
- New command "Preterm [ of id ]" to see the actual term fed to Coq for
debugging purposes.
- New option "Transparent Obligations" to control the declaration of
obligations as transparent or opaque. All obligations are now transparent
by default, otherwise the system declares them opaque if possible.
- Changed the notations "left" and "right" to "in_left" and "in_right" to hide
the proofs in standard disjunctions, to avoid breaking existing scripts when
importing Program. Also, put them in program_scope.
Type Classes
- New "Class", "Instance" and "Program Instance" commands to define
classes and instances documented in the reference manual.
- New binding construct " [ Class_1 param_1 .. param_n, Class_2 ... ] "
for binding type classes, usable everywhere.
- New command " Print Classes " and " Print Instances some_class " to
print tables for typeclasses.
- New default eauto hint database "typeclass_instances" used by the default
typeclass instance search tactic.
- New theories directory "theories/Classes" for standard typeclasses
declarations. Module Classes.RelationClasses is a typeclass port of
Relation_Definitions plus a generic development of algebra on
n-ary heterogeneous predicates.
Setoid rewriting
- Complete (and still experimental) rewrite of the tactic
based on typeclasses. The old interface and semantics are
almost entirely respected, except:
- Import Setoid is now mandatory to be able to call setoid_replace
and declare morphisms.
- "-->", "++>" and "==>" are now right associative notations
declared at level 55 in scope signature_scope.
Their introduction may break existing scripts that defined
them as notations with different levels.
- One needs to use [Typeclasses unfold [cst]] if [cst] is used
as an abbreviation hiding products in types of morphisms,
e.g. if ones redefines [relation] and declares morphisms
whose type mentions [relation].
- The [setoid_rewrite]'s semantics change when rewriting with
a lemma: it can rewrite two different instantiations of the lemma
at once. Use [setoid_rewrite H at 1] for (almost) the usual semantics.
[setoid_rewrite] will also try to rewrite under binders now, and can
succeed on different terms than before. In particular, it will unify under
let-bound variables. When called through [rewrite], the semantics are
unchanged though.
- [Add Morphism term : id] has different semantics when used with
parametric morphism: it will try to find a relation on the parameters
too. The behavior has also changed with respect to default relations:
the most recently declared Setoid/Relation will be used, the documentation
explains how to customize this behavior.
- Parametric Relation and Morphism are declared differently, using the
new [Add Parametric] commands, documented in the manual.
- Setoid_Theory is now an alias to Equivalence, scripts building objects
of type Setoid_Theory need to unfold (or "red") the definitions
of Reflexive, Symmetric and Transitive in order to get the same goals
as before. Scripts which introduced variables explicitely will not break.
- The order of subgoals when doing [setoid_rewrite] with side-conditions
is always the same: first the new goal, then the conditions.
- New standard library modules Classes.Morphisms declares
standard morphisms on refl/sym/trans relations.
Classes.Morphisms_Prop declares morphisms on propositional
connectives and Classes.Morphisms_Relations on generalized predicate
connectives. Classes.Equivalence declares notations and tactics
related to equivalences and Classes.SetoidTactics defines the
setoid_replace tactics and some support for the "Add *" interface,
notably the tactic applied automatically before each "Add Morphism"
proof.
- User-defined subrelations are supported, as well as higher-order morphisms
and rewriting under binders. The tactic is also extensible entirely in Ltac.
The documentation has been updated to cover these features.
- [setoid_rewrite] and [rewrite] now support the [at] modifier to select
occurrences to rewrite, and both use the [setoid_rewrite] code, even when
rewriting with leibniz equality if occurrences are specified.
Extraction
- Improved behavior of the Caml extraction of modules: name clashes should
not happen anymore.
- The command Extract Inductive has now a syntax for infix notations. This
allows in particular to map Coq lists and pairs onto Caml ones:
Extract Inductive list => list [ "[]" "(::)" ].
Extract Inductive prod => "(*)" [ "(,)" ].
- In pattern matchings, a default pattern "| _ -> ..." is now used whenever
possible if several branches are identical. For instance, functions
corresponding to decidability of equalities are now linear instead of
quadratic.
- A new instruction Extraction Blacklist id1 .. idn allows to prevent filename
conflits with existing code, for instance when extracting module List
to Ocaml.
CoqIDE
- CoqIDE font defaults to monospace so as indentation to be meaningful.
- CoqIDE supports nested goals and any other kind of declaration in the middle
of a proof.
- Undoing non-tactic commands in CoqIDE works faster.
- New CoqIDE menu for activating display of various implicit informations.
- Added the possibility to choose the location of tabs in coqide:
(in Edit->Preferences->Misc)
- New Open and Save As dialogs in CoqIDE which filter *.v files.
Tools
- New stand-alone .vo files verifier "coqchk".
- Extended -I coqtop/coqc option to specify a logical dir: "-I dir -as coqdir".
- New coqtop/coqc option -exclude-dir to exclude subdirs for option -R.
- The binary "parser" has been renamed to "coq-parser".
- Improved coqdoc and dump of globalization information to give more
meta-information on identifiers. All categories of Coq definitions are
supported, which makes typesetting trivial in the generated documentation.
Support for hyperlinking and indexing developments in the tex output
has been implemented as well.
Miscellaneous
- Coq installation provides enough files so that Ocaml's extensions need not
the Coq sources to be compiled (this assumes O'Caml 3.10 and Camlp5).
- New commands "Set Whelp Server" and "Set Whelp Getter" to customize the
Whelp search tool.
- Syntax of "Test Printing Let ref" and "Test Printing If ref" changed into
"Test Printing Let for ref" and "Test Printing If for ref".
- An overhauled build system (new Makefiles); see dev/doc/build-system.txt.
- Add -browser option to configure script.
- Build a shared library for the C part of Coq, and use it by default on
non-(Windows or MacOS) systems. Bytecode executables are now pure. The
behaviour is configurable with -coqrunbyteflags, -coqtoolsbyteflags and
-custom configure options.
- Complexity tests can be skipped by setting the environment variable
COQTEST_SKIPCOMPLEXITY.
Changes from V8.1gamma to V8.1
==============================
Bug fixes
- Many bugs have been fixed (cf coq-bugs web page)
Tactics
- New tactics ring, ring_simplify and new tactic field now able to manage
power to a positive integer constant. Tactic ring on Z and R, and
field on R manage power (may lead to incompatibilities with V8.1gamma).
- Tactic field_simplify now applicable in hypotheses.
- New field_simplify_eq for simplifying field equations into ring equations.
- Tactics ring, ring_simplify, field, field_simplify and field_simplify_eq
all able to apply user-given equations to rewrite monoms on the fly
(see documentation).
Libraries
- New file ConstructiveEpsilon.v defining an epsilon operator and
proving the axiom of choice constructively for a countable domain
and a decidable predicate.
Changes from V8.1beta to V8.1gamma
==================================
Syntax
- changed parsing precedence of let/in and fun constructions of Ltac:
let x := t in e1; e2 is now parsed as let x := t in (e1;e2).
Language and commands
- Added sort-polymorphism for definitions in Type (but finally abandonned).
- Support for implicit arguments in the types of parameters in
(co-)fixpoints and (co-)inductive declarations.
- Improved type inference: use as much of possible general information.
before applying irreversible unification heuristics (allow e.g. to
infer the predicate in "(exist _ 0 (refl_equal 0) : {n:nat | n=0 })").
- Support for Miller-Pfenning's patterns unification in type synthesis
(e.g. can infer P such that P x y = phi(x,y)).
- Support for "where" clause in cofixpoint definitions.
- New option "Set Printing Universes" for making Type levels explicit.
Tactics
- Improved implementation of the ring and field tactics. For compatibility
reasons, the previous tactics are renamed as legacy ring and legacy field,
but should be considered as deprecated.
- New declarative mathematical proof language.
- Support for argument lists of arbitrary length in Tactic Notation.
- [rewrite ... in H] now fails if [H] is used either in an hypothesis
or in the goal.
- The semantics of [rewrite ... in *] has been slightly modified (see doc).
- Support for "as" clause in tactic injection.
- New forward-reasoning tactic "apply in".
- Ltac fresh operator now builds names from a concatenation of its arguments.
- New ltac tactic "remember" to abstract over a subterm and keep an equality
- Support for Miller-Pfenning's patterns unification in apply/rewrite/...
(may lead to few incompatibilities - generally now useless tactic calls).
Bug fixes
- Fix for notations involving basic "match" expressions.
- Numerous other bugs solved (a few fixes may lead to incompatibilities).
Changes from V8.0 to V8.1beta
=============================
Logic
- Added sort-polymorphism on inductive families
- Allowance for recursively non uniform parameters in inductive types
Syntax
- No more support for version 7 syntax and for translation to version 8 syntax.
- In fixpoints, the { struct ... } annotation is not mandatory any more when
only one of the arguments has an inductive type
- Added disjunctive patterns in match-with patterns
- Support for primitive interpretation of string literals
- Extended support for Unicode ranges
Vernacular commands
- Added "Print Ltac qualid" to print a user defined tactic.
- Added "Print Rewrite HintDb" to print the content of a DB used by
autorewrite.
- Added "Print Canonical Projections".
- Added "Example" as synonym of "Definition".
- Added "Proposition" and "Corollary" as extra synonyms of "Lemma".
- New command "Whelp" to send requests to the Helm database of proofs
formalized in the Calculus of Inductive Constructions.
- Command "functional induction" has been re-implemented from the new
"Function" command.
Ltac and tactic syntactic extensions
- New primitive "external" for communication with tool external to Coq
- New semantics for "match t with": if a clause returns a
tactic, it is now applied to the current goal. If it fails, the next
clause or next matching subterm is tried (i.e. it behaves as "match
goal with" does). The keyword "lazymatch" can be used to delay the
evaluation of tactics occurring in matching clauses.
- Hint base names can be parametric in auto and trivial.
- Occurrence values can be parametric in unfold, pattern, etc.
- Added entry constr_may_eval for tactic extensions.
- Low-priority term printer made available in ML-written tactic extensions.
- "Tactic Notation" extended to allow notations of tacticals.
Tactics
- New implementation and generalization of [setoid_]* (setoid_rewrite,
setoid_symmetry, setoid_transitivity, setoid_reflexivity and autorewite).
New syntax for declaring relations and morphisms (old syntax still working
with minor modifications, but deprecated).
- New implementation (still experimental) of the ring tactic with a built-in
notion of coefficients and a better usage of setoids.
- New conversion tactic "vm_compute": evaluates the goal (or an hypothesis)
with a call-by-value strategy, using the compiled version of terms.
- When rewriting H where H is not directly a Coq equality, search first H for
a registered setoid equality before starting to reduce in H. This is unlikely
to break any script. Should this happen nonetheless, one can insert manually
some "unfold ... in H" before rewriting.
- Fixed various bugs about (setoid) rewrite ... in ... (in particular #1101)
- "rewrite ... in" now accepts a clause as place where to rewrite instead of
juste a simple hypothesis name. For instance:
rewrite H in H1,H2 |- * means rewrite H in H1; rewrite H in H2; rewrite H
rewrite H in * |- will do try rewrite H in Hi for all hypothesis Hi <> H.
- Added "dependent rewrite term" and "dependent rewrite term in hyp".
- Added "autorewrite with ... in hyp [using ...]".
- Tactic "replace" now accepts a "by" tactic clause.
- Added "clear - id" to clear all hypotheses except the ones depending in id.
- The argument of Declare Left Step and Declare Right Step is now a term
(it used to be a reference).
- Omega now handles arbitrary precision integers.
- Several bug fixes in Reflexive Omega (romega).
- Idtac can now be left implicit in a [...|...] construct: for instance,
[ foo | | bar ] stands for [ foo | idtac | bar ].
- Fixed a "fold" bug (non critical but possible source of incompatibilities).
- Added classical_left and classical_right which transforms |- A \/ B into
~B |- A and ~A |- B respectively.
- Added command "Declare Implicit Tactic" to set up a default tactic to be
used to solve unresolved subterms of term arguments of tactics.
- Better support for coercions to Sortclass in tactics expecting type
arguments.
- Tactic "assert" now accepts "as" intro patterns and "by" tactic clauses.
- New tactic "pose proof" that generalizes "assert (id:=p)" with intro patterns.
- New introduction pattern "?" for letting Coq choose a name.
- Introduction patterns now support side hypotheses (e.g. intros [|] on
"(nat -> nat) -> nat" works).
- New introduction patterns "->" and "<-" for immediate rewriting of
introduced hypotheses.
- Introduction patterns coming after non trivial introduction patterns now
force full introduction of the first pattern (e.g. "intros [[|] p]" on
"nat->nat->nat" now behaves like "intros [[|?] p]")
- Added "eassumption".
- Added option 'using lemmas' to auto, trivial and eauto.
- Tactic "congruence" is now complete for its intended scope (ground
equalities and inequalities with constructors). Furthermore, it
tries to equates goal and hypotheses.
- New tactic "rtauto" solves pure propositional logic and gives a
reflective version of the available proof.
- Numbering of "pattern", "unfold", "simpl", ... occurrences in "match
with" made consistent with the printing of the return clause after
the term to match in the "match-with" construct (use "Set Printing All"
to see hidden occurrences).
- Generalization of induction "induction x1...xn using scheme" where
scheme is an induction principle with complex predicates (like the
ones generated by function induction).
- Some small Ltac tactics has been added to the standard library
(file Tactics.v):
* f_equal : instead of using the different f_equalX lemmas
* case_eq : a "case" without loss of information. An equality
stating the current situation is generated in every sub-cases.
* swap : for a negated goal ~B and a negated hypothesis H:~A,
swap H asks you to prove A from hypothesis B
* revert : revert H is generalize H; clear H.
Extraction
- All type parts should now disappear instead of sometimes producing _
(for instance in Map.empty).
- Haskell extraction: types of functions are now printed, better
unsafeCoerce mechanism, both for hugs and ghc.
- Scheme extraction improved, see http://www.pps.jussieu.fr/~letouzey/scheme.
- Many bug fixes.
Modules
- Added "Locate Module qualid" to get the full path of a module.
- Module/Declare Module syntax made more uniform.
- Added syntactic sugar "Declare Module Export/Import" and
"Module Export/Import".
- Added syntactic sugar "Module M(Export/Import X Y: T)" and
"Module Type M(Export/Import X Y: T)"
(only for interactive definitions)
- Construct "with" generalized to module paths:
T with (Definition|Module) M1.M2....Mn.l := l'.
Notations
- Option "format" aware of recursive notations.
- Added insertion of spaces by default in recursive notations w/o separators.
- No more automatic printing box in case of user-provided printing "format".
- New notation "exists! x:A, P" for unique existence.
- Notations for specific numerals now compatible with generic notations of
numerals (e.g. "1" can be used to denote the unit of a group without
hiding 1%nat)
Libraries
- New library on String and Ascii characters (contributed by L. Thery).
- New library FSets+FMaps of finite sets and maps.
- New library QArith on rational numbers.
- Small extension of Zmin.V, new Zmax.v, new Zminmax.v.
- Reworking and extension of the files on classical logic and
description principles (possible incompatibilities)
- Few other improvements in ZArith potentially exceptionally breaking the
compatibility (useless hypothesys of Zgt_square_simpl and
Zlt_square_simpl removed; fixed names mentioning letter O instead of
digit 0; weaken premises in Z_lt_induction).
- Restructuration of Eqdep_dec.v and Eqdep.v: more lemmas in Type.
- Znumtheory now contains a gcd function that can compute within Coq.
- More lemmas stated on Type in Wf.v, removal of redundant Acc_iter and
Acc_iter2.
- Change of the internal names of lemmas in OmegaLemmas.
- Acc in Wf.v and clos_refl_trans in Relation_Operators.v now rely on
the allowance for recursively non uniform parameters (possible
source of incompatibilities: explicit pattern-matching on these
types may require to remove the occurrence associated to their
recursively non uniform parameter).
- Coq.List.In_dec has been set transparent (this may exceptionally break
proof scripts, set it locally opaque for compatibility).
- More on permutations of lists in List.v and Permutation.v.
- List.v has been much expanded.
- New file SetoidList.v now contains results about lists seen with
respect to a setoid equality.
- Library NArith has been expanded, mostly with results coming from
Intmap (for instance a bitwise xor), plus also a bridge between N and
Bitvector.
- Intmap has been reorganized. In particular its address type "addr" is
now N. User contributions known to use Intmap have been adapted
accordingly. If you're using this library please contact us.
A wrapper FMapIntMap now presents Intmap as a particular implementation
of FMaps. New developments are strongly encouraged to use either this
wrapper or any other implementations of FMap instead of using directly
this obsolete Intmap.
Tools
- New semantics for coqtop options ("-batch" expects option "-top dir"
for loading vernac file that contains definitions).
- Tool coq_makefile now removes custom targets that are file names in
"make clean"
- New environment variable COQREMOTEBROWSER to set the command invoked
to start the remote browser both in Coq and coqide. Standard syntax:
"%s" is the placeholder for the URL.
Changes from V8.0beta to V8.0
=============================
Vernacular commands
- New option "Set Printing All" to deactivate all high-level forms of
printing (implicit arguments, coercions, destructing let,
if-then-else, notations, projections)
- "Functional Scheme" and "Functional Induction" extended to polymorphic
types and dependent types
- Notation now allows recursive patterns, hence recovering parts of the
fonctionalities of pre-V8 Grammar/Syntax commands
- Command "Print." discontinued.
- Redundant syntax "Implicit Arguments On/Off" discontinued
New syntax
- Semantics change of the if-then-else construction in new syntax:
"if c then t1 else t2" now stands for
"match c with c1 _ ... _ => t1 | c2 _ ... _ => t2 end"
with no dependency of t1 and t2 in the arguments of the constructors;
this may cause incompatibilities for files translated using coq 8.0beta
Interpretation scopes
- Delimiting key %bool for bool_scope added
- Import no more needed to activate argument scopes from a module
Tactics and the tactic Language
- Semantics of "assert" is now consistent with the reference manual
- New tactics stepl and stepr for chaining transitivity steps
- Tactic "replace ... with ... in" added
- Intro patterns now supported in Ltac (parsed with prefix "ipattern:")
Executables and tools
- Added option -top to change the name of the toplevel module "Top"
- Coqdoc updated to new syntax and now part of Coq sources
- XML exportation tool now exports the structure of vernacular files
(cf chapter 13 in the reference manual)
User contributions
- User contributions have been updated to the new syntax
Bug fixes
- Many bugs have been fixed (cf coq-bugs web page)
Changes from V8.0beta old syntax to V8.0beta
============================================
New concrete syntax
- A completely new syntax for terms
- A more uniform syntax for tactics and the tactic language
- A few syntactic changes for vernacular commands
- A smart automatic translator translating V8.0 files in old syntax to
files valid for V8.0
Syntax extensions
- "Grammar" for terms disappears
- "Grammar" for tactics becomes "Tactic Notation"
- "Syntax" disappears
- Introduction of a notion of interpretation scope allowing to use the
same notations in various contexts without using specific delimiters
(e.g the same expression "4<=3+x" is interpreted either in "nat",
"positive", "N" (previously "entier"), "Z", "R", depending on which
interpretation scope is currently open) [see documentation for details]
- Notation now mandatorily requires a precedence and associativity
(default was to set precedence to 1 and associativity to none)
Revision of the standard library
- Many lemmas and definitions names have been made more uniform mostly
in Arith, NArith, ZArith and Reals (e.g : "times" -> "Pmult",
"times_sym" -> "Pmult_comm", "Zle_Zmult_pos_right" ->
"Zmult_le_compat_r", "SUPERIEUR" -> "Gt", "ZERO" -> "Z0")
- Order and names of arguments of basic lemmas on nat, Z, positive and R
have been made uniform.
- Notions of Coq initial state are declared with (strict) implicit arguments
- eq merged with eqT: old eq disappear, new eq (written =) is old eqT
and new eqT is syntactic sugar for new eq (notation == is an alias
for = and is written as it, exceptional source of incompatibilities)
- Similarly, ex, ex2, all, identity are merged with exT, exT2, allT, identityT
- Arithmetical notations for nat, positive, N, Z, R, without needing
any backquote or double-backquotes delimiters.
- In Lists: new concrete notations; argument of nil is now implicit
- All changes in the library are taken in charge by the translator
Semantical changes during translation
- Recursive keyword set by default (and no longer needed) in Tactic Definition
- Set Implicit Arguments is strict by default in new syntax
- reductions in hypotheses of the form "... in H" now apply to the type
also if H is a local definition
- etc
Gallina
- New syntax of the form "Inductive bool : Set := true, false : bool." for
enumerated types
- Experimental syntax of the form p.(fst) for record projections
(activable with option "Set Printing Projections" which is
recognized by the translator)
Known problems of the automatic translation
- iso-latin-1 characters are no longer supported: move your files to
7-bits ASCII or unicode before translation (swith to unicode is
automatically done if a file is loaded and saved again by coqide)
- Renaming in ZArith: incompatibilities in Coq user contribs due to
merging names INZ, from Reals, and inject_nat.
- Renaming and new lemmas in ZArith: may clash with names used by users
- Restructuration of ZArith: replace requirement of specific modules
in ZArith by "Require Import ZArith_base" or "Require Import ZArith"
- Some implicit arguments must be made explicit before translation: typically
for "length nil", the implicit argument of length must be made explicit
- Grammar rules, Infix notations and V7.4 Notations must be updated wrt the
new scheme for syntactic extensions (see translator documentation)
- Unsafe for annotation Cases when constructors coercions are used or when
annotations are eta-reduced predicates
Changes from V7.4 to V8.0beta old syntax
========================================
Logic
- Set now predicative by default
- New option -impredicative-set to set Set impredicative
- The standard library doesn't need impredicativity of Set and is
compatible with the classical axioms which contradict Set impredicativity
Syntax for arithmetic
- Notation "=" and "<>" in Z and R are no longer implicitly in Z or R
(with possible introduction of a coercion), use <Z>...=... or
<Z>...<>... instead
- Locate applied to a simple string (e.g. "+") searches for all
notations containing this string
Vernacular commands
- "Declare ML Module" now allows to import .cma files. This avoids to use a
bunch of "Declare ML Module" statements when using several ML files.
- "Set Printing Width n" added, allows to change the size of width printing.
- "Implicit Variables Type x,y:t" (new syntax: "Implicit Types x y:t")
assigns default types for binding variables.
- Declarations of Hints and Notation now accept a "Local" flag not to
be exported outside the current file even if not in section
- "Print Scopes" prints all notations
- New command "About name" for light printing of type, implicit arguments, etc.
- New command "Admitted" to declare incompletely proven statement as axioms
- New keyword "Conjecture" to declare an axiom intended to be provable
- SearchAbout can now search for lemmas referring to more than one constant
and on substrings of the name of the lemma
- "Print Implicit" displays the implicit arguments of a constant
- Locate now searches for all names having a given suffix
- New command "Functional Scheme" for building an induction principle
from a function defined by case analysis and fix.
Commands
- new coqtop/coqc option -dont-load-proofs not to load opaque proofs in memory
Implicit arguments
- Inductive in sections declared with implicits now "discharged" with
implicits (like constants and variables)
- Implicit Arguments flags are now synchronous with reset
- New switch "Unset/Set Printing Implicits" (new syntax: "Unset/Set Printing
Implicit") to globally control printing of implicits
Grammar extensions
- Many newly supported UTF-8 encoded unicode blocks
- Greek letters (0380-03FF), Hebrew letters (U05D0-05EF), letter-like
symbols (2100-214F, that includes double N,Z,Q,R), prime
signs (from 2080-2089) and characters from many written languages
are valid in identifiers
- mathematical operators (2200-22FF), supplemental mathematical
operators (2A00-2AFF), miscellaneous technical (2300-23FF that
includes sqrt symbol), miscellaneous symbols (2600-26FF), arrows
(2190-21FF and 2900-297F), invisible mathematical operators (from
2080-2089), ... are valid symbols
Library
- New file about the factorial function in Arith
- An additional elimination Acc_iter for Acc, simplier than Acc_rect.
This new elimination principle is used for definition well_founded_induction.
- New library NArith on binary natural numbers
- R is now of type Set
- Restructuration in ZArith library
- "true_sub" used in Zplus now a definition, not a local one (source
of incompatibilities in proof referring to true_sub, may need extra Unfold)
- Some lemmas about minus moved from fast_integer to Arith/Minus.v
(le_minus, lt_mult_left) (theoretical source of incompatibilities)
- Several lemmas moved from auxiliary.v and zarith_aux.v to
fast_integer.v (theoretical source of incompatibilities)
- Variables names of iff_trans changed (source of incompatibilities)
- ZArith lemmas named OMEGA something or fast_ something, and lemma new_var
are now out of ZArith (except OMEGA2)
- Redundant ZArith lemmas have been renamed: for the following pairs,
use the second name (Zle_Zmult_right2, Zle_mult_simpl), (OMEGA2,
Zle_0_plus), (Zplus_assoc_l, Zplus_assoc), (Zmult_one, Zmult_1_n),
(Zmult_assoc_l, Zmult_assoc), (Zmult_minus_distr, Zmult_Zminus_distr_l)
(add_un_double_moins_un_xO, is_double_moins_un),
(Rlt_monotony_rev,Rlt_monotony_contra) (source of incompatibilities)
- Few minor changes (no more implicit arguments in
Zmult_Zminus_distr_l and Zmult_Zminus_distr_r, lemmas moved from
Zcomplements to other files) (rare source of incompatibilities)
- New lemmas provided by users added
Tactic language
- Fail tactic now accepts a failure message
- Idtac tactic now accepts a message
- New primitive tactic "FreshId" (new syntax: "fresh") to generate new names
- Debugger prints levels of calls
Tactics
- Replace can now replace proofs also
- Fail levels are now decremented at "Match Context" blocks only and
if the right-hand-side of "Match term With" are tactics, these
tactics are never evaluated immediately and do not induce
backtracking (in contrast with "Match Context")
- Quantified names now avoid global names of the current module (like
Intro names did) [source of rare incompatibilities: 2 changes in the set of
user contribs]
- NewDestruct/NewInduction accepts intro patterns as introduction names
- NewDestruct/NewInduction now work for non-inductive type using option "using"
- A NewInduction naming bug for inductive types with functional
arguments (e.g. the accessibility predicate) has been fixed (source
of incompatibilities)
- Symmetry now applies to hypotheses too
- Inversion now accept option "as [ ... ]" to name the hypotheses
- Contradiction now looks also for contradictory hypotheses stating ~A and A
(source of incompatibility)
- "Contradiction c" try to find an hypothesis in context which
contradicts the type of c
- Ring applies to new library NArith (require file NArithRing)
- Field now works on types in Set
- Auto with reals now try to replace le by ge (Rge_le is no longer an
immediate hint), resulting in shorter proofs
- Instantiate now works in hyps (syntax : Instantiate in ...)
- Some new tactics : EConstructor, ELeft, Eright, ESplit, EExists
- New tactic "functional induction" to perform case analysis and
induction following the definition of a function.
- Clear now fails when trying to remove a local definition used by
a constant appearing in the current goal
Extraction (See details in plugins/extraction/CHANGES)
- The old commands: (Recursive) Extraction Module M.
are now: (Recursive) Extraction Library M.
To use these commands, M should come from a library M.v
- The other syntax Extraction & Recursive Extraction now accept
module names as arguments.
Bugs
- see coq-bugs server for the complete list of fixed bugs
Miscellaneous
- Implicit parameters of inductive types definition now taken into
account for infering other implicit arguments
Incompatibilities
- Persistence of true_sub (4 incompatibilities in Coq user contributions)
- Variable names of some constants changed for a better uniformity (2 changes
in Coq user contributions)
- Naming of quantified names in goal now avoid global names (2 occurrences)
- NewInduction naming for inductive types with functional arguments
(no incompatibility in Coq user contributions)
- Contradiction now solve more goals (source of 2 incompatibilities)
- Merge of eq and eqT may exceptionally result in subgoals now
solved automatically
- Redundant pairs of ZArith lemmas may have different names: it may
cause "Apply/Rewrite with" to fail if using the first name of a pair
of redundant lemmas (this is solved by renaming the variables bound by
"with"; 3 incompatibilities in Coq user contribs)
- ML programs referring to constants from fast_integer.v must use
"Coqlib.gen_constant_modules Coqlib.zarith_base_modules" instead
Changes from V7.3.1 to V7.4
===========================
Symbolic notations
- Introduction of a notion of scope gathering notations in a consistent set;
a notation sets has been developed for nat, Z and R (undocumented)
- New command "Notation" for declaring notations simultaneously for
parsing and printing (see chap 10 of the reference manual)
- Declarations with only implicit arguments now handled (e.g. the
argument of nil can be set implicit; use !nil to refer to nil
without arguments)
- "Print Scope sc" and "Locate ntn" allows to know to what expression a
notation is bound
- New defensive strategy for printing or not implicit arguments to ensure
re-type-checkability of the printed term
- In Grammar command, the only predefined non-terminal entries are ident,
global, constr and pattern (e.g. nvar, numarg disappears); the only
allowed grammar types are constr and pattern; ast and ast list are no
longer supported; some incompatibilities in Grammar: when a syntax is a
initial segment of an other one, Grammar does not work, use Notation
Library
- Lemmas in Set from Compare_dec.v (le_lt_dec, ...) and Wf_nat.v
(lt_wf_rec, ...) are now transparent. This may be source of
incompatibilities.
- Syntactic Definitions Fst, Snd, Ex, All, Ex2, AllT, ExT, ExT2,
ProjS1, ProjS2, Error, Value and Except are turned to
notations. They now must be applied (incompatibilities only in
unrealistic cases).
- More efficient versions of Zmult and times (30% faster)
- Reals: the library is now divided in 6 parts (Rbase, Rfunctions,
SeqSeries, Rtrigo, Ranalysis, Integration). New tactics: Sup and
RCompute. See Reals.v for details.
Modules
- Beta version, see doc chap 2.5 for commands and chap 5 for theory
Language
- Inductive definitions now accept ">" in constructor types to declare
the corresponding constructor as a coercion.
- Idem for assumptions declarations and constants when the type is mentionned.
- The "Coercion" and "Canonical Structure" keywords now accept the
same syntax as "Definition", i.e. "hyps :=c (:t)?" or "hyps :t".
- Theorem-like declaration now accepts the syntax "Theorem thm [x:t;...] : u".
- Remark's and Fact's now definitively behave as Theorem and Lemma: when
sections are closed, the full name of a Remark or a Fact has no longer a
section part (source of incompatibilities)
- Opaque Local's (i.e. built by tactics and ended by Qed), do not
survive section closing any longer; as a side-effect, Opaque Local's
now appear in the local context of proofs; their body is hidden
though (source of incompatibilities); use one of Remark/Fact/Lemma/Theorem
instead to simulate the old behaviour of Local (the section part of
the name is not kept though)
ML tactic and vernacular commands
- "Grammar tactic" and "Grammar vernac" of type "ast" are no longer
supported (only "Grammar tactic simple_tactic" of type "tactic"
remains available).
- Concrete syntax for ML written vernacular commands and tactics is
now declared at ML level using camlp4 macros TACTIC EXTEND et VERNAC
COMMAND EXTEND.
- "Check n c" now "n:Check c", "Eval n ..." now "n:Eval ..."
- "Proof with T" (* no documentation *)
- SearchAbout id - prints all theorems which contain id in their type
Tactic definitions
- Static globalisation of identifiers and global references (source of
incompatibilities, especially, Recursive keyword is required for
mutually recursive definitions).
- New evaluation semantics: no more partial evaluation at definition time;
evaluation of all Tactic/Meta Definition, even producing terms, expect
a proof context to be evaluated (especially "()" is no longer needed).
- Debugger now shows the nesting level and the reasons of failure
Tactics
- Equality tactics (Rewrite, Reflexivity, Symmetry, Transitivity) now
understand JM equality
- Simpl and Change now apply to subterms also
- "Simpl f" reduces subterms whose head constant is f
- Double Induction now referring to hypotheses like "Intros until"
- "Inversion" now applies also on quantified hypotheses (naming as
for Intros until)
- NewDestruct now accepts terms with missing hypotheses
- NewDestruct and NewInduction now accept user-provided elimination scheme
- NewDestruct and NewInduction now accept user-provided introduction names
- Omega could solve goals such as ~`x<y` |- `x>=y` but failed when the
hypothesis was unfolded to `x < y` -> False. This is fixed. In addition,
it can also recognize 'False' in the hypothesis and use it to solve the
goal.
- Coercions now handled in "with" bindings
- "Subst x" replaces all ocurrences of x by t in the goal and hypotheses
when an hypothesis x=t or x:=t or t=x exists
- Fresh names for Assert and Pose now based on collision-avoiding
Intro naming strategy (exceptional source of incompatibilities)
- LinearIntuition (* no documentation *)
- Unfold expects a correct evaluable argument
- Clear expects existing hypotheses
Extraction (See details in plugins/extraction/CHANGES and README):
- An experimental Scheme extraction is provided.
- Concerning Ocaml, extracted code is now ensured to always type-check,
thanks to automatic inserting of Obj.magic.
- Experimental extraction of Coq new modules to Ocaml modules.
Proof rendering in natural language
- Export of theories to XML for publishing and rendering purposes now
includes proof-trees (see http://www.cs.unibo.it/helm)
Miscellaneous
- Printing Coercion now used through the standard keywords Set/Add, Test, Print
- "Print Term id" is an alias for "Print id"
- New switch "Unset/Set Printing Symbols" to control printing of
symbolic notations
- Two new variants of implicit arguments are available
- "Unset/Set Contextual Implicits" tells to consider implicit also the
arguments inferable from the context (e.g. for nil or refl_eq)
- "Unset/Set Strict Implicits" tells to consider implicit only the
arguments that are inferable in any case (i.e. arguments that occurs
as argument of rigid constants in the type of the remaining arguments;
e.g. the witness of an existential is not strict since it can vanish when
applied to a predicate which does not use its argument)
Incompatibilities
- "Grammar tactic ... : ast" and "Grammar vernac ... : ast" are no
longer supported, use TACTIC EXTEND and VERNAC COMMAND EXTEND on the
ML-side instead
- Transparency of le_lt_dec and co (leads to some simplification in
proofs; in some cases, incompatibilites is solved by declaring locally
opaque the relevant constant)
- Opaque Local do not now survive section closing (rename them into
Remark/Lemma/... to get them still surviving the sections; this
renaming allows also to solve incompatibilites related to now
forbidden calls to the tactic Clear)
- Remark and Fact have no longer (very) long names (use Local instead in case
of name conflict)
Bugs
- Improved localisation of errors in Syntactic Definitions
- Induction principle creation failure in presence of let-in fixed (#238)
- Inversion bugs fixed (#212 and #220)
- Omega bug related to Set fixed (#180)
- Type-checking inefficiency of nested destructuring let-in fixed (#216)
- Improved handling of let-in during holes resolution phase (#239)
Efficiency
- Implementation of a memory sharing strategy reducing memory
requirements by an average ratio of 3.
Changes from V7.3 to V7.3.1
===========================
Bug fixes
- Corrupted Field tactic and Match Context tactic construction fixed
- Checking of names already existing in Assert added (PR#182)
- Invalid argument bug in Exact tactic solved (PR#183)
- Colliding bound names bug fixed (PR#202)
- Wrong non-recursivity test for Record fixed (PR#189)
- Out of memory/seg fault bug related to parametric inductive fixed (PR#195)
- Setoid_replace/Setoid_rewrite bug wrt "==" fixed
Misc
- Ocaml version >= 3.06 is needed to compile Coq from sources
- Simplification of fresh names creation strategy for Assert, Pose and
LetTac (PR#192)
Changes from V7.2 to V7.3
=========================
Language
- Slightly improved compilation of pattern-matching (slight source of
incompatibilities)
- Record's now accept anonymous fields "_" which does not build projections
- Changes in the allowed elimination sorts for certain class of inductive
definitions : an inductive definition without constructors
of Sort Prop can be eliminated on sorts Set and Type A "singleton"
inductive definition (one constructor with arguments in the sort Prop
like conjunction of two propositions or equality) can be eliminated
directly on sort Type (In V7.2, only the sorts Prop and Set were allowed)
Tactics
- New tactic "Rename x into y" for renaming hypotheses
- New tactics "Pose x:=u" and "Pose u" to add definitions to local context
- Pattern now working on partially applied subterms
- Ring no longer applies irreversible congruence laws of mult but
better applies congruence laws of plus (slight source of incompatibilities).
- Field now accepts terms to be simplified as arguments (as for Ring). This
extension has been also implemented using the toplevel tactic language.
- Intuition does no longer unfold constants except "<->" and "~". It
can be parameterized by a tactic. It also can introduce dependent
product if needed (source of incompatibilities)
- "Match Context" now matching more recent hypotheses first and failing only
on user errors and Fail tactic (possible source of incompatibilities)
- Tactic Definition's without arguments now allowed in Coq states
- Better simplification and discrimination made by Inversion (source
of incompatibilities)
Bugs
- "Intros H" now working like "Intro H" trying first to reduce if not a product
- Forward dependencies in Cases now taken into account
- Known bugs related to Inversion and let-in's fixed
- Bug unexpected Delta with let-in now fixed
Extraction (details in plugins/extraction/CHANGES or documentation)
- Signatures of extracted terms are now mostly expunged from dummy arguments.
- Haskell extraction is now operational (tested & debugged).
Standard library
- Some additions in [ZArith]: three files (Zcomplements.v, Zpower.v
and Zlogarithms.v) moved from plugins/omega in order to be more
visible, one Zsgn function, more induction principles (Wf_Z.v and
tail of Zcomplements.v), one more general Euclid theorem
- Peano_dec.v and Compare_dec.v now part of Arith.v
Tools
- new option -dump-glob to coqtop to dump globalizations (to be used by the
new documentation tool coqdoc; see http://www.lri.fr/~filliatr/coqdoc)
User Contributions
- CongruenceClosure (congruence closure decision procedure)
[Pierre Corbineau, ENS Cachan]
- MapleMode (an interface to embed Maple simplification procedures over
rational fractions in Coq)
[David Delahaye, Micaela Mayero, Chalmers University]
- Presburger: A formalization of Presburger's algorithm
[Laurent Thery, INRIA Sophia Antipolis]
- Chinese has been rewritten using Z from ZArith as datatype
ZChinese is the new version, Chinese the obsolete one
[Pierre Letouzey, LRI Orsay]
Incompatibilities
- Ring: exceptional incompatibilities (1 above 650 in submitted user
contribs, leading to a simplification)
- Intuition: does not unfold any definition except "<->" and "~"
- Cases: removal of some extra Cases in configurations of the form
"Cases ... of C _ => ... | _ D => ..." (effects on 2 definitions of
submitted user contributions necessitating the removal of now superfluous
proof steps in 3 different proofs)
- Match Context, in case of incompatibilities because of a now non
trapped error (e.g. Not_found or Failure), use instead tactic Fail
to force Match Context trying the next clause
- Inversion: better simplification and discrimination may occasionally
lead to less subgoals and/or hypotheses and different naming of hypotheses
- Unification done by Apply/Elim has been changed and may exceptionally lead
to incompatible instantiations
- Peano_dec.v and Compare_dec.v parts of Arith.v make Auto more
powerful if these files were not already required (1 occurrence of
this in submitted user contribs)
Changes from V7.1 to V7.2
=========================
Language
- Automatic insertion of patterns for local definitions in the type of
the constructors of an inductive types (for compatibility with V6.3
let-in style)
- Coercions allowed in Cases patterns
- New declaration "Canonical Structure id = t : I" to help resolution of
equations of the form (proj ?)=a; if proj(e)=a then a is canonically
equipped with the remaining fields in e, i.e. ? is instantiated by e
Tactics
- New tactic "ClearBody H" to clear the body of definitions in local context
- New tactic "Assert H := c" for forward reasoning
- Slight improvement in naming strategy for NewInduction/NewDestruct
- Intuition/Tauto do not perform useless unfolding and work up to conversion
Extraction (details in plugins/extraction/CHANGES or documentation)
- Syntax changes: there are no more options inside the extraction commands.
New commands for customization and options have been introduced instead.
- More optimizations on extracted code.
- Extraction tests are now embedded in 14 user contributions.
Standard library
- In [Relations], Rstar.v and Newman.v now axiom-free.
- In [Sets], Integers.v now based on nat
- In [Arith], more lemmas in Min.v, new file Max.v, tail-recursive
plus and mult added to Plus.v and Mult.v respectively
- New directory [Sorting] with a proof of heapsort (dragged from 6.3.1 lib)
- In [Reals], more lemmas in Rbase.v, new lemmas on square, square root and
trigonometric functions (R_sqr.v - Rtrigo.v); a complementary approach
and new theorems about continuity and derivability in Ranalysis.v; some
properties in plane geometry such as translation, rotation or similarity
in Rgeom.v; finite sums and Chasles property in Rsigma.v
Bugs
- Confusion between implicit args of locals and globals of same base name fixed
- Various incompatibilities wrt inference of "?" in V6.3.1 fixed
- Implicits in infix section variables bug fixed
- Known coercions bugs fixed
- Apply "universe anomaly" bug fixed
- NatRing now working
- "Discriminate 1", "Injection 1", "Simplify_eq 1" now working
- NewInduction bugs with let-in and recursively dependent hypotheses fixed
- Syntax [x:=t:T]u now allowed as mentioned in documentation
- Bug with recursive inductive types involving let-in fixed
- Known pattern-matching bugs fixed
- Known Cases elimination predicate bugs fixed
- Improved errors messages for pattern-matching and projections
- Better error messages for ill-typed Cases expressions
Incompatibilities
- New naming strategy for NewInduction/NewDestruct may affect 7.1 compatibility
- Extra parentheses may exceptionally be needed in tactic definitions.
- Coq extensions written in Ocaml need to be updated (see dev/changements.txt
for a description of the main changes in the interface files of V7.2)
- New behaviour of Intuition/Tauto may exceptionally lead to incompatibilities
----------------------------------------------------------------------------
Changes from V6.3.1 and V7.0 to V7.1
====================================
Notes:
- items followed by (**) are important sources of incompatibilities
- items followed by (*) may exceptionally be sources of incompatibilities
- items followed by (+) have been introduced in version 7.0
Main novelties
==============
References are to Coq V7.1 reference manual
- New primitive let-in construct (see sections 1.2.8 and )
- Long names (see sections 2.6 and 2.7)
- New high-level tactic language (see chapter 10)
- Improved search facilities (see section 5.2)
- New extraction algorithm managing the Type level (see chapter 17)
- New rewriting tactic for arbitrary equalities (see chapter 19)
- New tactic Field to decide equalities on commutative fields (see 7.11)
- New tactic Fourier to solve linear inequalities on reals numbers (see 7.11)
- New tactics for induction/case analysis in "natural" style (see 7.7)
- Deep restructuration of the code (safer, simpler and more efficient)
- Export of theories to XML for publishing and rendering purposes
(see http://www.cs.unibo.it/helm)
Details of changes
==================
Language: new "let-in" construction
-----------------------------------
- New construction for local definitions (let-in) with syntax [x:=u]t (*)(+)
- Local definitions allowed in Record (a.k.a. record à la Randy Pollack)
Language: long names
--------------------
- Each construction has a unique absolute names built from a base
name, the name of the module in which they are defined (Top if in
coqtop), and possibly an arbitrary long sequence of directory (e.g.
"Coq.Lists.PolyList.flat_map" where "Coq" means that "flat_map" is part
of Coq standard library, "Lists" means it is defined in the Lists
library and "PolyList" means it is in the file Polylist) (+)
- Constructions can be referred by their base name, or, in case of
conflict, by a "qualified" name, where the base name is prefixed
by the module name (and possibly by a directory name, and so
on). A fully qualified name is an absolute name which always refer
to the construction it denotes (to preserve the visibility of
all constructions, no conflict is allowed for an absolute name) (+)
- Long names are available for modules with the possibility of using
the directory name as a component of the module full name (with
option -R to coqtop and coqc, or command Add LoadPath) (+)
- Improved conflict resolution strategy (the Unix PATH model),
allowing more constructions to be referred just by their base name
Language: miscellaneous
-----------------------
- The names of variables for Record projections _and_ for induction principles
(e.g. sum_ind) is now based on the first letter of their type (main
source of incompatibility) (**)(+)
- Most typing errors have now a precise location in the source (+)
- Slightly different mechanism to solve "?" (*)(+)
- More arguments may be considered implicit at section closing (*)(+)
- Bug with identifiers ended by a number greater than 2^30 fixed (+)
- New visibility discipline for Remark, Fact and Local: Remark's and
Fact's now survive at the end of section, but are only accessible using a
qualified names as soon as their strength expires; Local's disappear and
are moved into local definitions for each construction persistent at
section closing
Language: Cases
---------------
- Cases no longer considers aliases inferable from dependencies in types (*)(+)
- A redundant clause in Cases is now an error (*)
Reduction
---------
- New reduction flags "Zeta" and "Evar" in Eval Compute, for inlining of
local definitions and instantiation of existential variables
- Delta reduction flag does not perform Zeta and Evar reduction any more (*)
- Constants declared as opaque (using Qed) can no longer become
transparent (a constant intended to be alternatively opaque and
transparent must be declared as transparent (using Defined)); a risk
exists (until next Coq version) that Simpl and Hnf reduces opaque
constants (*)
New tactics
-----------
- New set of tactics to deal with types equipped with specific
equalities (a.k.a. Setoids, e.g. nat equipped with eq_nat) [by C. Renard]
- New tactic Assert, similar to Cut but expected to be more user-friendly
- New tactic NewDestruct and NewInduction intended to replace Elim
and Induction, Case and Destruct in a more user-friendly way (see
restrictions in the reference manual)
- New tactic ROmega: an experimental alternative (based on reflexion) to Omega
[by P. Crégut]
- New tactic language Ltac (see reference manual) (+)
- New versions of Tauto and Intuition, fully rewritten in the new Ltac
language; they run faster and produce more compact proofs; Tauto is
fully compatible but, in exchange of a better uniformity, Intuition
is slightly weaker (then use Tauto instead) (**)(+)
- New tactic Field to decide equalities on commutative fields (as a
special case, it works on real numbers) (+)
- New tactic Fourier to solve linear inequalities on reals numbers
[by L. Pottier] (+)
- New tactics dedicated to real numbers: DiscrR, SplitRmult, SplitAbsolu (+)
Changes in existing tactics
---------------------------
- Reduction tactics in local definitions apply only to the body
- New syntax of the form "Compute in Type of H." to require a reduction on
the types of local definitions
- Inversion, Injection, Discriminate, ... apply also on the
quantified premises of a goal (using the "Intros until" syntax)
- Decompose has been fixed but hypotheses may get different names (*)(+)
- Tauto now manages uniformly hypotheses and conclusions of the form
"t=t" which all are considered equivalent to "True". Especially,
Tauto now solves goals of the form "H : ~ t = t |- A".
- The "Let" tactic has been renamed "LetTac" and is now based on the
primitive "let-in" (+)
- Elim can no longer be used with an elimination schema different from
the one defined at definition time of the inductive type. To overload
an elimination schema, use "Elim <hyp> using <name of the new schema>"
(*)(+)
- Simpl no longer unfolds the recursive calls of a mutually defined
fixpoint (*)(+)
- Intro now fails if the hypothesis name already exists (*)(+)
- "Require Prolog" is no longer needed (i.e. it is available by default) (*)(+)
- Unfold now fails on a non unfoldable identifier (*)(+)
- Unfold also applies on definitions of the local context
- AutoRewrite now deals only with the main goal and it is the purpose of
Hint Rewrite to deal with generated subgoals (+)
- Redundant or incompatible instantiations in Apply ... with ... are now
correctly managed (+)
Efficiency
----------
- Excessive memory uses specific to V7.0 fixed
- Sizes of .vo files vary a lot compared to V6.3 (from -30% to +300%
depending on the developments)
- An improved reduction strategy for lazy evaluation
- A more economical mechanism to ensure logical consistency at the Type level;
warning: this is experimental and may produce "universes" anomalies
(please report)
Concrete syntax of constructions
--------------------------------
- Only identifiers starting with "_" or a letter, and followed by letters,
digits, "_" or "'" are allowed (e.g. "$" and "@" are no longer allowed) (*)
- A multiple binder like (a:A)(a,b:(P a))(Q a) is no longer parsed as
(a:A)(a0:(P a))(b:(P a))(Q a0) but as (a:A)(a0:(P a))(b:(P a0))(Q a0) (*)(+)
- A dedicated syntax has been introduced for Reals (e.g ``3+1/x``) (+)
- Pretty-printing of Infix notations fixed. (+)
Parsing and grammar extension
-----------------------------
- More constraints when writing ast
- "{...}" and the macros $LIST, $VAR, etc. now expect a metavariable
(an identifier starting with $) (*)
- identifiers should starts with a letter or "_" and be followed
by letters, digits, "_" or "'" (other characters are still
supported but it is not advised to use them) (*)(+)
- Entry "command" in "Grammar" and quotations (<<...>> stuff) is
renamed "constr" as in "Syntax" (+)
- New syntax "[" sentence_1 ... sentence_n"]." to group sentences (useful
for Time and to write grammar rules abbreviating several commands) (+)
- The default parser for actions in the grammar rules (and for
patterns in the pretty-printing rules) is now the one associated to
the grammar (i.e. vernac, tactic or constr); no need then for
quotations as in <:vernac:<...>>; to return an "ast", the grammar
must be explicitly typed with tag ": ast" or ": ast list", or if a
syntax rule, by using <<...>> in the patterns (expression inside
these angle brackets are parsed as "ast"); for grammars other than
vernac, tactic or constr, you may explicitly type the action with
tags ": constr", ": tactic", or ":vernac" (**)(+)
- Interpretation of names in Grammar rule is now based on long names,
which allows to avoid problems (or sometimes tricks;) related to
overloaded names (+)
New commands
------------
- New commands "Print XML All", "Show XML Proof", ... to show or
export theories to XML to be used with Helm's publishing and rendering
tools (see http://www.cs.unibo.it/helm) (by Claudio Sacerdoti Coen) (+)
- New commands to manually set implicit arguments (+)
- "Implicits ident." to activate the implicit arguments mode just for ident
- "Implicits ident [num1 num2 ...]." to explicitly give which
arguments have to be considered as implicit
- New SearchPattern/SearchRewrite (by Yves Bertot) (+)
- New commands "Debug on"/"Debug off" to activate/deactivate the tactic
language debugger (+)
- New commands to map physical paths to logical paths (+)
- Add LoadPath physical_dir as logical_dir
- Add Rec LoadPath physical_dir as logical_dir
Changes in existing commands
----------------------------
- Generalization of the usage of qualified identifiers in tactics
and commands about globals, e.g. Decompose, Eval Delta;
Hints Unfold, Transparent, Require
- Require synchronous with Reset; Require's scope stops at Section ending (*)
- For a module indirectly loaded by a "Require" but not exported,
the command "Import module" turns the constructions defined in the
module accessible by their short name, and activates the Grammar,
Syntax, Hint, ... declared in the module (+)
- The scope of the "Search" command can be restricted to some modules (+)
- Final dot in command (full stop/period) must be followed by a blank
(newline, tabulation or whitespace) (+)
- Slight restriction of the syntax for Cbv Delta: if present, option [-myconst]
must immediately follow the Delta keyword (*)(+)
- SearchIsos currently not supported
- Add ML Path is now implied by Add LoadPath (+)
- New names for the following commands (+)
AddPath -> Add LoadPath
Print LoadPath -> Print LoadPath
DelPath -> Remove LoadPath
AddRecPath -> Add Rec LoadPath
Print Path -> Print Coercion Paths
Implicit Arguments On -> Set Implicit Arguments
Implicit Arguments Off -> Unset Implicit Arguments
Begin Silent -> Set Silent
End Silent -> Unset Silent.
Tools
-----
- coqtop (+)
- Two executables: coqtop.byte and coqtop.opt (if supported by the platform)
- coqtop is a link to the more efficient executable (coqtop.opt if present)
- option -full is obsolete (+)
- do_Makefile renamed into coq_makefile (+)
- New option -R to coqtop and coqc to map a physical directory to a logical
one (+)
- coqc no longer needs to create a temporary file
- No more warning if no initialization file .coqrc exists
Extraction
----------
- New algorithm for extraction able to deal with "Type" (+)
(by J.-C. Filliâtre and P. Letouzey)
Standard library
----------------
- New library on maps on integers (IntMap, contributed by Jean Goubault)
- New lemmas about integer numbers [ZArith]
- New lemmas and a "natural" syntax for reals [Reals] (+)
- Exc/Error/Value renamed into Option/Some/None (*)
New user contributions
----------------------
- Constructive complex analysis and the Fundamental Theorem of Algebra [FTA]
(Herman Geuvers, Freek Wiedijk, Jan Zwanenburg, Randy Pollack,
Henk Barendregt, Nijmegen)
- A new axiomatization of ZFC set theory [Functions_in_ZFC]
(C. Simpson, Sophia-Antipolis)
- Basic notions of graph theory [GRAPHS-BASICS] (Jean Duprat, Lyon)
- A library for floating-point numbers [Float] (Laurent Théry, Sylvie Boldo,
Sophia-Antipolis)
- Formalisation of CTL and TCTL temporal logic [CtlTctl] (Carlos
Daniel Luna,Montevideo)
- Specification and verification of the Railroad Crossing Problem
in CTL and TCTL [RailroadCrossing] (Carlos Daniel Luna,Montevideo)
- P-automaton and the ABR algorithm [PAutomata]
(Christine Paulin, Emmanuel Freund, Orsay)
- Semantics of a subset of the C language [MiniC]
(Eduardo Giménez, Emmanuel Ledinot, Suresnes)
- Correctness proofs of the following imperative algorithms:
Bresenham line drawing algorithm [Bresenham], Marché's minimal edition
distance algorithm [Diff] (Jean-Christophe Filliâtre, Orsay)
- Correctness proofs of Buchberger's algorithm [Buchberger] and RSA
cryptographic algorithm [Rsa] (Laurent Théry, Sophia-Antipolis)
- Correctness proof of Stalmarck tautology checker algorithm
[Stalmarck] (Laurent Théry, Pierre Letouzey, Sophia-Antipolis)
Changes from V8.5pl1 to V8.5pl2
===============================
Critical bugfix
- Checksums of .vo files dependencies were not correctly checked.
Other bugfixes
- #4097: more efficient occur-check in presence of primitive projections
- #4398: type_scope used consistently in "match goal".
- #4450: eauto does not work with polymorphic lemmas
- #4677: fix alpha-conversion in notations needing eta-expansion.
- Fully preserve initial order of hypotheses in "Regular Subst Tactic" mode.
- #4644: a regression in unification.
- #4725: Function (Error: Conversion test raised an anomaly) and Program
(Error: Cannot infer this placeholder of type)
- #4747: Problem building Coq 8.5pl1 with OCaml 4.03.0: Fatal warnings
- #4752: CoqIDE crash on files not ended by ".v".
- #4777: printing inefficiency with implicit arguments
- #4818: "Admitted" fails due to undefined universe anomaly after calling
"destruct"
- #4823: remote counter: avoid thread race on sockets
- #4881: synchronizing "Declare Implicit Tactic" with backtrack.
- #4882: anomaly with Declare Implicit Tactic on hole of type with evars
- Fix use of "Declare Implicit Tactic" in refine.
triggered by CoqIDE
- #4069, #4718: congruence fails when universes are involved.
Universes
- Disallow silently dropping universe instances applied to variables
(forward compatible)
- Allow explicit universe instances on notations, when they can apply
to the head reference of their expansion.
Build infrastructure
- New update on how to find camlp5 binary and library at configure time.
Changes from V8.5 to V8.5pl1
============================
Critical bugfix
- The subterm relation for the guard condition was incorrectly defined on
primitive projections (#4588)
Plugin development tools
- add a .merlin target to the makefile
Various performance improvements (time, space used by .vo files)
Other bugfixes
- Fix order of arguments to Big.compare_case in ExtrOcamlZBigInt.v
- Added compatibility coercions from Specif.v which were present in Coq 8.4.
- Fixing a source of inefficiency and an artificial dependency in the printer in the congruence tactic.
- Allow to unset the refinement mode of Instance in ML
- Fixing an incorrect use of prod_appvect on a term which was not a product in setoid_rewrite.
- Add -compat 8.4 econstructor tactics, and tests
- Add compatibility Nonrecursive Elimination Schemes
- Fixing the "No applicable tactic" non informative error message regression on apply.
- Univs: fix get_current_context (bug #4603, part I)
- Fix a bug in Program coercion code
- Fix handling of arity of definitional classes.
- #4630: Some tactics are 20x slower in 8.5 than 8.4.
- #4627: records with no declared arity can be template polymorphic.
- #4623: set tactic too weak with universes (regression)
- Fix incorrect behavior of CS resolution
- #4591: Uncaught exception in directory browsing.
- CoqIDE is more resilient to initialization errors.
- #4614: "Fully check the document" is uninterruptable.
- Try eta-expansion of records only on non-recursive ones
- Fix bug when a sort is ascribed to a Record
- Primitive projections: protect kernel from erroneous definitions.
- Fixed bug #4533 with previous Keyed Unification commit
- Win: kill unreliable hence do not waitpid after kill -9 (Close #4369)
- Fix strategy of Keyed Unification
- #4608: Anomaly "output_value: abstract value (outside heap)".
- #4607: do not read native code files if native compiler was disabled.
- #4105: poor escaping in the protocol between CoqIDE and coqtop.
- #4596: [rewrite] broke in the past few weeks.
- #4533 (partial): respect declared global transparency of projections in unification.ml
- #4544: Backtrack on using full betaiota reduction during keyed unification.
- #4540: CoqIDE bottom progress bar does not update.
- Fix regression from 8.4 in reflexivity
- #4580: [Set Refine Instance Mode] also used for Program Instance.
- #4582: cannot override notation [ x ]. MAY CREATE INCOMPATIBILITIES, see #4683.
- STM: Print/Extraction have to be skipped if -quick
- #4542: CoqIDE: STOP button also stops workers
- STM: classify some variants of Instance as regular `Fork nodes.
- #4574: Anomaly: Uncaught exception Invalid_argument("splay_arity").
- Do not give a name to anonymous evars anymore. See bug #4547.
- STM: always stock in vio files the first node (state) of a proof
- STM: not delegate proofs that contain Vernac(Module|Require|Import), #4530
- Don't fail fatally if PATH is not set.
- #4537: Coq 8.5 is slower in typeclass resolution.
- #4522: Incorrect "Warning..." on windows.
- #4373: coqdep does not know about .vio files.
- #3826: "Incompatible module types" is uninformative.
- #4495: Failed assertion in metasyntax.ml.
- #4511: evar tactic can create non-typed evars.
- #4503: mixing universe polymorphic and monomorphic variables and definitions in sections is unsupported.
- #4519: oops, global shadowed local universe level bindings.
- #4506: Anomaly: File "pretyping/indrec.ml", line 169, characters 14-20: Assertion failed.
- #4548: Coqide crashes when going back one command
Changes from V8.5beta3 to V8.5
==============================
Tools
- Flag "-compat 8.4" now loads Coq.Compat.Coq84. The standard way of
putting Coq in v8.4 compatibility mode is to pass the command line flag
"-compat 8.4". It can be followed by "-require Coq.Compat.AdmitAxiom"
if the 8.4 behavior of admit is needed, in which case it uses an axiom.
Specification language
- Syntax "$(tactic)$" changed to "ltac:(tactic)".
Tactics
- Syntax "destruct !hyp" changed to "destruct (hyp)", and similarly
for induction (rare source of incompatibilities easily solvable by
removing parentheses around "hyp" when not for the purpose of keeping
the hypothesis).
- Syntax "p/c" for on-the-fly application of a lemma c before
introducing along pattern p changed to p%c1..%cn. The feature and
syntax are in experimental stage.
- "Proof using" does not clear unused section variables.
- Tactic "refine" has been changed back to the 8.4 behavior of shelving subgoals
that occur in other subgoals. The "refine" tactic of 8.5beta3 has been
renamed "simple refine"; it does not shelve any subgoal.
- New tactical "unshelve tac" which grab existential variables put on
the tactic shelve by the execution of "tac".
Changes from V8.5beta2 to V8.5beta3
===================================
Vernacular commands
- New command "Redirect" to redirect the output of a command to a file.
- New command "Undelimit Scope" to remove the delimiter of a scope.
- New option "Strict Universe Declaration", set by default. It enforces the
declaration of all polymorphic universes appearing in a definition when
introducing it.
- New command "Show id" to show goal named id.
- Option "Virtual Machine" removed.
Tactics
- New flag "Regular Subst Tactic" which fixes "subst" in situations where
it failed to substitute all substitutable equations or failed to simplify
cycles, or accidentally unfolded local definitions (flag is off by default).
- New flag "Loose Hint Behavior" to handle hints loaded but not imported in a
special way. It accepts three distinct flags:
* "Lax", which is the default one, sets the old behavior, i.e. a non-imported
hint behaves the same as an imported one.
* "Warn" outputs a warning when a non-imported hint is used. Note that this is
an over-approximation, because a hint may be triggered by an eauto run that
will eventually fail and backtrack.
* "Strict" changes the behavior of an unloaded hint to the one of the fail
tactic, allowing to emulate the hopefully future import-scoped hint mechanism.
- New compatibility flag "Universal Lemma Under Conjunction" which
let tactics working under conjunctions apply sublemmas of the form
"forall A, ... -> A".
- New compatibility flag "Bracketing Last Introduction Pattern" which can be
set so that the last disjunctive-conjunctive introduction pattern given to
"intros" automatically complete the introduction of its subcomponents, as the
the disjunctive-conjunctive introduction patterns in non-terminal position
already do.
- Importing Program no longer overrides the "exists" tactic (potential source
of incompatibilities).
- Hints costs are now correctly taken into account (potential source of
incompatibilities).
- Documented the Hint Cut command that allows control of the
proof-search during typeclass resolution (see reference manual).
API
- Some functions from pretyping/typing.ml and their derivatives were potential
source of evarmap leaks, as they dropped their resulting evarmap. The
situation was clarified by renaming them according to a unsafe_* scheme. Their
sound variant is likewise renamed to their old name. The following renamings
were made.
* Typing.type_of -> unsafe_type_of
* Typing.e_type_of -> type_of
* A new e_type_of function that matches the e_ prefix policy
* Tacmach.pf_type_of -> pf_unsafe_type_of
* A new safe pf_type_of function.
All uses of unsafe_* functions should be eventually eliminated.
Tools
- Added an option -w to control the output of coqtop warnings.
- Configure now takes an optional -native-compiler (yes|no) flag replacing
-no-native-compiler. The new flag is set to no by default under Windows.
- Flag -no-native-compiler was removed and became the default for coqc. If
precompilation of files for native conversion test is desired, use
-native-compiler.
- The -compile command-line option now takes the full path of the considered
file, including the ".v" extension, and outputs a warning if such an extension
is lacking.
- The -require and -load-vernac-object command-line options now take a logical
path of a given library rather than a physical path, thus they behave like
Require [Import] path.
- The -vm command-line option has been removed.
Standard Library
- There is now a Coq.Compat.Coq84 library, which sets the various compatibility
options and does a few redefinitions to make Coq behave more like Coq v8.4.
The standard way of putting Coq in v8.4 compatibility mode is to pass the command
line flags "-require Coq.Compat.Coq84 -compat 8.4".
Changes from V8.5beta1 to V8.5beta2
===================================
Logic
- The VM now supports inductive types with up to 8388851 non-constant
constructors and up to 8388607 constant ones.
Specification language
- Syntax "$(tactic)$" changed to "ltac: tactic".
Tactics
- A script using the admit tactic can no longer be concluded by either
Qed or Defined. In the first case, Admitted can be used instead. In
the second case, a subproof should be used.
- The easy tactic and the now tactical now have a more predictable
behavior, but they might now discharge some previously unsolved goals.
Extraction
- Definitions extracted to Haskell GHC should no longer randomly
segfault when some Coq types cannot be represented by Haskell types.
- Definitions can now be extracted to Json for post-processing.
Tools
- Option -I -as has been removed, and option -R -as has been
deprecated. In both cases, option -R can be used instead.
- coq_makefile now generates double-colon rules for rules such as clean.
API
- The interface of [change] has changed to take a [change_arg], which
can be built from a [constr] using [make_change_arg].
Changes from V8.4 to V8.5beta1
==============================
Logic
- Primitive projections for records allow for a compact representation
of projections, without parameters and avoid the behavior of defined
projections that can unfold to a case expression. To turn the use of
native projections on, use [Set Primitive Projections]. Record,
Class and Structure types defined while this option is set will be
defined with primitive projections instead of the usual encoding as
a case expression. For compatibility, when p is a primitive
projection, @p can be used to refer to the projection with explicit
parameters, i.e. [@p] is definitionally equal to [λ params r. r.(p)].
Records with primitive projections have eta-conversion, the
canonical form being [mkR pars (p1 t) ... (pn t)].
- New universe polymorphism (see reference manual)
- New option -type-in-type to collapse the universe hierarchy (this makes the
logic inconsistent).
- The guard condition for fixpoints is now a bit stricter. Propagation
of subterm value through pattern matching is restricted according to
the return predicate. Restores compatibility of Coq's logic with the
propositional extensionality axiom. May create incompatibilities in
recursive programs heavily using dependent types.
- Trivial inductive types are no longer defined in Type but in Prop, which
leads to a non-dependent induction principle being generated in place of
the dependent one. To recover the old behavior, explicitly define your
inductive types in Set.
Vernacular commands
- A command "Variant" allows to define non-recursive variant types.
- The command "Record foo ..." does not generate induction principles
(foo_rect, foo_rec, foo_ind) anymore by default (feature wish
#2693). The command "Variant foo ..." does not either. A flag
"Set/Unset Nonrecursive Elimination Schemes" allows changing this.
The tactic "induction" on a "Record" or a "Variant" is now actually
doing "destruct".
- The "Open Scope" command can now be given also a delimiter (e.g. Z).
- The "Definition" command now allows the "Local" modifier, allowing
for non-importable definitions. The same goes for "Axiom" and "Parameter".
- Section-specific commands such as "Let" (resp. "Variable", "Hypothesis") used
out of a section now behave like the corresponding "Local" command, i.e.
"Local Definition" (resp. "Local Parameter", "Local Axiom"). (potential source
of rare incompatibilities).
- The "Let" command can now define local (co)fixpoints.
- Command "Search" has been renamed into "SearchHead". The command
name "Search" now behaves like former "SearchAbout". The latter name
is deprecated.
- "Search", "About", "SearchHead", "SearchRewrite" and "SearchPattern"
now search for hypothesis (of the current goal by default) first.
They now also support the goal selector prefix to specify another
goal to search: e.g. "n:Search id". This is also true for
SearchAbout although it is deprecated.
- The coq/user-contrib directory and the XDG directories are no longer
recursively added to the load path, so files from installed libraries
now need to be fully qualified for the "Require" command to find them.
The tools/update-require script can be used to convert a development.
- A new Print Strategies command allows visualizing the opacity status
of the whole engine.
- The "Locate" command now searches through all sorts of qualified namespaces of
Coq: terms, modules, tactics, etc. The old behavior of the command can be
retrieved using the "Locate Term" command.
- New "Derive" command to help writing program by derivation.
- New "Refine Instance Mode" option that allows to deactivate the generation of
obligations in incomplete typeclass instances, raising an error instead.
- "Collection" command to name sets of section hypotheses. Named collections
can be used in the syntax of "Proof using" to assert which section variables
are used in a proof.
- The "Optimize Proof" command can be placed in the middle of a proof to
force the compaction of the data structure used to represent the ongoing
proof (evar map). This may result in a lower memory footprint and speed up
the execution of the following tactics.
- "Optimize Heap" command to tell the OCaml runtime to perform a major
garbage collection step and heap compaction.
- "Instance" no longer treats the {|...|} syntax specially; it handles it
in the same way as other commands, e.g. "Definition". Use the {...}
syntax (no pipe symbols) to recover the old behavior.
Specification Language
- Slight changes in unification error messages.
- Added a syntax $(...)$ that allows putting tactics in terms (may
break user notations using "$(", fixable by inserting a space or
rewriting the notation).
- Constructors in pattern-matching patterns now respect the same rules
regarding implicit arguments as in applicative position. The old
behavior can be recovered by the command "Set Asymmetric
Patterns". As a side effect, notations for constructors explicitly
mentioning non-implicit parameters can now be used in patterns.
Considering that the pattern language is already rich enough, binding
local definitions is however now forbidden in patterns (source of
incompatibilities for local definitions that delta-reduce to a constructor).
- Type inference algorithm now granting opacity of constants. This might also
affect behavior of tactics (source of incompatibilities, solvable by
re-declaring transparent constants which were set opaque).
- Existential variables are now referred to by an identifier and the
relevant part of their instance is displayed by default. They can be
reparsed. The naming policy is yet unstable and subject to changes
in future releases.
Tactics
- New tactic engine allowing dependent subgoals, fully backtracking
(also known as multiple success) tactics, as well as tactics which
can consider multiple goals together. In the new tactic engine,
instantiation information of existential variables is always
propagated to tactics, removing the need to manually use the
"instantiate" tactics to mark propagation points.
* New tactical (a+b) inserts a backtracking point. When (a+b);c fails
during the execution of c, it can backtrack and try b instead of a.
* New tactical (once a) removes all the backtracking points from a
(i.e. it selects the first success of a).
* Tactic "constructor" is now fully backtracking. In case of
incompatibilities (e.g. combinatoric explosion), the former
behavior of "constructor" can be retrieved by using instead
"[> once constructor ..]". Thanks to backtracking, undocumented
"constructor <tac>" syntax is now equivalent to
"[> once (constructor; tac) ..]".
* New "multimatch" variant of "match" tactic which backtracks to
new branches in case of a later failure. The "match" tactic is
equivalent to "once multimatch".
* New selector "all:" such that "all:tac" applies tactic "tac" to
all the focused goals, instead of just the first one as is the
default.
* A corresponding new option Set Default Goal Selector "all" makes
the tactics in scripts be applied to all the focused goal by default
* New selector "par:" such that "par:tac" applies the (terminating)
tactic "tac" to all the focused goal in parallel. The number of worker
can be selected with -async-proofs-tac-j and also limited using the
coqworkmgr utility.
* New tactics "revgoals", "cycle" and "swap" to reorder goals.
* The semantics of recursive tactics (introduced with "Ltac t := ..."
or "let rec t := ... in ...") changed slightly as t is now
applied to every goal, not each goal independently. In particular
it may be applied when no goals are left. This may cause tactics
such as "let rec t := constructor;t" to loop indefinitely. The
simple fix is to rewrite the recursive calls as follows:
"let rec t := constructor;[t..]" which recovers the earlier behavior
(source of rare incompatibilities).
* New tactic language feature "numgoals" to count number of goals. It is
accompanied by a "guard" tactic which fails if a Boolean test over
integers does not pass.
* New tactical "[> ... ]" to apply tactics to individual goals.
* New tactic "gfail" which works like "fail" except it will also
fail if every goal has been solved.
* The refine tactic is changed not to use an ad hoc typing algorithm
to generate subgoals. It also uses the dependent subgoal feature
to generate goals to materialize every existential variable which
is introduced by the refinement (source of incompatibilities).
* A tactic shelve is introduced to manage the subgoals which may be
solved by unification: shelve removes every goal it is applied to
from focus. These goals can later be called back into focus by the
Unshelve command.
* A variant shelve_unifiable only removes those goals which appear
as existential variables in other goals. To emulate the old
refine, use "refine c;shelve_unifiable". This can still cause
incompatibilities in rare occasions.
* New "give_up" tactic to skip over a goal. A proof containing
given up goals cannot be closed with "Qed", but only with "Admitted".
- The implementation of the admit tactic has changed: no axiom is
generated for the admitted sub proof. "admit" is now an alias for
"give_up". Code relying on this specific behavior of "admit"
can be made to work by:
* Adding an "Axiom" for each admitted subproof.
* Adding a single "Axiom proof_admitted : False." and the Ltac definition
"Ltac admit := case proof_admitted.".
- Matching using "lazymatch" was fundamentally modified. It now behaves
like "match" (immediate execution of the matching branch) but without
the backtracking mechanism in case of failure.
- New "tryif t then u else v" tactical which executes "u" in case of success
of "t" and "v" in case of failure.
- New conversion tactic "native_compute": evaluates the goal (or an hypothesis)
with a call-by-value strategy, using the OCaml native compiler. Useful on
very intensive computations.
- New "cbn" tactic, a well-behaved simpl.
- Repeated identical calls to omega should now produce identical proof terms.
- Tactics btauto, a reflexive Boolean tautology solver.
- Tactic "tauto" was exceptionally able to destruct other connectives
than the binary connectives "and", "or", "prod", "sum", "iff". This
non-uniform behavior has been fixed (bug #2680) and tauto is
slightly weaker (possible source of incompatibilities). On the
opposite side, new tactic "dtauto" is able to destruct any
record-like inductive types, superseding the old version of "tauto".
- Similarly, "intuition" has been made more uniform and, where it now
fails, "dintuition" can be used (possible source of incompatibilities).
- New option "Unset Intuition Negation Unfolding" for deactivating automatic
unfolding of "not" in intuition.
- Tactic notations can now be defined locally to a module (use "Local" prefix).
- Tactic "red" now reduces head beta-iota redexes (potential source of
rare incompatibilities).
- Tactic "hnf" now reduces inner beta-iota redexes
(potential source of rare incompatibilities).
- Tactic "intro H" now reduces beta-iota redexes if these hide a product
(potential source of rare incompatibilities).
- In Ltac matching on patterns of the form "_ pat1 ... patn" now
behaves like if matching on "?X pat1 ... patn", i.e. accepting "_"
to be instantiated by an applicative term (experimental at this
stage, potential source of incompatibilities).
- In Ltac matching on goal, types of hypotheses are now interpreted in
the %type scope (possible source of incompatibilities).
- "change ... in ..." and "simpl ... in ..." now properly consider nested
occurrences (possible source of incompatibilities since this alters
the numbering of occurrences), but do not support nested occurrences.
- Tactics simpl, vm_compute and native_compute can be given a notation string
to a constant as argument.
- When given a reference as argument, simpl, vm_compute and
native_compute now strictly interpret it as the head of a pattern
starting with this reference.
- The "change p with c" tactic semantics changed, now type-checking
"c" at each matching occurrence "t" of the pattern "p", and
converting "t" with "c".
- Now "appcontext" and "context" behave the same. The old buggy behavior of
"context" can be retrieved at parse time by setting the
"Tactic Compat Context" flag (possible source of incompatibilities).
- New introduction pattern p/c which applies lemma c on the fly on the
hypothesis under consideration before continuing with introduction pattern p.
- New introduction pattern [= x1 .. xn] applies "injection as [x1 .. xn]"
on the fly if injection is applicable to the hypothesis under consideration
(idea borrowed from Georges Gonthier). Introduction pattern [=] applies
"discriminate" if a discriminable equality.
- New introduction patterns * and ** to respectively introduce all forthcoming
dependent variables and all variables/hypotheses dependent or not.
- Tactic "injection c as ipats" now clears c if c refers to an
hypothesis and moves the resulting equations in the hypotheses
independently of the number of ipats, which has itself to be less
than the number of new hypotheses (possible source of incompatibilities;
former behavior obtainable by "Unset Injection L2R Pattern Order").
- Tactic "injection" now automatically simplifies subgoals
"existT n p = existT n p'" into "p = p'" when "n" is in an inductive type for
which a decidable equality scheme has been generated with "Scheme Equality"
(possible source of incompatibilities).
- New tactic "rewrite_strat" for generalized rewriting with user-defined
strategies, subsuming autorewrite.
- Injection can now also deduce equality of arguments of sort Prop, by using
the option "Set Injection On Proofs" (disabled by default). Also improved the
error messages.
- Tactic "subst id" now supports id occurring in dependent local definitions.
- Bugs fixed about intro-pattern "*" might lead to some rare incompatibilities.
- New tactical "time" to display time spent executing its argument.
- Tactics referring or using a constant dependent in a section variable which
has been cleared or renamed in the current goal context now fail
(possible source of incompatibilities solvable by avoiding clearing
the relevant hypotheses).
- New construct "uconstr:c" and "type_term c" to build untyped terms.
- Binders in terms defined in Ltac (either "constr" or "uconstr") can
now take their names from identifiers defined in Ltac. As a
consequence, a name cannot be used in a binder "constr:(fun x =>
...)" if an Ltac variable of that name already exists and does not
contain an identifier. Source of occasional incompatibilities.
- The "refine" tactic now accepts untyped terms built with "uconstr"
so that terms with holes can be constructed piecewise in Ltac.
- New bullets --, ++, **, ---, +++, ***, ... made available.
- More informative messages when wrong bullet is used.
- Bullet suggestion when a subgoal is solved.
- New tactic "enough", symmetric to "assert", but with subgoals
swapped, as a more friendly replacement of "cut".
- In destruct/induction, experimental modifier "!" prefixing the
hypothesis name to tell not erasing the hypothesis.
- Bug fixes in "inversion as" may occasionally lead to incompatibilities.
- Behavior of introduction patterns -> and <- made more uniform
(hypothesis is cleared, rewrite in hypotheses and conclusion and
erasing the variable when rewriting a variable).
- Tactics from plugins are now active only when the corresponding module
is imported (source of incompatibilities, solvable by adding an "Import";
in the particular case of Omega, use "Require Import OmegaTactic").
- Semantics of destruct/induction has been made more regular in some
edge cases, possibly leading to incompatibilities:
- new goals are now opened when the term does not match a subterm of
the goal and has unresolved holes, while in 8.4 these holes were
turned into existential variables
- when no "at" option is given, the historical semantics which
selects all subterms syntactically identical to the first subterm
matching the given pattern is used
- non-dependent destruct/induction on an hypothesis with premises in
an inductive type with indices is fixed
- residual local definitions are now correctly removed.
- The rename tactic may now replace variables in parallel.
- A new "Info" command replaces the "info" tactical discontinued in
v8.4. It still gives informative results in many cases.
- The "info_auto" tactic is known to be broken and does not print a
trace anymore. Use "Info 1 auto" instead. The same goes for
"info_trivial". On the other hand "info_eauto" still works fine,
while "Info 1 eauto" prints a trivial trace.
- When using a lemma of the prototypical form "forall A, {a:A & P a}",
"apply" and "apply in" do not instantiate anymore "A" with the
current goal and use "a" as the proof, as they were sometimes doing,
now considering that it is a too powerful decision.
Program
- "Solve Obligations using" changed to "Solve Obligations with",
consistent with "Proof with".
- Program Lemma, Definition now respect automatic introduction.
- Program Lemma, Definition, etc.. now interpret "->" like Lemma and
Definition as a non-dependent arrow (potential source of
incompatibility).
- Add/document "Set Hide Obligations" (to hide obligations in the final
term inside an implicit argument) and "Set Shrink Obligations" (to
minimize dependencies of obligations defined by tactics).
Notations
- The syntax "x -> y" is now declared at level 99. In particular, it has
now a lower priority than "<->": "A -> B <-> C" is now "A -> (B <-> C)"
(possible source of incompatibilities)
- Notations accept term-providing tactics using the $(...)$ syntax.
- "Bind Scope" can no longer bind "Funclass" and "Sortclass".
- A notation can be given a (compat "8.x") annotation, making it behave
like a "only parsing" notation, but the annotation may lead to eventually
issue warnings or errors in further versions when this notation is used.
- More systematic insertion of spaces as a default for printing
notations ("format" still available to override the default).
- In notations, a level modifier referring to a non-existent variable is
now considered an error rather than silently ignored.
Tools
- Option -I now only adds directories to the ml path.
- Option -Q behaves as -R, except that the logical path of any loaded file has
to be fully qualified.
- Option -R no longer adds recursively to the ml path; only the root
directory is added. (Behavior with respect to the load path is
unchanged.)
- Option -nois prevents coq/theories and coq/plugins to be recursively
added to the load path. (Same behavior as with coq/user-contrib.)
- coqdep accepts a -dumpgraph option generating a dot file.
- Makefiles generated through coq_makefile have three new targets "quick"
"checkproofs" and "vio2vo", allowing respectively to asynchronously compile
the files without playing the proof scripts, asynchronously checking
that the quickly generated proofs are correct and generating the object
files from the quickly generated proofs.
- The XML plugin was discontinued and removed from the source.
- A new utility called coqworkmgr can be used to limit the number of
concurrent workers started by independent processes, like make and CoqIDE.
This is of interest for users of the par: goal selector.
Interfaces
- CoqIDE supports asynchronous edition of the document, ongoing tasks and
errors are reported in the bottom right window. The number of workers
taking care of processing proofs can be selected with -async-proofs-j.
- CoqIDE highlights in yellow "unsafe" commands such as axiom
declarations, and tactics like "give_up".
- CoqIDE supports Proof General like key bindings;
to activate the PG mode go to Edit -> Preferences -> Editor.
For the documentation see Help -> Help for PG mode.
- CoqIDE automatically retracts the locked area when one edits the
locked text.
- CoqIDE search and replace got regular expressions power. See the
documentation of OCaml's Str module for the supported syntax.
- Many CoqIDE windows, including the query one, are now detachable to
improve usability on multi screen work stations.
- Coqtop/coqc outputs highlighted syntax. Colors can be configured thanks
to the COQ_COLORS environment variable, and their current state can
be displayed with the -list-tags command line option.
- Third party user interfaces can install their main loop in $COQLIB/toploop
and call coqtop with the -toploop flag to select it.
Internal Infrastructure
- Many reorganizations in the ocaml source files. For instance,
many internal a.s.t. of Coq are now placed in mli files in
a new directory intf/, for instance constrexpr.mli or glob_term.mli.
More details in dev/doc/changes.
- The file states/initial.coq does not exist anymore. Instead, coqtop
initially does a "Require" of Prelude.vo (or nothing when given
the options -noinit or -nois).
- The format of vo files has slightly changed: cf final comments in
checker/cic.mli.
- The build system does not produce anymore programs named coqtop.opt
and a symbolic link to coqtop. Instead, coqtop is now directly
an executable compiled with the best OCaml compiler available.
The bytecode program coqtop.byte is still produced. Same for other
utilities.
- Some options of the ./configure script slightly changed:
* The -coqrunbyteflags and its blank-separated argument is replaced
by option -vmbyteflags which expects a comma-separated argument.
* The -coqtoolsbyteflags option is discontinued, see -no-custom instead.
Miscellaneous
- ML plugins now require a "DECLARE PLUGIN \"foo\"" statement. The "foo" name
must be exactly the name of the ML module that will be loaded through a
"Declare ML \"foo\"" command.
Changes from V8.4beta2 to V8.4
==============================
Vernacular commands
- The "Reset" command is now supported again in files given to coqc or Load.
- "Show Script" now indents again the displayed scripts. It can also work
correctly across Load'ed files if the option "Unset Atomic Load" is used.
- "Open Scope" can now be given the delimiter (e.g. Z) instead of the full
scope name (e.g. Z_scope).
Notations
- Most compatibility notations of the standard library are now tagged as
(compat xyz), where xyz is a former Coq version, for instance "8.3".
These notations behave as (only parsing) notations, except that they may
triggers warnings (or errors) when used while Coq is not in a corresponding
-compat mode.
- To activate these compatibility warnings, use "Set Verbose Compat Notations"
or the command-line flag -verbose-compat-notations.
- For a strict mode without these compatibility notations, use
"Unset Compat Notations" or the command-line flag -no-compat-notations.
Tactics
- An annotation "eqn:H" or "eqn:?" can be added to a "destruct"
or "induction" to make it generate equations in the spirit of "case_eq".
The former syntax "_eqn" is discontinued.
- The name of the hypothesis introduced by tactic "remember" can be
set via the new syntax "remember t as x eqn:H" (wish #2489).
Libraries
- Reals: changed definition of PI, no more axiom about sin(PI/2).
- SetoidPermutation: a notion of permutation for lists modulo a setoid equality.
- BigN: fixed the ocaml code doing the parsing/printing of big numbers.
- List: a couple of lemmas added especially about no-duplication, partitions.
- Init: Removal of the coercions between variants of sigma-types and
subset types (possible source of incompatibility).
Changes from V8.4beta to V8.4beta2
==================================
Vernacular commands
- Commands "Back" and "BackTo" are now handling the proof states. They may
perform some extra steps of backtrack to avoid states where the proof
state is unavailable (typically a closed proof).
- The commands "Suspend" and "Resume" have been removed.
- A basic Show Script has been reintroduced (no indentation).
- New command "Set Parsing Explicit" for deactivating parsing (and printing)
of implicit arguments (useful for teaching).
- New command "Grab Existential Variables" to transform the unresolved evars
at the end of a proof into goals.
Tactics
- Still no general "info" tactical, but new specific tactics info_auto,
info_eauto, info_trivial which provides information on the proofs found
by auto/eauto/trivial. Display of these details could also be activated by
"Set Info Auto"/"Set Info Eauto"/"Set Info Trivial".
- Details on everything tried by auto/eauto/trivial during a proof search
could be obtained by "debug auto", "debug eauto", "debug trivial" or by a
global "Set Debug Auto"/"Set Debug Eauto"/"Set Debug Trivial".
- New command "r string" in Ltac debugger that interprets "idtac
string" in Ltac code as a breakpoint and jumps to its next use.
- Tactics from the Dp plugin (simplify, ergo, yices, cvc3, z3, cvcl,
harvey, zenon, gwhy) have been removed, since Why2 has not been
maintained for the last few years. The Why3 plugin should be a suitable
replacement in most cases.
Libraries
- MSetRBT: a new implementation of MSets via Red-Black trees (initial
contribution by Andrew Appel).
- MSetAVL: for maximal sharing with the new MSetRBT, the argument order
of Node has changed (this should be transparent to regular MSets users).
Module System
- The names of modules (and module types) are now in a fully separated
namespace from ordinary definitions: "Definition E:=0. Module E. End E."
is now accepted.
CoqIDE
- Coqide now supports the "Restart" command, and "Undo" (with a warning).
Better support for "Abort".
Changes from V8.3 to V8.4beta
=============================
Logic
- Standard eta-conversion now supported (dependent product only).
- Guard condition improvement: subterm property is propagated through beta-redex
blocked by pattern-matching, as in "(match v with C .. => fun x => u end) x";
this allows for instance to use "rewrite ... in ..." without breaking
the guard condition.
Specification language and notations
- Maximal implicit arguments can now be set locally by { }. The registration
traverses fixpoints and lambdas. Because there is conversion in types,
maximal implicit arguments are not taken into account in partial
applications (use eta expanded form with explicit { } instead).
- Added support for recursive notations with binders (allows for instance
to write "exists x y z, P").
- Structure/Record printing can be disable by "Unset Printing Records".
In addition, it can be controlled on type by type basis using
"Add Printing Record" or "Add Printing Constructor".
- Pattern-matching compilation algorithm: in "match x, y with ... end",
possible dependencies of x (or of the indices of its type) in the type
of y are now taken into account.
Tactics
- New proof engine.
- Scripts can now be structured thanks to bullets - * + and to subgoal
delimitation via { }. Note: for use with Proof General, a cvs version of
Proof General no older than mid-July 2011 is currently required.
- Support for tactical "info" is suspended.
- Support for command "Show Script" is suspended.
- New tactics constr_eq, is_evar and has_evar for use in Ltac (DOC TODO).
- Removed the two-argument variant of "decide equality".
- New experimental tactical "timeout <n> <tac>". Since <n> is a time
in second for the moment, this feature should rather be avoided
in scripts meant to be machine-independent.
- Fix in "destruct": removal of unexpected local definitions in context might
result in some rare incompatibilities (solvable by adapting name hypotheses).
- Introduction pattern "_" made more robust.
- Tactic (and Eval command) vm_compute can now be interrupted via Ctrl-C.
- Unification in "apply" supports unification of patterns of the form
?f x y = g(x,y) (compatibility ensured by using
"Unset Tactic Pattern Unification"). It also supports (full) betaiota.
- Tactic autorewrite does no longer instantiate pre-existing
existential variables (theoretical source of possible incompatibilities).
- Tactic "dependent rewrite" now supports equality in "sig".
- Tactic omega now understands Zpred (wish #1912) and can prove any goal
from a context containing an arithmetical contradiction (wish #2236).
- Using "auto with nocore" disables the use of the "core" database (wish #2188).
This pseudo-database "nocore" can also be used with trivial and eauto.
- Tactics "set", "destruct" and "induction" accepts incomplete terms and
use the goal to complete the pattern assuming it is non ambiguous.
- When used on arguments with a dependent type, tactics such as
"destruct", "induction", "case", "elim", etc. now try to abstract
automatically the dependencies over the arguments of the types
(based on initial ideas from Chung-Kil Hur, extension to nested
dependencies suggested by Dan Grayson)
- Tactic "injection" now failing on an equality showing no constructors while
it was formerly generalizing again the goal over the given equality.
- In Ltac, the "context [...]" syntax has now a variant "appcontext [...]"
allowing to match partial applications in larger applications.
- When applying destruct or inversion on a fixpoint hiding an inductive
type, recursive calls to the fixpoint now remain folded by default (rare
source of incompatibility generally solvable by adding a call to simpl).
- In an ltac pattern containing a "match", a final "| _ => _" branch could be
used now instead of enumerating all remaining constructors. Moreover, the
pattern "match _ with _ => _ end" now allows to match any "match". A "in"
annotation can also be added to restrict to a precise inductive type.
- The behavior of "simpl" can be tuned using the "Arguments" vernacular.
In particular constants can be marked so that they are always/never unfolded
by "simpl", or unfolded only when a set of arguments evaluates to a
constructor. Last one can mark a constant so that it is unfolded only if the
simplified term does not expose a match in head position.
Vernacular commands
- It is now mandatory to have a space (or tabulation or newline or end-of-file)
after a "." ending a sentence.
- In SearchAbout, the [ ] delimiters are now optional.
- New command "Add/Remove Search Blacklist <substring> ...":
a Search or SearchAbout or similar query will never mention lemmas
whose qualified names contain any of the declared substrings.
The default blacklisted substrings are "_subproof" "Private_".
- When the output file of "Print Universes" ends in ".dot" or ".gv",
the universe graph is printed in the DOT language, and can be
processed by Graphviz tools.
- New command "Print Sorted Universes".
- The undocumented and obsolete option "Set/Unset Boxed Definitions" has
been removed, as well as syntaxes like "Boxed Fixpoint foo".
- A new option "Set Default Timeout n / Unset Default Timeout".
- Qed now uses information from the reduction tactics used in proof script
to avoid conversion at Qed time to go into a very long computation.
- New command "Show Goal ident" to display the statement of a goal, even
a closed one (available from Proof General).
- Command "Proof" accept a new modifier "using" to force generalization
over a given list of section variables at section ending (DOC TODO).
- New command "Arguments" generalizing "Implicit Arguments" and
"Arguments Scope" and that also allows to rename the parameters of a
definition and to tune the behavior of the tactic "simpl".
Module System
- During subtyping checks, an opaque constant in a module type could now
be implemented by anything of the right type, even if bodies differ.
Said otherwise, with respect to subtyping, an opaque constant behaves
just as a parameter. Coqchk was already implementing this, but not coqtop.
- The inlining done during application of functors can now be controlled
more precisely, by the annotations (no inline) or (inline at level XX).
With the latter annotation, only functor parameters whose levels
are lower or equal than XX will be inlined.
The level of a parameter can be fixed by "Parameter Inline(30) foo".
When levels aren't given, the default value is 100. One can also use
the flag "Set Inline Level ..." to set a level (DOC TODO).
- Print Assumptions should now handle correctly opaque modules (#2168).
- Print Module (Type) now tries to print more details, such as types and
bodies of the module elements. Note that Print Module Type could be
used on a module to display only its interface. The option
"Set Short Module Printing" could be used to switch back to the earlier
behavior were only field names were displayed.
Libraries
- Extension of the abstract part of Numbers, which now provide axiomatizations
and results about many more integer functions, such as pow, gcd, lcm, sqrt,
log2 and bitwise functions. These functions are implemented for nat, N, BigN,
Z, BigZ. See in particular file NPeano for new functions about nat.
- The definition of types positive, N, Z is now in file BinNums.v
- Major reorganization of ZArith. The initial file ZArith/BinInt.v now contains
an internal module Z implementing the Numbers interface for integers.
This module Z regroups:
* all functions over type Z : Z.add, Z.mul, ...
* the minimal proofs of specifications for these functions : Z.add_0_l, ...
* an instantation of all derived properties proved generically in Numbers :
Z.add_comm, Z.add_assoc, ...
A large part of ZArith is now simply compatibility notations, for instance
Zplus_comm is an alias for Z.add_comm. The direct use of module Z is now
recommended instead of relying on these compatibility notations.
- Similar major reorganization of NArith, via a module N in NArith/BinNat.v
- Concerning the positive datatype, BinPos.v is now in a specific directory
PArith, and contains an internal submodule Pos. We regroup there functions
such as Pos.add Pos.mul etc as well as many results about them. These results
are here proved directly (no Number interface for strictly positive numbers).
- Note that in spite of the compatibility layers, all these reorganizations
may induce some marginal incompatibilies in scripts. In particular:
* the "?=" notation for positive now refers to a binary function Pos.compare,
instead of the infamous ternary Pcompare (now Pos.compare_cont).
* some hypothesis names generated by the system may changed (typically for
a "destruct Z_le_gt_dec") since naming is done after the short name of
the head predicate (here now "le" in module Z instead of "Zle", etc).
* the internals of Z.add has changed, now relying of Z.pos_sub.
- Also note these new notations:
* "<?" "<=?" "=?" for boolean tests such as Z.ltb Z.leb Z.eqb.
* "÷" for the alternative integer division Z.quot implementing the Truncate
convention (former ZOdiv), while the notation for the Coq usual division
Z.div implementing the Flooring convention remains "/". Their corresponding
modulo functions are Z.rem (no notations) for Z.quot and Z.modulo (infix
"mod" notation) for Z.div.
- Lemmas about conversions between these datatypes are also organized
in modules, see for instance modules Z2Nat, N2Z, etc.
- When creating BigN, the macro-generated part NMake_gen is much smaller.
The generic part NMake has been reworked and improved. Some changes
may introduce incompatibilities. In particular, the order of the arguments
for BigN.shiftl and BigN.shiftr is now reversed: the number to shift now
comes first. By default, the power function now takes two BigN.
- Creation of Vector, an independent library for lists indexed by their length.
Vectors' names overwrite lists' one so you should not "Import" the library.
All old names changed: function names follow the ocaml ones and, for example,
Vcons becomes Vector.cons. You can get [..;..;..]-style notations by importing
Vector.VectorNotations.
- Removal of TheoryList. Requiring List instead should work most of the time.
- New syntax "rew Heq in H" and "rew <- Heq in H" for eq_rect and
eq_rect_r (available by importing module EqNotations).
- Wf.iter_nat is now Peano.nat_iter (with an implicit type argument).
Internal infrastructure
- Opaque proofs are now loaded lazily by default. This allows to be almost as
fast as -dont-load-proofs, while being safer (no creation of axioms) and
avoiding feature restrictions (Print and Print Assumptions work ok).
- Revised hash-consing code allowing more sharing of memory
- Experimental support added for camlp4 (the one provided alongside ocaml),
simply pass option -usecamlp4 to ./configure. By default camlp5 is used.
- Revised build system: no more stages in Makefile thanks to some recursive
aspect of recent gnu make, use of vo.itarget files containing .v to compile
for both make and ocamlbuild, etc.
- Support of cross-compilation via mingw from unix toward Windows,
contact P. Letouzey for more informations.
- New Makefile rules mli-doc to make html of mli in dev/doc/html and
full-stdlib to get a (huge) pdf reflecting the whole standard library.
Extraction
- By default, opaque terms are now truly considered opaque by extraction:
instead of accessing their body, they are now considered as axioms.
The previous behaviour can be reactivated via the option
"Set Extraction AccessOpaque".
- The pretty-printer for Haskell now produces layout-independant code
- A new command "Separate Extraction cst1 cst2 ..." that mixes a
minimal extracted environment a la "Recursive Extraction" and the
production of several files (one per coq source) a la "Extraction Library"
(DOC TODO).
- New option "Set/Unset Extraction KeepSingleton" for preventing the
extraction to optimize singleton container types (DOC TODO).
- The extraction now identifies and properly rejects a particular case of
universe polymorphism it cannot handle yet (the pair (I,I) being Prop).
- Support of anonymous fields in record (#2555).
CoqIDE
- Coqide now runs coqtop as separated process, making it more robust:
coqtop subprocess can be interrupted, or even killed and relaunched
(cf button "Restart Coq", ex-"Go to Start"). For allowing such
interrupts, the Windows version of coqide now requires Windows >= XP
SP1.
- The communication between CoqIDE and Coqtop is now done via a dialect
of XML (DOC TODO).
- The backtrack engine of CoqIDE has been reworked, it now uses the
"Backtrack" command similarly to Proof General.
- The Coqide parsing of sentences has be reworked and now supports
tactic delimitation via { }.
- Coqide now accepts the Abort command (wish #2357).
- Coqide can read coq_makefile files as "project file" and use it to
set automatically options to send to coqtop.
- Preference files have moved to $XDG_CONFIG_HOME/coq and accelerators
are not stored as a list anymore.
Tools
- Coq now searches directories specified in COQPATH, $XDG_DATA_HOME/coq,
$XDG_DATA_DIRS/coq, and user-contribs before the standard library.
- Coq rc file has moved to $XDG_CONFIG_HOME/coq.
- Major changes to coq_makefile:
* mli/mlpack/mllib taken into account, ml not preproccessed anymore, ml4 work;
* mlihtml generates doc of mli, install-doc install the html doc in DOCDIR
with the same policy as vo in COQLIB;
* More variables are given by coqtop -config, others are defined only if the
users doesn't have defined them elsewhere. Consequently, generated makefile
should work directly on any architecture;
* Packagers can take advantage of $(DSTROOT) introduction. Installation can
be made in $XDG_DATA_HOME/coq;
* -arg option allows to send option as argument to coqc.
Changes from V8.2 to V8.3
=========================
Rewriting tactics
- Tactic "rewrite" now supports rewriting on ad hoc equalities such as eq_true.
- "Hint Rewrite" now checks that the lemma looks like an equation.
- New tactic "etransitivity".
- Support for heterogeneous equality (JMeq) in "injection" and "discriminate".
- Tactic "subst" now supports heterogeneous equality and equality
proofs that are dependent (use "simple subst" for preserving compatibility).
- Added support for Leibniz-rewriting of dependent hypotheses.
- Renamed "Morphism" into "Proper" and "respect" into "proper_prf"
(possible source of incompatibility). A partial fix is to define
"Notation Morphism R f := (Proper (R%signature) f)."
- New tactic variants "rewrite* by" and "autorewrite*" that rewrite
respectively the first and all matches whose side-conditions are
solved.
- "Require Import Setoid" does not export all of "Morphisms" and
"RelationClasses" anymore (possible source of incompatibility, fixed
by importing "Morphisms" too).
- Support added for using Chung-Kil Hur's Heq library for rewriting over
heterogeneous equality (courtesy of the library's author).
- Tactic "replace" supports matching terms with holes.
Automation tactics
- Tactic "intuition" now preserves inner "iff" and "not" (exceptional
source of incompatibilities solvable by redefining "intuition" as
"unfold iff, not in *; intuition", or, for iff only, by using
"Set Intuition Iff Unfolding".)
- Tactic "tauto" now proves classical tautologies as soon as classical logic
(i.e. library Classical_Prop or Classical) is loaded.
- Tactic "gappa" has been removed from the Dp plugin.
- Tactic "firstorder" now supports the combination of its "using" and
"with" options.
- New "Hint Resolve ->" (or "<-") for declaring iff's as oriented
hints (wish #2104).
- An inductive type as argument of the "using" option of "auto/eauto/firstorder"
is interpreted as using the collection of its constructors.
- New decision tactic "nsatz" to prove polynomial equations
by computation of Groebner bases.
Other tactics
- Tactic "discriminate" now performs intros before trying to discriminate an
hypothesis of the goal (previously it applied intro only if the goal
had the form t1<>t2) (exceptional source of incompatibilities - former
behavior can be obtained by "Unset Discriminate Introduction").
- Tactic "quote" now supports quotation of arbitrary terms (not just the
goal).
- Tactic "idtac" now displays its "list" arguments.
- New introduction patterns "*" for introducing the next block of dependent
variables and "**" for introducing all quantified variables and hypotheses.
- Pattern Unification for existential variables activated in tactics and
new option "Unset Tactic Evars Pattern Unification" to deactivate it.
- Resolution of canonical structure is now part of the tactic's unification
algorithm.
- New tactic "decide lemma with hyp" for rewriting decidability lemmas
when one knows which side is true.
- Improved support of dependent goals over objects in dependent types for
"destruct" (rare source of incompatibility that can be avoided by unsetting
option "Dependent Propositions Elimination").
- Tactic "exists", "eexists", "destruct" and "edestruct" supports iteration
using comma-separated arguments.
- Tactic names "case" and "elim" now support clauses "as" and "in" and become
then synonymous of "destruct" and "induction" respectively.
- A new tactic name "exfalso" for the use of 'ex-falso quodlibet' principle.
This tactic is simply a shortcut for "elimtype False".
- Made quantified hypotheses get the name they would have if introduced in
the context (possible but rare source of incompatibilities).
- When applying a component of a conjunctive lemma, "apply in" (and
sequences of "apply in") now leave the side conditions of the lemmas
uniformly after the main goal (possible source of rare incompatibilities).
- In "simpl c" and "change c with d", c can be a pattern.
- Tactic "revert" now preserves let-in's making it the exact inverse of
"intro".
- New tactics "clear dependent H" and "revert dependent H" that
clears (resp. reverts) H and all the hypotheses that depend on H.
- Ltac's pattern-matching now supports matching metavariables that
depend on variables bound upwards in the pattern.
- New experimental option "Set Standard Proposition Elimination Names"
so that case analysis or induction on schemes in Type containing
propositions now produces "H"-based names.
Tactic definitions
- Ltac definitions support Local option for non-export outside modules.
- Support for parsing non-empty lists with separators in tactic notations.
- New command "Locate Ltac" to get the full name of an Ltac definition.
Notations
- Record syntax "{|x=...; y=...|}" now works inside patterns too.
- Abbreviations from non-imported module now invisible at printing time.
- Abbreviations now use implicit arguments and arguments scopes for printing.
- Abbreviations to pure names now strictly behave like the name they refer to
(make redirections of qualified names easier).
- Abbreviations for applied constant now propagate the implicit arguments
and arguments scope of the underlying reference (possible source of
incompatibilities generally solvable by changing such abbreviations from
e.g. "Notation foo' := (foo x)" to "Notation foo' y := (foo x (y:=y))").
- The "where" clause now supports multiple notations per defined object.
- Recursive notations automatically expand one step on the left for better
factorization; recursion notations inner separators now ensured being tokens.
- Added "Reserved Infix" as a specific shortcut of the corresponding
"Reserved Notation".
- Open/Close Scope command supports Global option in sections.
Specification language
- New support for local binders in the syntax of Record/Structure fields.
- Fixpoint/CoFixpoint now support building part or all of bodies using tactics.
- Binders given before ":" in lemmas and in definitions built by tactics are
now automatically introduced (possible source of incompatibility that can
be resolved by invoking "Unset Automatic Introduction").
- New support for multiple implicit arguments signatures per reference.
Module system
- Include Type is now deprecated since Include now accept both modules and
module types.
- Declare ML Module supports Local option.
- The sharing between non-logical object and the management of the
name-space has been improved by the new "Delta-equivalence" on
qualified name.
- The include operator has been extended to high-order structures
- Sequences of Include can be abbreviated via new syntax "<+".
- A module (or module type) can be given several "<:" signatures.
- Interactive proofs are now permitted in module type. Functors can hence
be declared as Module Type and be used later to type themselves.
- A functor application can be prefixed by a "!" to make it ignore any
"Inline" annotation in the type of its argument(s) (for examples of
use of the new features, see libraries Structures and Numbers).
- Coercions are now active only when modules are imported (use "Set Automatic
Coercions Import" to get the behavior of the previous versions of Coq).
Extraction
- When using (Recursive) Extraction Library, the filenames are directly the
Coq ones with new appropriate extensions : we do not force anymore
uncapital first letters for Ocaml and capital ones for Haskell.
- The extraction now tries harder to avoid code transformations that can be
dangerous for the complexity. In particular many eta-expansions at the top
of functions body are now avoided, clever partial applications will likely
be preserved, let-ins are almost always kept, etc.
- In the same spirit, auto-inlining is now disabled by default, except for
induction principles, since this feature was producing more frequently
weird code than clear gain. The previous behavior can be restored via
"Set Extraction AutoInline".
- Unicode characters in identifiers are now transformed into ascii strings
that are legal in Ocaml and other languages.
- Harsh support of module extraction to Haskell and Scheme: module hierarchy
is flattened, module abbreviations and functor applications are expanded,
module types and unapplied functors are discarded.
- Less unsupported situations when extracting modules to Ocaml. In particular
module parameters might be alpha-renamed if a name clash is detected.
- Extract Inductive is now possible toward non-inductive types (e.g. nat => int)
- Extraction Implicit: this new experimental command allows to mark
some arguments of a function or constructor for removed during
extraction, even if these arguments don't fit the usual elimination
principles of extraction, for instance the length n of a vector.
- Files ExtrOcaml*.v in plugins/extraction try to provide a library of common
extraction commands: mapping of basics types toward Ocaml's counterparts,
conversions from/to int and big_int, or even complete mapping of nat,Z,N
to int or big_int, or mapping of ascii to char and string to char list
(in this case recognition of ascii constants is hard-wired in the extraction).
Program
- Streamlined definitions using well-founded recursion and measures so
that they can work on any subset of the arguments directly (uses currying).
- Try to automatically clear structural fixpoint prototypes in
obligations to avoid issues with opacity.
- Use return type clause inference in pattern-matching as in the standard
typing algorithm.
- Support [Local Obligation Tactic] and [Next Obligation with tactic].
- Use [Show Obligation Tactic] to print the current default tactic.
- [fst] and [snd] have maximal implicit arguments in Program now (possible
source of incompatibility).
Type classes
- Declaring axiomatic type class instances in Module Type should be now
done via new command "Declare Instance", while the syntax "Instance"
now always provides a concrete instance, both in and out of Module Type.
- Use [Existing Class foo] to declare foo as a class a posteriori.
[foo] can be an inductive type or a constant definition. No
projections or instances are defined.
- Various bug fixes and improvements: support for defined fields,
anonymous instances, declarations giving terms, better handling of
sections and [Context].
Vernacular commands
- New command "Timeout <n> <command>." interprets a command and a timeout
interrupts the interpretation after <n> seconds.
- New command "Compute <expr>." is a shortcut for "Eval vm_compute in <expr>".
- New command "Fail <command>." interprets a command and is successful iff
the command fails on an error (but not an anomaly). Handy for tests and
illustration of wrong commands.
- Most commands referring to constant (e.g. Print or About) now support
referring to the constant by a notation string.
- New option "Boolean Equality Schemes" to make generation of boolean
equality automatic for datatypes (together with option "Decidable
Equality Schemes", this replaces deprecated option "Equality Scheme").
- Made support for automatic generation of case analysis schemes available
to user (governed by option "Set Case Analysis Schemes").
- New command "(Global?) Generalizable [All|No] Variable(s)? ident(s)?" to
declare which identifiers are generalizable in `{} and `() binders.
- New command "Print Opaque Dependencies" to display opaque constants in
addition to all variables, parameters or axioms a theorem or
definition relies on.
- New command "Declare Reduction <id> := <conv_expr>", allowing to write
later "Eval <id> in ...". This command accepts a Local variant.
- Syntax of Implicit Type now supports more than one block of variables of
a given type.
- Command "Canonical Structure" now warns when it has no effects.
- Commands of the form "Set X" or "Unset X" now support "Local" and "Global"
prefixes.
Library
- Use "standard" Coq names for the properties of eq and identity
(e.g. refl_equal is now eq_refl). Support for compatibility is provided.
- The function Compare_dec.nat_compare is now defined directly,
instead of relying on lt_eq_lt_dec. The earlier version is still
available under the name nat_compare_alt.
- Lemmas in library Relations and Reals have been homogenized a bit.
- The implicit argument of Logic.eq is now maximally inserted, allowing
to simply write "eq" instead of "@eq _" in morphism signatures.
- Wrongly named lemmas (Zlt_gt_succ and Zlt_succ_gt) fixed (potential source
of incompatibilities)
- List library:
- Definitions of list, length and app are now in Init/Datatypes.
Support for compatibility is provided.
- Definition of Permutation is now in Sorting/Permtation.v
- Some other light revisions and extensions (possible source
of incompatibilities solvable by qualifying names accordingly).
- In ListSet, set_map has been fixed (source of incompatibilities if used).
- Sorting library:
- new mergesort of worst-case complexity O(n*ln(n)) made available in
Mergesort.v;
- former notion of permutation up to setoid from Permutation.v is
deprecated and moved to PermutSetoid.v;
- heapsort from Heap.v of worst-case complexity O(n*n) is deprecated;
- new file Sorted.v for some definitions of being sorted.
- Structure library. This new library is meant to contain generic
structures such as types with equalities or orders, either
in Module version (for now) or Type Classes (still to do):
- DecidableType.v and OrderedType.v: initial notions for FSets/FMaps,
left for compatibility but considered as deprecated.
- Equalities.v and Orders.v: evolutions of the previous files,
with fine-grain Module architecture, many variants, use of
Equivalence and other relevant Type Classes notions.
- OrdersTac.v: a generic tactic for solving chains of (in)equalities
over variables. See {Nat,N,Z,P}OrderedType.v for concrete instances.
- GenericMinMax.v: any ordered type can be equipped with min and max.
We derived here all the generic properties of these functions.
- MSets library: an important evolution of the FSets library.
"MSets" stands for Modular (Finite) Sets, by contrast with a forthcoming
library of Class (Finite) Sets contributed by S. Lescuyer which will be
integrated with the next release of Coq. The main features of MSets are:
- The use of Equivalence, Proper and other Type Classes features
easing the handling of setoid equalities.
- The interfaces are now stated in iff-style. Old specifications
are now derived properties.
- The compare functions are now pure, and return a "comparison" value.
Thanks to the CompSpec inductive type, reasoning on them remains easy.
- Sets structures requiring invariants (i.e. sorted lists) are
built first as "Raw" sets (pure objects and separate proofs) and
attached with their proofs thanks to a generic functor. "Raw" sets
have now a proper interface and can be manipulated directly.
Note: No Maps yet in MSets. The FSets library is still provided
for compatibility, but will probably be considered as deprecated in the
next release of Coq.
- Numbers library:
- The abstract layer (NatInt, Natural/Abstract, Integer/Abstract) has
been simplified and enhance thanks to new features of the module
system such as Include (see above). It has been extended to Euclidean
division (three flavors for integers: Trunc, Floor and Math).
- The arbitrary-large efficient numbers (BigN, BigZ, BigQ) has also
been reworked. They benefit from the abstract layer improvements
(especially for div and mod). Note that some specifications have
slightly changed (compare, div, mod, shift{r,l}). Ring/Field should
work better (true recognition of constants).
Tools
- Option -R now supports binding Coq root read-only.
- New coqtop/coqc option -beautify to reformat .v files (usable
e.g. to globally update notations).
- New tool beautify-archive to beautify a full archive of developments.
- New coqtop/coqc option -compat X.Y to simulate the general behavior
of previous versions of Coq (provides e.g. support for 8.2 compatibility).
Coqdoc
- List have been revamped. List depth and scope is now determined by
an "offside" whitespace rule.
- Text may be italicized by placing it in _underscores_.
- The "--index <string>" flag changes the filename of the index.
- The "--toc-depth <int>" flag limits the depth of headers which are
included in the table of contents.
- The "--lib-name <string>" flag prints "<string> Foo" instead of
"Library Foo" where library titles are called for. The
"--no-lib-name" flag eliminates the extra title.
- New option "--parse-comments" to allow parsing of regular "(* *)"
comments.
- New option "--plain-comments" to disable interpretation inside comments.
- New option "--interpolate" to try and typeset identifiers in Coq escapings
using the available globalization information.
- New option "--external url root" to refer to external libraries.
- Links to section variables and notations now supported.
Internal infrastructure
- To avoid confusion with the repository of user's contributions,
the subdirectory "contrib" has been renamed into "plugins".
On platforms supporting ocaml native dynlink, code located there
is built as loadable plugins for coqtop.
- An experimental build mechanism via ocamlbuild is provided.
From the top of the archive, run ./configure as usual, and
then ./build. Feedback about this build mechanism is most welcome.
Compiling Coq on platforms such as Windows might be simpler
this way, but this remains to be tested.
- The Makefile system has been simplified and factorized with
the ocamlbuild system. In particular "make" takes advantage
of .mllib files for building .cma/.cmxa. The .vo files to
compile are now listed in several vo.itarget files.
Changes from V8.1 to V8.2
=========================
Language
- If a fixpoint is not written with an explicit { struct ... }, then
all arguments are tried successively (from left to right) until one is
found that satisfies the structural decreasing condition.
- New experimental typeclass system giving ad-hoc polymorphism and
overloading based on dependent records and implicit arguments.
- New syntax "let 'pat := b in c" for let-binding using irrefutable patterns.
- New syntax "forall {A}, T" for specifying maximally inserted implicit
arguments in terms.
- Sort of Record/Structure, Inductive and CoInductive defaults to Type
if omitted.
- (Co)Inductive types can be defined as records
(e.g. "CoInductive stream := { hd : nat; tl : stream }.")
- New syntax "Theorem id1:t1 ... with idn:tn" for proving mutually dependent
statements.
- Support for sort-polymorphism on constants denoting inductive types.
- Several evolutions of the module system (handling of module aliases,
functorial module types, an Include feature, etc).
- Prop now a subtype of Set (predicative and impredicative forms).
- Recursive inductive types in Prop with a single constructor of which
all arguments are in Prop is now considered to be a singleton
type. It consequently supports all eliminations to Prop, Set and Type.
As a consequence, Acc_rect has now a more direct proof [possible source
of easily fixed incompatibility in case of manual definition of a recursor
in a recursive singleton inductive type].
Vernacular commands
- Added option Global to "Arguments Scope" for section surviving.
- Added option "Unset Elimination Schemes" to deactivate the automatic
generation of elimination schemes.
- Modification of the Scheme command so you can ask for the name to be
automatically computed (e.g. Scheme Induction for nat Sort Set).
- New command "Combined Scheme" to build combined mutual induction
principles from existing mutual induction principles.
- New command "Scheme Equality" to build a decidable (boolean) equality
for simple inductive datatypes and a decision property over this equality
(e.g. Scheme Equality for nat).
- Added option "Set Equality Scheme" to make automatic the declaration
of the boolean equality when possible.
- Source of universe inconsistencies now printed when option
"Set Printing Universes" is activated.
- New option "Set Printing Existential Instances" for making the display of
existential variable instances explicit.
- Support for option "[id1 ... idn]", and "-[id1 ... idn]", for the
"compute"/"cbv" reduction strategy, respectively meaning reduce only, or
everything but, the constants id1 ... idn. "lazy" alone or followed by
"[id1 ... idn]", and "-[id1 ... idn]" also supported, meaning apply
all of beta-iota-zeta-delta, possibly restricting delta.
- New command "Strategy" to control the expansion of constants during
conversion tests. It generalizes commands Opaque and Transparent by
introducing a range of levels. Lower levels are assigned to constants
that should be expanded first.
- New options Global and Local to Opaque and Transparent.
- New command "Print Assumptions" to display all variables, parameters
or axioms a theorem or definition relies on.
- "Add Rec LoadPath" now provides references to libraries using partially
qualified names (this holds also for coqtop/coqc option -R).
- SearchAbout supports negated search criteria, reference to logical objects
by their notation, and more generally search of subterms.
- "Declare ML Module" now allows to import .cmxs files when Coq is
compiled in native code with a version of OCaml that supports native
Dynlink (>= 3.11).
- Specific sort constraints on Record now taken into account.
- "Print LoadPath" supports a path argument to filter the display.
Libraries
- Several parts of the libraries are now in Type, in particular FSets,
SetoidList, ListSet, Sorting, Zmisc. This may induce a few
incompatibilities. In case of trouble while fixing existing development,
it may help to simply declare Set as an alias for Type (see file
SetIsType).
- New arithmetical library in theories/Numbers. It contains:
* an abstract modular development of natural and integer arithmetics
in Numbers/Natural/Abstract and Numbers/Integer/Abstract
* an implementation of efficient computational bounded and unbounded
integers that can be mapped to processor native arithmetics.
See Numbers/Cyclic/Int31 for 31-bit integers and Numbers/Natural/BigN
for unbounded natural numbers and Numbers/Integer/BigZ for unbounded
integers.
* some proofs that both older libraries Arith, ZArith and NArith and
newer BigN and BigZ implement the abstract modular development.
This allows in particular BigN and BigZ to already come with a
large database of basic lemmas and some generic tactics (ring),
This library has still an experimental status, as well as the
processor-acceleration mechanism, but both its abstract and its
concrete parts are already quite usable and could challenge the use
of nat, N and Z in actual developments. Moreover, an extension of
this framework to rational numbers is ongoing, and an efficient
Q structure is already provided (see Numbers/Rational/BigQ), but
this part is currently incomplete (no abstract layer and generic
lemmas).
- Many changes in FSets/FMaps. In practice, compatibility with earlier
version should be fairly good, but some adaptations may be required.
* Interfaces of unordered ("weak") and ordered sets have been factorized
thanks to new features of Coq modules (in particular Include), see
FSetInterface. Same for maps. Hints in these interfaces have been
reworked (they are now placed in a "set" database).
* To allow full subtyping between weak and ordered sets, a field
"eq_dec" has been added to OrderedType. The old version of OrderedType
is now called MiniOrderedType and functor MOT_to_OT allow to
convert to the new version. The interfaces and implementations
of sets now contain also such a "eq_dec" field.
* FSetDecide, contributed by Aaron Bohannon, contains a decision
procedure allowing to solve basic set-related goals (for instance,
is a point in a particular set ?). See FSetProperties for examples.
* Functors of properties have been improved, especially the ones about
maps, that now propose some induction principles. Some properties
of fold need less hypothesis.
* More uniformity in implementations of sets and maps: they all use
implicit arguments, and no longer export unnecessary scopes (see
bug #1347)
* Internal parts of the implementations based on AVL have evolved a
lot. The main files FSetAVL and FMapAVL are now much more
lightweight now. In particular, minor changes in some functions
has allowed to fully separate the proofs of operational
correctness from the proofs of well-balancing: well-balancing is
critical for efficiency, but not anymore for proving that these
trees implement our interfaces, hence we have moved these proofs
into appendix files FSetFullAVL and FMapFullAVL. Moreover, a few
functions like union and compare have been modified in order to be
structural yet efficient. The appendix files also contains
alternative versions of these few functions, much closer to the
initial Ocaml code and written via the Function framework.
- Library IntMap, subsumed by FSets/FMaps, has been removed from
Coq Standard Library and moved into a user contribution Cachan/IntMap
- Better computational behavior of some constants (eq_nat_dec and
le_lt_dec more efficient, Z_lt_le_dec and Positive_as_OT.compare
transparent, ...) (exceptional source of incompatibilities).
- Boolean operators moved from module Bool to module Datatypes (may need
to rename qualified references in script and force notations || and &&
to be at levels 50 and 40 respectively).
- The constructors xI and xO of type positive now have postfix notations
"~1" and "~0", allowing to write numbers in binary form easily, for instance
6 is 1~1~0 and 4*p is p~0~0 (see BinPos.v).
- Improvements to NArith (Nminus, Nmin, Nmax), and to QArith (in particular
a better power function).
- Changes in ZArith: several additional lemmas (used in theories/Numbers),
especially in Zdiv, Znumtheory, Zpower. Moreover, many results in
Zdiv have been generalized: the divisor may simply be non-null
instead of strictly positive (see lemmas with name ending by
"_full"). An alternative file ZOdiv proposes a different behavior
(the one of Ocaml) when dividing by negative numbers.
- Changes in Arith: EqNat and Wf_nat now exported from Arith, some
constructions on nat that were outside Arith are now in (e.g. iter_nat).
- In SetoidList, eqlistA now expresses that two lists have similar elements
at the same position, while the predicate previously called eqlistA
is now equivlistA (this one only states that the lists contain the same
elements, nothing more).
- Changes in Reals:
* Most statement in "sigT" (including the
completeness axiom) are now in "sig" (in case of incompatibility,
use proj1_sig instead of projT1, sig instead of sigT, etc).
* More uniform naming scheme (identifiers in French moved to English,
consistent use of 0 -- zero -- instead of O -- letter O --, etc).
* Lemma on prod_f_SO is now on prod_f_R0.
* Useless hypothesis of ln_exists1 dropped.
* New Rlogic.v states a few logical properties about R axioms.
* RIneq.v extended and made cleaner.
- Slight restructuration of the Logic library regarding choice and classical
logic. Addition of files providing intuitionistic axiomatizations of
descriptions: Epsilon.v, Description.v and IndefiniteDescription.v.
- Definition of pred and minus made compatible with the structural
decreasing criterion for use in fixpoints.
- Files Relations/Rstar.v and Relations/Newman.v moved out to the user
contribution repository (contribution CoC_History). New lemmas about
transitive closure added and some bound variables renamed (exceptional
risk of incompatibilities).
- Syntax for binders in terms (e.g. for "exists") supports anonymous names.
Notations, coercions, implicit arguments and type inference
- More automation in the inference of the return clause of dependent
pattern-matching problems.
- Experimental allowance for omission of the clauses easily detectable as
impossible in pattern-matching problems.
- Improved inference of implicit arguments.
- New options "Set Maximal Implicit Insertion", "Set Reversible Pattern
Implicit", "Set Strongly Strict Implicit" and "Set Printing Implicit
Defensive" for controlling inference and use of implicit arguments.
- New modifier in "Implicit Arguments" to force an implicit argument to
be maximally inserted.
- New modifier of "Implicit Arguments" to enrich the set of implicit arguments.
- New options Global and Local to "Implicit Arguments" for section
surviving or non export outside module.
- Level "constr" moved from 9 to 8.
- Structure/Record now printed as Record (unless option Printing All is set).
- Support for parametric notations defining constants.
- Insertion of coercions below product types refrains to unfold
constants (possible source of incompatibility).
- New support for fix/cofix in notations.
Tactic Language
- Second-order pattern-matching now working in Ltac "match" clauses
(syntax for second-order unification variable is "@?X").
- Support for matching on let bindings in match context using syntax
"H := body" or "H := body : type".
- Ltac accepts integer arguments (syntax is "ltac:nnn" for nnn an integer).
- The general sequence tactical "expr_0 ; [ expr_1 | ... | expr_n ]"
is extended so that at most one expr_i may have the form "expr .."
or just "..". Also, n can be different from the number of subgoals
generated by expr_0. In this case, the value of expr (or idtac in
case of just "..") is applied to the intermediate subgoals to make
the number of tactics equal to the number of subgoals.
- A name used as the name of the parameter of a lemma (like f in
"apply f_equal with (f:=t)") is now interpreted as a ltac variable
if such a variable exists (this is a possible source of
incompatibility and it can be fixed by renaming the variables of a
ltac function into names that do not clash with the lemmas
parameter names used in the tactic).
- New syntax "Ltac tac ::= ..." to rebind a tactic to a new expression.
- "let rec ... in ... " now supported for expressions without explicit
parameters; interpretation is lazy to the contrary of "let ... in ...";
hence, the "rec" keyword can be used to turn the argument of a
"let ... in ..." into a lazy one.
- Patterns for hypotheses types in "match goal" are now interpreted in
type_scope.
- A bound variable whose name is not used elsewhere now serves as
metavariable in "match" and it gets instantiated by an identifier
(allow e.g. to extract the name of a statement like "exists x, P x").
- New printing of Ltac call trace for better debugging.
Tactics
- New tactics "apply -> term", "apply <- term", "apply -> term in
ident", "apply <- term in ident" for applying equivalences (iff).
- Slight improvement of the hnf and simpl tactics when applied on
expressions with explicit occurrences of match or fix.
- New tactics "eapply in", "erewrite", "erewrite in".
- New tactics "ediscriminate", "einjection", "esimplify_eq".
- Tactics "discriminate", "injection", "simplify_eq" now support any
term as argument. Clause "with" is also supported.
- Unfoldable references can be given by notation's string rather than by name
in unfold.
- The "with" arguments are now typed using informations from the current goal:
allows support for coercions and more inference of implicit arguments.
- Application of "f_equal"-style lemmas works better.
- Tactics elim, case, destruct and induction now support variants eelim,
ecase, edestruct and einduction.
- Tactics destruct and induction now support the "with" option and the
"in" clause option. If the option "in" is used, an equality is added
to remember the term to which the induction or case analysis applied
(possible source of parsing incompatibilities when destruct or induction is
part of a let-in expression in Ltac; extra parentheses are then required).
- New support for "as" clause in tactics "apply in" and "eapply in".
- Some new intro patterns:
* intro pattern "?A" genererates a fresh name based on A.
Caveat about a slight loss of compatibility:
Some intro patterns don't need space between them. In particular
intros ?a?b used to be legal and equivalent to intros ? a ? b. Now it
is still legal but equivalent to intros ?a ?b.
* intro pattern "(A & ... & Y & Z)" synonym to "(A,....,(Y,Z)))))"
for right-associative constructs like /\ or exists.
- Several syntax extensions concerning "rewrite":
* "rewrite A,B,C" can be used to rewrite A, then B, then C. These rewrites
occur only on the first subgoal: in particular, side-conditions of the
"rewrite A" are not concerned by the "rewrite B,C".
* "rewrite A by tac" allows to apply tac on all side-conditions generated by
the "rewrite A".
* "rewrite A at n" allows to select occurrences to rewrite: rewrite only
happen at the n-th exact occurrence of the first successful matching of
A in the goal.
* "rewrite 3 A" or "rewrite 3!A" is equivalent to "rewrite A,A,A".
* "rewrite !A" means rewriting A as long as possible (and at least once).
* "rewrite 3?A" means rewriting A at most three times.
* "rewrite ?A" means rewriting A as long as possible (possibly never).
* many of the above extensions can be combined with each other.
- Introduction patterns better respect the structure of context in presence of
missing or extra names in nested disjunction-conjunction patterns [possible
source of rare incompatibilities].
- New syntax "rename a into b, c into d" for "rename a into b; rename c into d"
- New tactics "dependent induction/destruction H [ generalizing id_1 .. id_n ]"
to do induction-inversion on instantiated inductive families à la BasicElim.
- Tactics "apply" and "apply in" now able to reason modulo unfolding of
constants (possible source of incompatibility in situations where apply
may fail, e.g. as argument of a try or a repeat and in a ltac function);
versions that do not unfold are renamed into "simple apply" and
"simple apply in" (usable for compatibility or for automation).
- Tactics "apply" and "apply in" now able to traverse conjunctions and to
select the first matching lemma among the components of the conjunction;
tactic "apply" also able to apply lemmas of conclusion an empty type.
- Tactic "apply" now supports application of several lemmas in a row.
- Tactics "set" and "pose" can set functions using notation "(f x1..xn := c)".
- New tactic "instantiate" (without argument).
- Tactic firstorder "with" and "using" options have their meaning swapped for
consistency with auto/eauto (source of incompatibility).
- Tactic "generalize" now supports "at" options to specify occurrences
and "as" options to name the quantified hypotheses.
- New tactic "specialize H with a" or "specialize (H a)" allows to transform
in-place a universally-quantified hypothesis (H : forall x, T x) into its
instantiated form (H : T a). Nota: "specialize" was in fact there in earlier
versions of Coq, but was undocumented, and had a slightly different behavior.
- New tactic "contradict H" can be used to solve any kind of goal as long as
the user can provide afterwards a proof of the negation of the hypothesis H.
If H is already a negation, say ~T, then a proof of T is asked.
If the current goal is a negation, say ~U, then U is saved in H afterwards,
hence this new tactic "contradict" extends earlier tactic "swap", which is
now obsolete.
- Tactics f_equal is now done in ML instead of Ltac: it now works on any
equality of functions, regardless of the arity of the function.
- New options "before id", "at top", "at bottom" for tactics "move"/"intro".
- Some more debug of reflexive omega (romega), and internal clarifications.
Moreover, romega now has a variant "romega with *" that can be also used
on non-Z goals (nat, N, positive) via a call to a translation tactic named
zify (its purpose is to Z-ify your goal...). This zify may also be used
independantly of romega.
- Tactic "remember" now supports an "in" clause to remember only selected
occurrences of a term.
- Tactic "pose proof" supports name overwriting in case of specialization of an
hypothesis.
- Semi-decision tactic "jp" for first-order intuitionistic logic moved to user
contributions (subsumed by "firstorder").
Program
- Moved useful tactics in theories/Program and documented them.
- Add Program.Basics which contains standard definitions for functional
programming (id, apply, flip...)
- More robust obligation handling, dependent pattern-matching and
well-founded definitions.
- New syntax " dest term as pat in term " for destructing objects using
an irrefutable pattern while keeping equalities (use this instead of
"let" in Programs).
- Program CoFixpoint is accepted, Program Fixpoint uses the new way to infer
which argument decreases structurally.
- Program Lemma, Axiom etc... now permit to have obligations in the statement
iff they can be automatically solved by the default tactic.
- Renamed "Obligations Tactic" command to "Obligation Tactic".
- New command "Preterm [ of id ]" to see the actual term fed to Coq for
debugging purposes.
- New option "Transparent Obligations" to control the declaration of
obligations as transparent or opaque. All obligations are now transparent
by default, otherwise the system declares them opaque if possible.
- Changed the notations "left" and "right" to "in_left" and "in_right" to hide
the proofs in standard disjunctions, to avoid breaking existing scripts when
importing Program. Also, put them in program_scope.
Type Classes
- New "Class", "Instance" and "Program Instance" commands to define
classes and instances documented in the reference manual.
- New binding construct " [ Class_1 param_1 .. param_n, Class_2 ... ] "
for binding type classes, usable everywhere.
- New command " Print Classes " and " Print Instances some_class " to
print tables for typeclasses.
- New default eauto hint database "typeclass_instances" used by the default
typeclass instance search tactic.
- New theories directory "theories/Classes" for standard typeclasses
declarations. Module Classes.RelationClasses is a typeclass port of
Relation_Definitions plus a generic development of algebra on
n-ary heterogeneous predicates.
Setoid rewriting
- Complete (and still experimental) rewrite of the tactic
based on typeclasses. The old interface and semantics are
almost entirely respected, except:
- Import Setoid is now mandatory to be able to call setoid_replace
and declare morphisms.
- "-->", "++>" and "==>" are now right associative notations
declared at level 55 in scope signature_scope.
Their introduction may break existing scripts that defined
them as notations with different levels.
- One needs to use [Typeclasses unfold [cst]] if [cst] is used
as an abbreviation hiding products in types of morphisms,
e.g. if ones redefines [relation] and declares morphisms
whose type mentions [relation].
- The [setoid_rewrite]'s semantics change when rewriting with
a lemma: it can rewrite two different instantiations of the lemma
at once. Use [setoid_rewrite H at 1] for (almost) the usual semantics.
[setoid_rewrite] will also try to rewrite under binders now, and can
succeed on different terms than before. In particular, it will unify under
let-bound variables. When called through [rewrite], the semantics are
unchanged though.
- [Add Morphism term : id] has different semantics when used with
parametric morphism: it will try to find a relation on the parameters
too. The behavior has also changed with respect to default relations:
the most recently declared Setoid/Relation will be used, the documentation
explains how to customize this behavior.
- Parametric Relation and Morphism are declared differently, using the
new [Add Parametric] commands, documented in the manual.
- Setoid_Theory is now an alias to Equivalence, scripts building objects
of type Setoid_Theory need to unfold (or "red") the definitions
of Reflexive, Symmetric and Transitive in order to get the same goals
as before. Scripts which introduced variables explicitely will not break.
- The order of subgoals when doing [setoid_rewrite] with side-conditions
is always the same: first the new goal, then the conditions.
- New standard library modules Classes.Morphisms declares
standard morphisms on refl/sym/trans relations.
Classes.Morphisms_Prop declares morphisms on propositional
connectives and Classes.Morphisms_Relations on generalized predicate
connectives. Classes.Equivalence declares notations and tactics
related to equivalences and Classes.SetoidTactics defines the
setoid_replace tactics and some support for the "Add *" interface,
notably the tactic applied automatically before each "Add Morphism"
proof.
- User-defined subrelations are supported, as well as higher-order morphisms
and rewriting under binders. The tactic is also extensible entirely in Ltac.
The documentation has been updated to cover these features.
- [setoid_rewrite] and [rewrite] now support the [at] modifier to select
occurrences to rewrite, and both use the [setoid_rewrite] code, even when
rewriting with leibniz equality if occurrences are specified.
Extraction
- Improved behavior of the Caml extraction of modules: name clashes should
not happen anymore.
- The command Extract Inductive has now a syntax for infix notations. This
allows in particular to map Coq lists and pairs onto Caml ones:
Extract Inductive list => list [ "[]" "(::)" ].
Extract Inductive prod => "(*)" [ "(,)" ].
- In pattern matchings, a default pattern "| _ -> ..." is now used whenever
possible if several branches are identical. For instance, functions
corresponding to decidability of equalities are now linear instead of
quadratic.
- A new instruction Extraction Blacklist id1 .. idn allows to prevent filename
conflits with existing code, for instance when extracting module List
to Ocaml.
CoqIDE
- CoqIDE font defaults to monospace so as indentation to be meaningful.
- CoqIDE supports nested goals and any other kind of declaration in the middle
of a proof.
- Undoing non-tactic commands in CoqIDE works faster.
- New CoqIDE menu for activating display of various implicit informations.
- Added the possibility to choose the location of tabs in coqide:
(in Edit->Preferences->Misc)
- New Open and Save As dialogs in CoqIDE which filter *.v files.
Tools
- New stand-alone .vo files verifier "coqchk".
- Extended -I coqtop/coqc option to specify a logical dir: "-I dir -as coqdir".
- New coqtop/coqc option -exclude-dir to exclude subdirs for option -R.
- The binary "parser" has been renamed to "coq-parser".
- Improved coqdoc and dump of globalization information to give more
meta-information on identifiers. All categories of Coq definitions are
supported, which makes typesetting trivial in the generated documentation.
Support for hyperlinking and indexing developments in the tex output
has been implemented as well.
Miscellaneous
- Coq installation provides enough files so that Ocaml's extensions need not
the Coq sources to be compiled (this assumes O'Caml 3.10 and Camlp5).
- New commands "Set Whelp Server" and "Set Whelp Getter" to customize the
Whelp search tool.
- Syntax of "Test Printing Let ref" and "Test Printing If ref" changed into
"Test Printing Let for ref" and "Test Printing If for ref".
- An overhauled build system (new Makefiles); see dev/doc/build-system.txt.
- Add -browser option to configure script.
- Build a shared library for the C part of Coq, and use it by default on
non-(Windows or MacOS) systems. Bytecode executables are now pure. The
behaviour is configurable with -coqrunbyteflags, -coqtoolsbyteflags and
-custom configure options.
- Complexity tests can be skipped by setting the environment variable
COQTEST_SKIPCOMPLEXITY.
Changes from V8.1gamma to V8.1
==============================
Bug fixes
- Many bugs have been fixed (cf coq-bugs web page)
Tactics
- New tactics ring, ring_simplify and new tactic field now able to manage
power to a positive integer constant. Tactic ring on Z and R, and
field on R manage power (may lead to incompatibilities with V8.1gamma).
- Tactic field_simplify now applicable in hypotheses.
- New field_simplify_eq for simplifying field equations into ring equations.
- Tactics ring, ring_simplify, field, field_simplify and field_simplify_eq
all able to apply user-given equations to rewrite monoms on the fly
(see documentation).
Libraries
- New file ConstructiveEpsilon.v defining an epsilon operator and
proving the axiom of choice constructively for a countable domain
and a decidable predicate.
Changes from V8.1beta to V8.1gamma
==================================
Syntax
- changed parsing precedence of let/in and fun constructions of Ltac:
let x := t in e1; e2 is now parsed as let x := t in (e1;e2).
Language and commands
- Added sort-polymorphism for definitions in Type (but finally abandonned).
- Support for implicit arguments in the types of parameters in
(co-)fixpoints and (co-)inductive declarations.
- Improved type inference: use as much of possible general information.
before applying irreversible unification heuristics (allow e.g. to
infer the predicate in "(exist _ 0 (refl_equal 0) : {n:nat | n=0 })").
- Support for Miller-Pfenning's patterns unification in type synthesis
(e.g. can infer P such that P x y = phi(x,y)).
- Support for "where" clause in cofixpoint definitions.
- New option "Set Printing Universes" for making Type levels explicit.
Tactics
- Improved implementation of the ring and field tactics. For compatibility
reasons, the previous tactics are renamed as legacy ring and legacy field,
but should be considered as deprecated.
- New declarative mathematical proof language.
- Support for argument lists of arbitrary length in Tactic Notation.
- [rewrite ... in H] now fails if [H] is used either in an hypothesis
or in the goal.
- The semantics of [rewrite ... in *] has been slightly modified (see doc).
- Support for "as" clause in tactic injection.
- New forward-reasoning tactic "apply in".
- Ltac fresh operator now builds names from a concatenation of its arguments.
- New ltac tactic "remember" to abstract over a subterm and keep an equality
- Support for Miller-Pfenning's patterns unification in apply/rewrite/...
(may lead to few incompatibilities - generally now useless tactic calls).
Bug fixes
- Fix for notations involving basic "match" expressions.
- Numerous other bugs solved (a few fixes may lead to incompatibilities).
Changes from V8.0 to V8.1beta
=============================
Logic
- Added sort-polymorphism on inductive families
- Allowance for recursively non uniform parameters in inductive types
Syntax
- No more support for version 7 syntax and for translation to version 8 syntax.
- In fixpoints, the { struct ... } annotation is not mandatory any more when
only one of the arguments has an inductive type
- Added disjunctive patterns in match-with patterns
- Support for primitive interpretation of string literals
- Extended support for Unicode ranges
Vernacular commands
- Added "Print Ltac qualid" to print a user defined tactic.
- Added "Print Rewrite HintDb" to print the content of a DB used by
autorewrite.
- Added "Print Canonical Projections".
- Added "Example" as synonym of "Definition".
- Added "Proposition" and "Corollary" as extra synonyms of "Lemma".
- New command "Whelp" to send requests to the Helm database of proofs
formalized in the Calculus of Inductive Constructions.
- Command "functional induction" has been re-implemented from the new
"Function" command.
Ltac and tactic syntactic extensions
- New primitive "external" for communication with tool external to Coq
- New semantics for "match t with": if a clause returns a
tactic, it is now applied to the current goal. If it fails, the next
clause or next matching subterm is tried (i.e. it behaves as "match
goal with" does). The keyword "lazymatch" can be used to delay the
evaluation of tactics occurring in matching clauses.
- Hint base names can be parametric in auto and trivial.
- Occurrence values can be parametric in unfold, pattern, etc.
- Added entry constr_may_eval for tactic extensions.
- Low-priority term printer made available in ML-written tactic extensions.
- "Tactic Notation" extended to allow notations of tacticals.
Tactics
- New implementation and generalization of [setoid_]* (setoid_rewrite,
setoid_symmetry, setoid_transitivity, setoid_reflexivity and autorewite).
New syntax for declaring relations and morphisms (old syntax still working
with minor modifications, but deprecated).
- New implementation (still experimental) of the ring tactic with a built-in
notion of coefficients and a better usage of setoids.
- New conversion tactic "vm_compute": evaluates the goal (or an hypothesis)
with a call-by-value strategy, using the compiled version of terms.
- When rewriting H where H is not directly a Coq equality, search first H for
a registered setoid equality before starting to reduce in H. This is unlikely
to break any script. Should this happen nonetheless, one can insert manually
some "unfold ... in H" before rewriting.
- Fixed various bugs about (setoid) rewrite ... in ... (in particular #1101)
- "rewrite ... in" now accepts a clause as place where to rewrite instead of
juste a simple hypothesis name. For instance:
rewrite H in H1,H2 |- * means rewrite H in H1; rewrite H in H2; rewrite H
rewrite H in * |- will do try rewrite H in Hi for all hypothesis Hi <> H.
- Added "dependent rewrite term" and "dependent rewrite term in hyp".
- Added "autorewrite with ... in hyp [using ...]".
- Tactic "replace" now accepts a "by" tactic clause.
- Added "clear - id" to clear all hypotheses except the ones depending in id.
- The argument of Declare Left Step and Declare Right Step is now a term
(it used to be a reference).
- Omega now handles arbitrary precision integers.
- Several bug fixes in Reflexive Omega (romega).
- Idtac can now be left implicit in a [...|...] construct: for instance,
[ foo | | bar ] stands for [ foo | idtac | bar ].
- Fixed a "fold" bug (non critical but possible source of incompatibilities).
- Added classical_left and classical_right which transforms |- A \/ B into
~B |- A and ~A |- B respectively.
- Added command "Declare Implicit Tactic" to set up a default tactic to be
used to solve unresolved subterms of term arguments of tactics.
- Better support for coercions to Sortclass in tactics expecting type
arguments.
- Tactic "assert" now accepts "as" intro patterns and "by" tactic clauses.
- New tactic "pose proof" that generalizes "assert (id:=p)" with intro patterns.
- New introduction pattern "?" for letting Coq choose a name.
- Introduction patterns now support side hypotheses (e.g. intros [|] on
"(nat -> nat) -> nat" works).
- New introduction patterns "->" and "<-" for immediate rewriting of
introduced hypotheses.
- Introduction patterns coming after non trivial introduction patterns now
force full introduction of the first pattern (e.g. "intros [[|] p]" on
"nat->nat->nat" now behaves like "intros [[|?] p]")
- Added "eassumption".
- Added option 'using lemmas' to auto, trivial and eauto.
- Tactic "congruence" is now complete for its intended scope (ground
equalities and inequalities with constructors). Furthermore, it
tries to equates goal and hypotheses.
- New tactic "rtauto" solves pure propositional logic and gives a
reflective version of the available proof.
- Numbering of "pattern", "unfold", "simpl", ... occurrences in "match
with" made consistent with the printing of the return clause after
the term to match in the "match-with" construct (use "Set Printing All"
to see hidden occurrences).
- Generalization of induction "induction x1...xn using scheme" where
scheme is an induction principle with complex predicates (like the
ones generated by function induction).
- Some small Ltac tactics has been added to the standard library
(file Tactics.v):
* f_equal : instead of using the different f_equalX lemmas
* case_eq : a "case" without loss of information. An equality
stating the current situation is generated in every sub-cases.
* swap : for a negated goal ~B and a negated hypothesis H:~A,
swap H asks you to prove A from hypothesis B
* revert : revert H is generalize H; clear H.
Extraction
- All type parts should now disappear instead of sometimes producing _
(for instance in Map.empty).
- Haskell extraction: types of functions are now printed, better
unsafeCoerce mechanism, both for hugs and ghc.
- Scheme extraction improved, see http://www.pps.jussieu.fr/~letouzey/scheme.
- Many bug fixes.
Modules
- Added "Locate Module qualid" to get the full path of a module.
- Module/Declare Module syntax made more uniform.
- Added syntactic sugar "Declare Module Export/Import" and
"Module Export/Import".
- Added syntactic sugar "Module M(Export/Import X Y: T)" and
"Module Type M(Export/Import X Y: T)"
(only for interactive definitions)
- Construct "with" generalized to module paths:
T with (Definition|Module) M1.M2....Mn.l := l'.
Notations
- Option "format" aware of recursive notations.
- Added insertion of spaces by default in recursive notations w/o separators.
- No more automatic printing box in case of user-provided printing "format".
- New notation "exists! x:A, P" for unique existence.
- Notations for specific numerals now compatible with generic notations of
numerals (e.g. "1" can be used to denote the unit of a group without
hiding 1%nat)
Libraries
- New library on String and Ascii characters (contributed by L. Thery).
- New library FSets+FMaps of finite sets and maps.
- New library QArith on rational numbers.
- Small extension of Zmin.V, new Zmax.v, new Zminmax.v.
- Reworking and extension of the files on classical logic and
description principles (possible incompatibilities)
- Few other improvements in ZArith potentially exceptionally breaking the
compatibility (useless hypothesys of Zgt_square_simpl and
Zlt_square_simpl removed; fixed names mentioning letter O instead of
digit 0; weaken premises in Z_lt_induction).
- Restructuration of Eqdep_dec.v and Eqdep.v: more lemmas in Type.
- Znumtheory now contains a gcd function that can compute within Coq.
- More lemmas stated on Type in Wf.v, removal of redundant Acc_iter and
Acc_iter2.
- Change of the internal names of lemmas in OmegaLemmas.
- Acc in Wf.v and clos_refl_trans in Relation_Operators.v now rely on
the allowance for recursively non uniform parameters (possible
source of incompatibilities: explicit pattern-matching on these
types may require to remove the occurrence associated to their
recursively non uniform parameter).
- Coq.List.In_dec has been set transparent (this may exceptionally break
proof scripts, set it locally opaque for compatibility).
- More on permutations of lists in List.v and Permutation.v.
- List.v has been much expanded.
- New file SetoidList.v now contains results about lists seen with
respect to a setoid equality.
- Library NArith has been expanded, mostly with results coming from
Intmap (for instance a bitwise xor), plus also a bridge between N and
Bitvector.
- Intmap has been reorganized. In particular its address type "addr" is
now N. User contributions known to use Intmap have been adapted
accordingly. If you're using this library please contact us.
A wrapper FMapIntMap now presents Intmap as a particular implementation
of FMaps. New developments are strongly encouraged to use either this
wrapper or any other implementations of FMap instead of using directly
this obsolete Intmap.
Tools
- New semantics for coqtop options ("-batch" expects option "-top dir"
for loading vernac file that contains definitions).
- Tool coq_makefile now removes custom targets that are file names in
"make clean"
- New environment variable COQREMOTEBROWSER to set the command invoked
to start the remote browser both in Coq and coqide. Standard syntax:
"%s" is the placeholder for the URL.
Changes from V8.0beta to V8.0
=============================
Vernacular commands
- New option "Set Printing All" to deactivate all high-level forms of
printing (implicit arguments, coercions, destructing let,
if-then-else, notations, projections)
- "Functional Scheme" and "Functional Induction" extended to polymorphic
types and dependent types
- Notation now allows recursive patterns, hence recovering parts of the
fonctionalities of pre-V8 Grammar/Syntax commands
- Command "Print." discontinued.
- Redundant syntax "Implicit Arguments On/Off" discontinued
New syntax
- Semantics change of the if-then-else construction in new syntax:
"if c then t1 else t2" now stands for
"match c with c1 _ ... _ => t1 | c2 _ ... _ => t2 end"
with no dependency of t1 and t2 in the arguments of the constructors;
this may cause incompatibilities for files translated using coq 8.0beta
Interpretation scopes
- Delimiting key %bool for bool_scope added
- Import no more needed to activate argument scopes from a module
Tactics and the tactic Language
- Semantics of "assert" is now consistent with the reference manual
- New tactics stepl and stepr for chaining transitivity steps
- Tactic "replace ... with ... in" added
- Intro patterns now supported in Ltac (parsed with prefix "ipattern:")
Executables and tools
- Added option -top to change the name of the toplevel module "Top"
- Coqdoc updated to new syntax and now part of Coq sources
- XML exportation tool now exports the structure of vernacular files
(cf chapter 13 in the reference manual)
User contributions
- User contributions have been updated to the new syntax
Bug fixes
- Many bugs have been fixed (cf coq-bugs web page)
Changes from V8.0beta old syntax to V8.0beta
============================================
New concrete syntax
- A completely new syntax for terms
- A more uniform syntax for tactics and the tactic language
- A few syntactic changes for vernacular commands
- A smart automatic translator translating V8.0 files in old syntax to
files valid for V8.0
Syntax extensions
- "Grammar" for terms disappears
- "Grammar" for tactics becomes "Tactic Notation"
- "Syntax" disappears
- Introduction of a notion of interpretation scope allowing to use the
same notations in various contexts without using specific delimiters
(e.g the same expression "4<=3+x" is interpreted either in "nat",
"positive", "N" (previously "entier"), "Z", "R", depending on which
interpretation scope is currently open) [see documentation for details]
- Notation now mandatorily requires a precedence and associativity
(default was to set precedence to 1 and associativity to none)
Revision of the standard library
- Many lemmas and definitions names have been made more uniform mostly
in Arith, NArith, ZArith and Reals (e.g : "times" -> "Pmult",
"times_sym" -> "Pmult_comm", "Zle_Zmult_pos_right" ->
"Zmult_le_compat_r", "SUPERIEUR" -> "Gt", "ZERO" -> "Z0")
- Order and names of arguments of basic lemmas on nat, Z, positive and R
have been made uniform.
- Notions of Coq initial state are declared with (strict) implicit arguments
- eq merged with eqT: old eq disappear, new eq (written =) is old eqT
and new eqT is syntactic sugar for new eq (notation == is an alias
for = and is written as it, exceptional source of incompatibilities)
- Similarly, ex, ex2, all, identity are merged with exT, exT2, allT, identityT
- Arithmetical notations for nat, positive, N, Z, R, without needing
any backquote or double-backquotes delimiters.
- In Lists: new concrete notations; argument of nil is now implicit
- All changes in the library are taken in charge by the translator
Semantical changes during translation
- Recursive keyword set by default (and no longer needed) in Tactic Definition
- Set Implicit Arguments is strict by default in new syntax
- reductions in hypotheses of the form "... in H" now apply to the type
also if H is a local definition
- etc
Gallina
- New syntax of the form "Inductive bool : Set := true, false : bool." for
enumerated types
- Experimental syntax of the form p.(fst) for record projections
(activable with option "Set Printing Projections" which is
recognized by the translator)
Known problems of the automatic translation
- iso-latin-1 characters are no longer supported: move your files to
7-bits ASCII or unicode before translation (swith to unicode is
automatically done if a file is loaded and saved again by coqide)
- Renaming in ZArith: incompatibilities in Coq user contribs due to
merging names INZ, from Reals, and inject_nat.
- Renaming and new lemmas in ZArith: may clash with names used by users
- Restructuration of ZArith: replace requirement of specific modules
in ZArith by "Require Import ZArith_base" or "Require Import ZArith"
- Some implicit arguments must be made explicit before translation: typically
for "length nil", the implicit argument of length must be made explicit
- Grammar rules, Infix notations and V7.4 Notations must be updated wrt the
new scheme for syntactic extensions (see translator documentation)
- Unsafe for annotation Cases when constructors coercions are used or when
annotations are eta-reduced predicates
Changes from V7.4 to V8.0beta old syntax
========================================
Logic
- Set now predicative by default
- New option -impredicative-set to set Set impredicative
- The standard library doesn't need impredicativity of Set and is
compatible with the classical axioms which contradict Set impredicativity
Syntax for arithmetic
- Notation "=" and "<>" in Z and R are no longer implicitly in Z or R
(with possible introduction of a coercion), use <Z>...=... or
<Z>...<>... instead
- Locate applied to a simple string (e.g. "+") searches for all
notations containing this string
Vernacular commands
- "Declare ML Module" now allows to import .cma files. This avoids to use a
bunch of "Declare ML Module" statements when using several ML files.
- "Set Printing Width n" added, allows to change the size of width printing.
- "Implicit Variables Type x,y:t" (new syntax: "Implicit Types x y:t")
assigns default types for binding variables.
- Declarations of Hints and Notation now accept a "Local" flag not to
be exported outside the current file even if not in section
- "Print Scopes" prints all notations
- New command "About name" for light printing of type, implicit arguments, etc.
- New command "Admitted" to declare incompletely proven statement as axioms
- New keyword "Conjecture" to declare an axiom intended to be provable
- SearchAbout can now search for lemmas referring to more than one constant
and on substrings of the name of the lemma
- "Print Implicit" displays the implicit arguments of a constant
- Locate now searches for all names having a given suffix
- New command "Functional Scheme" for building an induction principle
from a function defined by case analysis and fix.
Commands
- new coqtop/coqc option -dont-load-proofs not to load opaque proofs in memory
Implicit arguments
- Inductive in sections declared with implicits now "discharged" with
implicits (like constants and variables)
- Implicit Arguments flags are now synchronous with reset
- New switch "Unset/Set Printing Implicits" (new syntax: "Unset/Set Printing
Implicit") to globally control printing of implicits
Grammar extensions
- Many newly supported UTF-8 encoded unicode blocks
- Greek letters (0380-03FF), Hebrew letters (U05D0-05EF), letter-like
symbols (2100-214F, that includes double N,Z,Q,R), prime
signs (from 2080-2089) and characters from many written languages
are valid in identifiers
- mathematical operators (2200-22FF), supplemental mathematical
operators (2A00-2AFF), miscellaneous technical (2300-23FF that
includes sqrt symbol), miscellaneous symbols (2600-26FF), arrows
(2190-21FF and 2900-297F), invisible mathematical operators (from
2080-2089), ... are valid symbols
Library
- New file about the factorial function in Arith
- An additional elimination Acc_iter for Acc, simplier than Acc_rect.
This new elimination principle is used for definition well_founded_induction.
- New library NArith on binary natural numbers
- R is now of type Set
- Restructuration in ZArith library
- "true_sub" used in Zplus now a definition, not a local one (source
of incompatibilities in proof referring to true_sub, may need extra Unfold)
- Some lemmas about minus moved from fast_integer to Arith/Minus.v
(le_minus, lt_mult_left) (theoretical source of incompatibilities)
- Several lemmas moved from auxiliary.v and zarith_aux.v to
fast_integer.v (theoretical source of incompatibilities)
- Variables names of iff_trans changed (source of incompatibilities)
- ZArith lemmas named OMEGA something or fast_ something, and lemma new_var
are now out of ZArith (except OMEGA2)
- Redundant ZArith lemmas have been renamed: for the following pairs,
use the second name (Zle_Zmult_right2, Zle_mult_simpl), (OMEGA2,
Zle_0_plus), (Zplus_assoc_l, Zplus_assoc), (Zmult_one, Zmult_1_n),
(Zmult_assoc_l, Zmult_assoc), (Zmult_minus_distr, Zmult_Zminus_distr_l)
(add_un_double_moins_un_xO, is_double_moins_un),
(Rlt_monotony_rev,Rlt_monotony_contra) (source of incompatibilities)
- Few minor changes (no more implicit arguments in
Zmult_Zminus_distr_l and Zmult_Zminus_distr_r, lemmas moved from
Zcomplements to other files) (rare source of incompatibilities)
- New lemmas provided by users added
Tactic language
- Fail tactic now accepts a failure message
- Idtac tactic now accepts a message
- New primitive tactic "FreshId" (new syntax: "fresh") to generate new names
- Debugger prints levels of calls
Tactics
- Replace can now replace proofs also
- Fail levels are now decremented at "Match Context" blocks only and
if the right-hand-side of "Match term With" are tactics, these
tactics are never evaluated immediately and do not induce
backtracking (in contrast with "Match Context")
- Quantified names now avoid global names of the current module (like
Intro names did) [source of rare incompatibilities: 2 changes in the set of
user contribs]
- NewDestruct/NewInduction accepts intro patterns as introduction names
- NewDestruct/NewInduction now work for non-inductive type using option "using"
- A NewInduction naming bug for inductive types with functional
arguments (e.g. the accessibility predicate) has been fixed (source
of incompatibilities)
- Symmetry now applies to hypotheses too
- Inversion now accept option "as [ ... ]" to name the hypotheses
- Contradiction now looks also for contradictory hypotheses stating ~A and A
(source of incompatibility)
- "Contradiction c" try to find an hypothesis in context which
contradicts the type of c
- Ring applies to new library NArith (require file NArithRing)
- Field now works on types in Set
- Auto with reals now try to replace le by ge (Rge_le is no longer an
immediate hint), resulting in shorter proofs
- Instantiate now works in hyps (syntax : Instantiate in ...)
- Some new tactics : EConstructor, ELeft, Eright, ESplit, EExists
- New tactic "functional induction" to perform case analysis and
induction following the definition of a function.
- Clear now fails when trying to remove a local definition used by
a constant appearing in the current goal
Extraction (See details in plugins/extraction/CHANGES)
- The old commands: (Recursive) Extraction Module M.
are now: (Recursive) Extraction Library M.
To use these commands, M should come from a library M.v
- The other syntax Extraction & Recursive Extraction now accept
module names as arguments.
Bugs
- see coq-bugs server for the complete list of fixed bugs
Miscellaneous
- Implicit parameters of inductive types definition now taken into
account for infering other implicit arguments
Incompatibilities
- Persistence of true_sub (4 incompatibilities in Coq user contributions)
- Variable names of some constants changed for a better uniformity (2 changes
in Coq user contributions)
- Naming of quantified names in goal now avoid global names (2 occurrences)
- NewInduction naming for inductive types with functional arguments
(no incompatibility in Coq user contributions)
- Contradiction now solve more goals (source of 2 incompatibilities)
- Merge of eq and eqT may exceptionally result in subgoals now
solved automatically
- Redundant pairs of ZArith lemmas may have different names: it may
cause "Apply/Rewrite with" to fail if using the first name of a pair
of redundant lemmas (this is solved by renaming the variables bound by
"with"; 3 incompatibilities in Coq user contribs)
- ML programs referring to constants from fast_integer.v must use
"Coqlib.gen_constant_modules Coqlib.zarith_base_modules" instead
Changes from V7.3.1 to V7.4
===========================
Symbolic notations
- Introduction of a notion of scope gathering notations in a consistent set;
a notation sets has been developed for nat, Z and R (undocumented)
- New command "Notation" for declaring notations simultaneously for
parsing and printing (see chap 10 of the reference manual)
- Declarations with only implicit arguments now handled (e.g. the
argument of nil can be set implicit; use !nil to refer to nil
without arguments)
- "Print Scope sc" and "Locate ntn" allows to know to what expression a
notation is bound
- New defensive strategy for printing or not implicit arguments to ensure
re-type-checkability of the printed term
- In Grammar command, the only predefined non-terminal entries are ident,
global, constr and pattern (e.g. nvar, numarg disappears); the only
allowed grammar types are constr and pattern; ast and ast list are no
longer supported; some incompatibilities in Grammar: when a syntax is a
initial segment of an other one, Grammar does not work, use Notation
Library
- Lemmas in Set from Compare_dec.v (le_lt_dec, ...) and Wf_nat.v
(lt_wf_rec, ...) are now transparent. This may be source of
incompatibilities.
- Syntactic Definitions Fst, Snd, Ex, All, Ex2, AllT, ExT, ExT2,
ProjS1, ProjS2, Error, Value and Except are turned to
notations. They now must be applied (incompatibilities only in
unrealistic cases).
- More efficient versions of Zmult and times (30% faster)
- Reals: the library is now divided in 6 parts (Rbase, Rfunctions,
SeqSeries, Rtrigo, Ranalysis, Integration). New tactics: Sup and
RCompute. See Reals.v for details.
Modules
- Beta version, see doc chap 2.5 for commands and chap 5 for theory
Language
- Inductive definitions now accept ">" in constructor types to declare
the corresponding constructor as a coercion.
- Idem for assumptions declarations and constants when the type is mentionned.
- The "Coercion" and "Canonical Structure" keywords now accept the
same syntax as "Definition", i.e. "hyps :=c (:t)?" or "hyps :t".
- Theorem-like declaration now accepts the syntax "Theorem thm [x:t;...] : u".
- Remark's and Fact's now definitively behave as Theorem and Lemma: when
sections are closed, the full name of a Remark or a Fact has no longer a
section part (source of incompatibilities)
- Opaque Local's (i.e. built by tactics and ended by Qed), do not
survive section closing any longer; as a side-effect, Opaque Local's
now appear in the local context of proofs; their body is hidden
though (source of incompatibilities); use one of Remark/Fact/Lemma/Theorem
instead to simulate the old behaviour of Local (the section part of
the name is not kept though)
ML tactic and vernacular commands
- "Grammar tactic" and "Grammar vernac" of type "ast" are no longer
supported (only "Grammar tactic simple_tactic" of type "tactic"
remains available).
- Concrete syntax for ML written vernacular commands and tactics is
now declared at ML level using camlp4 macros TACTIC EXTEND et VERNAC
COMMAND EXTEND.
- "Check n c" now "n:Check c", "Eval n ..." now "n:Eval ..."
- "Proof with T" (* no documentation *)
- SearchAbout id - prints all theorems which contain id in their type
Tactic definitions
- Static globalisation of identifiers and global references (source of
incompatibilities, especially, Recursive keyword is required for
mutually recursive definitions).
- New evaluation semantics: no more partial evaluation at definition time;
evaluation of all Tactic/Meta Definition, even producing terms, expect
a proof context to be evaluated (especially "()" is no longer needed).
- Debugger now shows the nesting level and the reasons of failure
Tactics
- Equality tactics (Rewrite, Reflexivity, Symmetry, Transitivity) now
understand JM equality
- Simpl and Change now apply to subterms also
- "Simpl f" reduces subterms whose head constant is f
- Double Induction now referring to hypotheses like "Intros until"
- "Inversion" now applies also on quantified hypotheses (naming as
for Intros until)
- NewDestruct now accepts terms with missing hypotheses
- NewDestruct and NewInduction now accept user-provided elimination scheme
- NewDestruct and NewInduction now accept user-provided introduction names
- Omega could solve goals such as ~`x<y` |- `x>=y` but failed when the
hypothesis was unfolded to `x < y` -> False. This is fixed. In addition,
it can also recognize 'False' in the hypothesis and use it to solve the
goal.
- Coercions now handled in "with" bindings
- "Subst x" replaces all ocurrences of x by t in the goal and hypotheses
when an hypothesis x=t or x:=t or t=x exists
- Fresh names for Assert and Pose now based on collision-avoiding
Intro naming strategy (exceptional source of incompatibilities)
- LinearIntuition (* no documentation *)
- Unfold expects a correct evaluable argument
- Clear expects existing hypotheses
Extraction (See details in plugins/extraction/CHANGES and README):
- An experimental Scheme extraction is provided.
- Concerning Ocaml, extracted code is now ensured to always type-check,
thanks to automatic inserting of Obj.magic.
- Experimental extraction of Coq new modules to Ocaml modules.
Proof rendering in natural language
- Export of theories to XML for publishing and rendering purposes now
includes proof-trees (see http://www.cs.unibo.it/helm)
Miscellaneous
- Printing Coercion now used through the standard keywords Set/Add, Test, Print
- "Print Term id" is an alias for "Print id"
- New switch "Unset/Set Printing Symbols" to control printing of
symbolic notations
- Two new variants of implicit arguments are available
- "Unset/Set Contextual Implicits" tells to consider implicit also the
arguments inferable from the context (e.g. for nil or refl_eq)
- "Unset/Set Strict Implicits" tells to consider implicit only the
arguments that are inferable in any case (i.e. arguments that occurs
as argument of rigid constants in the type of the remaining arguments;
e.g. the witness of an existential is not strict since it can vanish when
applied to a predicate which does not use its argument)
Incompatibilities
- "Grammar tactic ... : ast" and "Grammar vernac ... : ast" are no
longer supported, use TACTIC EXTEND and VERNAC COMMAND EXTEND on the
ML-side instead
- Transparency of le_lt_dec and co (leads to some simplification in
proofs; in some cases, incompatibilites is solved by declaring locally
opaque the relevant constant)
- Opaque Local do not now survive section closing (rename them into
Remark/Lemma/... to get them still surviving the sections; this
renaming allows also to solve incompatibilites related to now
forbidden calls to the tactic Clear)
- Remark and Fact have no longer (very) long names (use Local instead in case
of name conflict)
Bugs
- Improved localisation of errors in Syntactic Definitions
- Induction principle creation failure in presence of let-in fixed (#238)
- Inversion bugs fixed (#212 and #220)
- Omega bug related to Set fixed (#180)
- Type-checking inefficiency of nested destructuring let-in fixed (#216)
- Improved handling of let-in during holes resolution phase (#239)
Efficiency
- Implementation of a memory sharing strategy reducing memory
requirements by an average ratio of 3.
Changes from V7.3 to V7.3.1
===========================
Bug fixes
- Corrupted Field tactic and Match Context tactic construction fixed
- Checking of names already existing in Assert added (PR#182)
- Invalid argument bug in Exact tactic solved (PR#183)
- Colliding bound names bug fixed (PR#202)
- Wrong non-recursivity test for Record fixed (PR#189)
- Out of memory/seg fault bug related to parametric inductive fixed (PR#195)
- Setoid_replace/Setoid_rewrite bug wrt "==" fixed
Misc
- Ocaml version >= 3.06 is needed to compile Coq from sources
- Simplification of fresh names creation strategy for Assert, Pose and
LetTac (PR#192)
Changes from V7.2 to V7.3
=========================
Language
- Slightly improved compilation of pattern-matching (slight source of
incompatibilities)
- Record's now accept anonymous fields "_" which does not build projections
- Changes in the allowed elimination sorts for certain class of inductive
definitions : an inductive definition without constructors
of Sort Prop can be eliminated on sorts Set and Type A "singleton"
inductive definition (one constructor with arguments in the sort Prop
like conjunction of two propositions or equality) can be eliminated
directly on sort Type (In V7.2, only the sorts Prop and Set were allowed)
Tactics
- New tactic "Rename x into y" for renaming hypotheses
- New tactics "Pose x:=u" and "Pose u" to add definitions to local context
- Pattern now working on partially applied subterms
- Ring no longer applies irreversible congruence laws of mult but
better applies congruence laws of plus (slight source of incompatibilities).
- Field now accepts terms to be simplified as arguments (as for Ring). This
extension has been also implemented using the toplevel tactic language.
- Intuition does no longer unfold constants except "<->" and "~". It
can be parameterized by a tactic. It also can introduce dependent
product if needed (source of incompatibilities)
- "Match Context" now matching more recent hypotheses first and failing only
on user errors and Fail tactic (possible source of incompatibilities)
- Tactic Definition's without arguments now allowed in Coq states
- Better simplification and discrimination made by Inversion (source
of incompatibilities)
Bugs
- "Intros H" now working like "Intro H" trying first to reduce if not a product
- Forward dependencies in Cases now taken into account
- Known bugs related to Inversion and let-in's fixed
- Bug unexpected Delta with let-in now fixed
Extraction (details in plugins/extraction/CHANGES or documentation)
- Signatures of extracted terms are now mostly expunged from dummy arguments.
- Haskell extraction is now operational (tested & debugged).
Standard library
- Some additions in [ZArith]: three files (Zcomplements.v, Zpower.v
and Zlogarithms.v) moved from plugins/omega in order to be more
visible, one Zsgn function, more induction principles (Wf_Z.v and
tail of Zcomplements.v), one more general Euclid theorem
- Peano_dec.v and Compare_dec.v now part of Arith.v
Tools
- new option -dump-glob to coqtop to dump globalizations (to be used by the
new documentation tool coqdoc; see http://www.lri.fr/~filliatr/coqdoc)
User Contributions
- CongruenceClosure (congruence closure decision procedure)
[Pierre Corbineau, ENS Cachan]
- MapleMode (an interface to embed Maple simplification procedures over
rational fractions in Coq)
[David Delahaye, Micaela Mayero, Chalmers University]
- Presburger: A formalization of Presburger's algorithm
[Laurent Thery, INRIA Sophia Antipolis]
- Chinese has been rewritten using Z from ZArith as datatype
ZChinese is the new version, Chinese the obsolete one
[Pierre Letouzey, LRI Orsay]
Incompatibilities
- Ring: exceptional incompatibilities (1 above 650 in submitted user
contribs, leading to a simplification)
- Intuition: does not unfold any definition except "<->" and "~"
- Cases: removal of some extra Cases in configurations of the form
"Cases ... of C _ => ... | _ D => ..." (effects on 2 definitions of
submitted user contributions necessitating the removal of now superfluous
proof steps in 3 different proofs)
- Match Context, in case of incompatibilities because of a now non
trapped error (e.g. Not_found or Failure), use instead tactic Fail
to force Match Context trying the next clause
- Inversion: better simplification and discrimination may occasionally
lead to less subgoals and/or hypotheses and different naming of hypotheses
- Unification done by Apply/Elim has been changed and may exceptionally lead
to incompatible instantiations
- Peano_dec.v and Compare_dec.v parts of Arith.v make Auto more
powerful if these files were not already required (1 occurrence of
this in submitted user contribs)
Changes from V7.1 to V7.2
=========================
Language
- Automatic insertion of patterns for local definitions in the type of
the constructors of an inductive types (for compatibility with V6.3
let-in style)
- Coercions allowed in Cases patterns
- New declaration "Canonical Structure id = t : I" to help resolution of
equations of the form (proj ?)=a; if proj(e)=a then a is canonically
equipped with the remaining fields in e, i.e. ? is instantiated by e
Tactics
- New tactic "ClearBody H" to clear the body of definitions in local context
- New tactic "Assert H := c" for forward reasoning
- Slight improvement in naming strategy for NewInduction/NewDestruct
- Intuition/Tauto do not perform useless unfolding and work up to conversion
Extraction (details in plugins/extraction/CHANGES or documentation)
- Syntax changes: there are no more options inside the extraction commands.
New commands for customization and options have been introduced instead.
- More optimizations on extracted code.
- Extraction tests are now embedded in 14 user contributions.
Standard library
- In [Relations], Rstar.v and Newman.v now axiom-free.
- In [Sets], Integers.v now based on nat
- In [Arith], more lemmas in Min.v, new file Max.v, tail-recursive
plus and mult added to Plus.v and Mult.v respectively
- New directory [Sorting] with a proof of heapsort (dragged from 6.3.1 lib)
- In [Reals], more lemmas in Rbase.v, new lemmas on square, square root and
trigonometric functions (R_sqr.v - Rtrigo.v); a complementary approach
and new theorems about continuity and derivability in Ranalysis.v; some
properties in plane geometry such as translation, rotation or similarity
in Rgeom.v; finite sums and Chasles property in Rsigma.v
Bugs
- Confusion between implicit args of locals and globals of same base name fixed
- Various incompatibilities wrt inference of "?" in V6.3.1 fixed
- Implicits in infix section variables bug fixed
- Known coercions bugs fixed
- Apply "universe anomaly" bug fixed
- NatRing now working
- "Discriminate 1", "Injection 1", "Simplify_eq 1" now working
- NewInduction bugs with let-in and recursively dependent hypotheses fixed
- Syntax [x:=t:T]u now allowed as mentioned in documentation
- Bug with recursive inductive types involving let-in fixed
- Known pattern-matching bugs fixed
- Known Cases elimination predicate bugs fixed
- Improved errors messages for pattern-matching and projections
- Better error messages for ill-typed Cases expressions
Incompatibilities
- New naming strategy for NewInduction/NewDestruct may affect 7.1 compatibility
- Extra parentheses may exceptionally be needed in tactic definitions.
- Coq extensions written in Ocaml need to be updated (see dev/changements.txt
for a description of the main changes in the interface files of V7.2)
- New behaviour of Intuition/Tauto may exceptionally lead to incompatibilities
----------------------------------------------------------------------------
Changes from V6.3.1 and V7.0 to V7.1
====================================
Notes:
- items followed by (**) are important sources of incompatibilities
- items followed by (*) may exceptionally be sources of incompatibilities
- items followed by (+) have been introduced in version 7.0
Main novelties
==============
References are to Coq V7.1 reference manual
- New primitive let-in construct (see sections 1.2.8 and )
- Long names (see sections 2.6 and 2.7)
- New high-level tactic language (see chapter 10)
- Improved search facilities (see section 5.2)
- New extraction algorithm managing the Type level (see chapter 17)
- New rewriting tactic for arbitrary equalities (see chapter 19)
- New tactic Field to decide equalities on commutative fields (see 7.11)
- New tactic Fourier to solve linear inequalities on reals numbers (see 7.11)
- New tactics for induction/case analysis in "natural" style (see 7.7)
- Deep restructuration of the code (safer, simpler and more efficient)
- Export of theories to XML for publishing and rendering purposes
(see http://www.cs.unibo.it/helm)
Details of changes
==================
Language: new "let-in" construction
-----------------------------------
- New construction for local definitions (let-in) with syntax [x:=u]t (*)(+)
- Local definitions allowed in Record (a.k.a. record à la Randy Pollack)
Language: long names
--------------------
- Each construction has a unique absolute names built from a base
name, the name of the module in which they are defined (Top if in
coqtop), and possibly an arbitrary long sequence of directory (e.g.
"Coq.Lists.PolyList.flat_map" where "Coq" means that "flat_map" is part
of Coq standard library, "Lists" means it is defined in the Lists
library and "PolyList" means it is in the file Polylist) (+)
- Constructions can be referred by their base name, or, in case of
conflict, by a "qualified" name, where the base name is prefixed
by the module name (and possibly by a directory name, and so
on). A fully qualified name is an absolute name which always refer
to the construction it denotes (to preserve the visibility of
all constructions, no conflict is allowed for an absolute name) (+)
- Long names are available for modules with the possibility of using
the directory name as a component of the module full name (with
option -R to coqtop and coqc, or command Add LoadPath) (+)
- Improved conflict resolution strategy (the Unix PATH model),
allowing more constructions to be referred just by their base name
Language: miscellaneous
-----------------------
- The names of variables for Record projections _and_ for induction principles
(e.g. sum_ind) is now based on the first letter of their type (main
source of incompatibility) (**)(+)
- Most typing errors have now a precise location in the source (+)
- Slightly different mechanism to solve "?" (*)(+)
- More arguments may be considered implicit at section closing (*)(+)
- Bug with identifiers ended by a number greater than 2^30 fixed (+)
- New visibility discipline for Remark, Fact and Local: Remark's and
Fact's now survive at the end of section, but are only accessible using a
qualified names as soon as their strength expires; Local's disappear and
are moved into local definitions for each construction persistent at
section closing
Language: Cases
---------------
- Cases no longer considers aliases inferable from dependencies in types (*)(+)
- A redundant clause in Cases is now an error (*)
Reduction
---------
- New reduction flags "Zeta" and "Evar" in Eval Compute, for inlining of
local definitions and instantiation of existential variables
- Delta reduction flag does not perform Zeta and Evar reduction any more (*)
- Constants declared as opaque (using Qed) can no longer become
transparent (a constant intended to be alternatively opaque and
transparent must be declared as transparent (using Defined)); a risk
exists (until next Coq version) that Simpl and Hnf reduces opaque
constants (*)
New tactics
-----------
- New set of tactics to deal with types equipped with specific
equalities (a.k.a. Setoids, e.g. nat equipped with eq_nat) [by C. Renard]
- New tactic Assert, similar to Cut but expected to be more user-friendly
- New tactic NewDestruct and NewInduction intended to replace Elim
and Induction, Case and Destruct in a more user-friendly way (see
restrictions in the reference manual)
- New tactic ROmega: an experimental alternative (based on reflexion) to Omega
[by P. Crégut]
- New tactic language Ltac (see reference manual) (+)
- New versions of Tauto and Intuition, fully rewritten in the new Ltac
language; they run faster and produce more compact proofs; Tauto is
fully compatible but, in exchange of a better uniformity, Intuition
is slightly weaker (then use Tauto instead) (**)(+)
- New tactic Field to decide equalities on commutative fields (as a
special case, it works on real numbers) (+)
- New tactic Fourier to solve linear inequalities on reals numbers
[by L. Pottier] (+)
- New tactics dedicated to real numbers: DiscrR, SplitRmult, SplitAbsolu (+)
Changes in existing tactics
---------------------------
- Reduction tactics in local definitions apply only to the body
- New syntax of the form "Compute in Type of H." to require a reduction on
the types of local definitions
- Inversion, Injection, Discriminate, ... apply also on the
quantified premises of a goal (using the "Intros until" syntax)
- Decompose has been fixed but hypotheses may get different names (*)(+)
- Tauto now manages uniformly hypotheses and conclusions of the form
"t=t" which all are considered equivalent to "True". Especially,
Tauto now solves goals of the form "H : ~ t = t |- A".
- The "Let" tactic has been renamed "LetTac" and is now based on the
primitive "let-in" (+)
- Elim can no longer be used with an elimination schema different from
the one defined at definition time of the inductive type. To overload
an elimination schema, use "Elim <hyp> using <name of the new schema>"
(*)(+)
- Simpl no longer unfolds the recursive calls of a mutually defined
fixpoint (*)(+)
- Intro now fails if the hypothesis name already exists (*)(+)
- "Require Prolog" is no longer needed (i.e. it is available by default) (*)(+)
- Unfold now fails on a non unfoldable identifier (*)(+)
- Unfold also applies on definitions of the local context
- AutoRewrite now deals only with the main goal and it is the purpose of
Hint Rewrite to deal with generated subgoals (+)
- Redundant or incompatible instantiations in Apply ... with ... are now
correctly managed (+)
Efficiency
----------
- Excessive memory uses specific to V7.0 fixed
- Sizes of .vo files vary a lot compared to V6.3 (from -30% to +300%
depending on the developments)
- An improved reduction strategy for lazy evaluation
- A more economical mechanism to ensure logical consistency at the Type level;
warning: this is experimental and may produce "universes" anomalies
(please report)
Concrete syntax of constructions
--------------------------------
- Only identifiers starting with "_" or a letter, and followed by letters,
digits, "_" or "'" are allowed (e.g. "$" and "@" are no longer allowed) (*)
- A multiple binder like (a:A)(a,b:(P a))(Q a) is no longer parsed as
(a:A)(a0:(P a))(b:(P a))(Q a0) but as (a:A)(a0:(P a))(b:(P a0))(Q a0) (*)(+)
- A dedicated syntax has been introduced for Reals (e.g ``3+1/x``) (+)
- Pretty-printing of Infix notations fixed. (+)
Parsing and grammar extension
-----------------------------
- More constraints when writing ast
- "{...}" and the macros $LIST, $VAR, etc. now expect a metavariable
(an identifier starting with $) (*)
- identifiers should starts with a letter or "_" and be followed
by letters, digits, "_" or "'" (other characters are still
supported but it is not advised to use them) (*)(+)
- Entry "command" in "Grammar" and quotations (<<...>> stuff) is
renamed "constr" as in "Syntax" (+)
- New syntax "[" sentence_1 ... sentence_n"]." to group sentences (useful
for Time and to write grammar rules abbreviating several commands) (+)
- The default parser for actions in the grammar rules (and for
patterns in the pretty-printing rules) is now the one associated to
the grammar (i.e. vernac, tactic or constr); no need then for
quotations as in <:vernac:<...>>; to return an "ast", the grammar
must be explicitly typed with tag ": ast" or ": ast list", or if a
syntax rule, by using <<...>> in the patterns (expression inside
these angle brackets are parsed as "ast"); for grammars other than
vernac, tactic or constr, you may explicitly type the action with
tags ": constr", ": tactic", or ":vernac" (**)(+)
- Interpretation of names in Grammar rule is now based on long names,
which allows to avoid problems (or sometimes tricks;) related to
overloaded names (+)
New commands
------------
- New commands "Print XML All", "Show XML Proof", ... to show or
export theories to XML to be used with Helm's publishing and rendering
tools (see http://www.cs.unibo.it/helm) (by Claudio Sacerdoti Coen) (+)
- New commands to manually set implicit arguments (+)
- "Implicits ident." to activate the implicit arguments mode just for ident
- "Implicits ident [num1 num2 ...]." to explicitly give which
arguments have to be considered as implicit
- New SearchPattern/SearchRewrite (by Yves Bertot) (+)
- New commands "Debug on"/"Debug off" to activate/deactivate the tactic
language debugger (+)
- New commands to map physical paths to logical paths (+)
- Add LoadPath physical_dir as logical_dir
- Add Rec LoadPath physical_dir as logical_dir
Changes in existing commands
----------------------------
- Generalization of the usage of qualified identifiers in tactics
and commands about globals, e.g. Decompose, Eval Delta;
Hints Unfold, Transparent, Require
- Require synchronous with Reset; Require's scope stops at Section ending (*)
- For a module indirectly loaded by a "Require" but not exported,
the command "Import module" turns the constructions defined in the
module accessible by their short name, and activates the Grammar,
Syntax, Hint, ... declared in the module (+)
- The scope of the "Search" command can be restricted to some modules (+)
- Final dot in command (full stop/period) must be followed by a blank
(newline, tabulation or whitespace) (+)
- Slight restriction of the syntax for Cbv Delta: if present, option [-myconst]
must immediately follow the Delta keyword (*)(+)
- SearchIsos currently not supported
- Add ML Path is now implied by Add LoadPath (+)
- New names for the following commands (+)
AddPath -> Add LoadPath
Print LoadPath -> Print LoadPath
DelPath -> Remove LoadPath
AddRecPath -> Add Rec LoadPath
Print Path -> Print Coercion Paths
Implicit Arguments On -> Set Implicit Arguments
Implicit Arguments Off -> Unset Implicit Arguments
Begin Silent -> Set Silent
End Silent -> Unset Silent.
Tools
-----
- coqtop (+)
- Two executables: coqtop.byte and coqtop.opt (if supported by the platform)
- coqtop is a link to the more efficient executable (coqtop.opt if present)
- option -full is obsolete (+)
- do_Makefile renamed into coq_makefile (+)
- New option -R to coqtop and coqc to map a physical directory to a logical
one (+)
- coqc no longer needs to create a temporary file
- No more warning if no initialization file .coqrc exists
Extraction
----------
- New algorithm for extraction able to deal with "Type" (+)
(by J.-C. Filliâtre and P. Letouzey)
Standard library
----------------
- New library on maps on integers (IntMap, contributed by Jean Goubault)
- New lemmas about integer numbers [ZArith]
- New lemmas and a "natural" syntax for reals [Reals] (+)
- Exc/Error/Value renamed into Option/Some/None (*)
New user contributions
----------------------
- Constructive complex analysis and the Fundamental Theorem of Algebra [FTA]
(Herman Geuvers, Freek Wiedijk, Jan Zwanenburg, Randy Pollack,
Henk Barendregt, Nijmegen)
- A new axiomatization of ZFC set theory [Functions_in_ZFC]
(C. Simpson, Sophia-Antipolis)
- Basic notions of graph theory [GRAPHS-BASICS] (Jean Duprat, Lyon)
- A library for floating-point numbers [Float] (Laurent Théry, Sylvie Boldo,
Sophia-Antipolis)
- Formalisation of CTL and TCTL temporal logic [CtlTctl] (Carlos
Daniel Luna,Montevideo)
- Specification and verification of the Railroad Crossing Problem
in CTL and TCTL [RailroadCrossing] (Carlos Daniel Luna,Montevideo)
- P-automaton and the ABR algorithm [PAutomata]
(Christine Paulin, Emmanuel Freund, Orsay)
- Semantics of a subset of the C language [MiniC]
(Eduardo Giménez, Emmanuel Ledinot, Suresnes)
- Correctness proofs of the following imperative algorithms:
Bresenham line drawing algorithm [Bresenham], Marché's minimal edition
distance algorithm [Diff] (Jean-Christophe Filliâtre, Orsay)
- Correctness proofs of Buchberger's algorithm [Buchberger] and RSA
cryptographic algorithm [Rsa] (Laurent Théry, Sophia-Antipolis)
- Correctness proof of Stalmarck tautology checker algorithm
[Stalmarck] (Laurent Théry, Pierre Letouzey, Sophia-Antipolis)
## 113.33.01
- Fix build problem on BSD related to `endian.h`.
## 113.33.00
- Updated to follow core\_kernel's evolution.
- Add variance annotations to a few types in `Command`.
- `Command.Param.choice` represents a sum type.
- Added `Command.Spec.of_param` for conversion from new-style to old
style command line specifications. This is expected to be useful for
gradually converting Spec-based commands into Param-based ones.
- `flag_names` and `anon_names` gives the flags and anons used by a
Command.Param.t, while `mnemonic` combines them to give a string
that's good for referring to that param in error messages.
This feature improves the interface of `Command.Param.one_of` by
saving the caller from passing the flag names separately.
- Remove the closure allocation from `Date0.create_exn`
- Many apps take schedules as command line parameters (to determine when
they'll be up, or when they should raise issues, etc.). Let's add a
Schedule.Stable.V4.flag function to generate the command line param to
make writing this common pattern easier.
- Add Ofday.Option to `time_ns.ml`.
Exports `Time_ns.Span.Option.unchecked_value` and
`.Ofday.Option.unchecked_value`!
- Finally fix `Time_ns.Of_day.of_local_time` w.r.t. DST transitions after
regression test failures at the DST transition.
As a result, clarified slightly the role of `Time_ns.Ofday`, like
`Time.Ofday`, as 24h wall-clock times, not linear time offsets, which
latter would have to be up to 25h for DST.
- Adds `Command.Spec.Arg_type.percent`.
- Add `Stable.V1` to `Time_ns.Ofday.Option.t`, add it to `Core.Stable`, and
standardize the interface to `Option` modules in `Time_ns`.
- Add `Time_ns.to_ofday`.
## 113.24.02
- Deprecated core.syntax and updated `coretop` to use `ppx_jane`
## 113.24.01
- Updated corebuild to use ppx-jane instead of camlp4
Closes #70
## 113.24.00
N.B. Some interface change were made which are not listed here, as they are only
cascading from `core_kernel`. Look at core\_kernel's CHANGES.md file to get a
complete history of the changes made for this release.
- Add `Core.Command.Arg_type.Export.time_zone`
- Fix `Command.shape` to run external programs only once to get their sexp.
Introduces a new variant of Command.t called Proxy. The Exec variant represents the
top-level command of an external executable that has not yet been run; the Proxy variant
represents an arbitrary subcommand that has been extracted by running an external
executable. Command.exec constructs an Exec variant; Command.shape of an Exec variant
runs the executable and generates a tree of Proxy variants representing all the
information from the generated sexp, so the executable will not need to be re-run.
- A version of recvmmsg that pre-allocates and reuses the iovec
record. Profiling indicates this is a non-trivial amount of our I/O
loop (under very heavy load).
Since nobody is using the heavyweight features of the existing
recvmmsg, replace it with the lightweight one. This leads to minor
but important changes to the interfaces of
`Iobuf.recvmmsg_assume_fd_nonblocking` and `Udp.recvmmsg_loop`.
- Switch to ppx.
- `Time.set_sexp_zone` affects `t_of_sexp`
If we're willing to read sexps without zones, we should be willing to let you
control what timezone they're read with.
- Sped up `Llimiter`.
- Make `Interval.Int` implement `Container` and `Binary_searchable`.
- Add `Identifiable.S` to `Unix.Cidr` so that it supports hash tables.
Update `Unix.Cidr.t` to normalize values, e.g. "192.168.1.101/24" ==> "192.168.1.0/24".
- Added "noalloc" attribute to `Linux_ext.unsafe_timerfd_settime`.
- In Iobuf, made some functions take:
(`> write`, _) Iobuf.t
rather than:
(read_write, _) Iobuf.t
if they only need to write to the iobuf and don't need to read it.
- `Time.of_string_abs` didn't support ISO 8601 time zone strings
without colons, or those specified as locations. This version adds
support for time zones without colons
- `Unix.Passwd.getpwents` takes the lock, partially applies `Exn.protect`, then
releases the lock, then completes the application and actually runs stuff.
- Command.file-completion
Files are now completed correctly when paths contain a directory.
Previously, completion when pointed at a directory would put a space at the end.
This would cause the user to hit backspace every time a directory was in the path.
- Add `diff_weekdays` and `diff_weekend_days` functions to date module.
- `Time.to_date_ofday_precise` implements a complete inverse for
`of_date_ofday`. This is needed to give the DWIM-est semantics to Schedule.t
that we can think of.
- `Reduce allocation in Linux_ext.Epoll`
- Add `Time_ns.Of_day.(add_exn, sub_exn, diff)`.
- Adding `head_padded_fixed_string` to Iobuf.
- Move `Core_extended.Std.Sys.home` to `Core.Std.Sys.home_directory`.
- Add `Iobuf.{read,write,input,output}` akin to the bigstring versions.
- Add expert iobuf functions for extracting bigstrings and iovecs that share the iobuf's
underlying storage.
- Add stable `Int63.t` conversions for types in `Time_ns`.
- Rename DNS-based `Inet_addr` sexp conversions to expose their blocking nature.
- Add `Unix.Inet_addr.Stable`.
- Add [Core.Std.Schedule].
- Fixed `Iobuf_packet.iter`, which behaved incorrectly if the packet
didn't start at the lo_min of the iobuf. It used `Iobuf.rewind` when
it should have used `Iobuf.Lo_bound.restore`.
Added `@@deriving compare` to `Iobuf.Bound`.
- Add ability to `Time.format` for a specific time zone
- Make more information available via Command.Shape.t
Expose machine-readable info on anonymous arguments.
- Remove unnecessary rebinding of `(^/)` in `core_filename.ml`. It had one
call site and wasn't exposed. The `(^/)` everyone uses comes from
std.ml
- Add `getifaddrs` to `Core.Std.Unix`.
Handles Packet (for interfaces that do not have an address on Linux systems only), IPv4 and IPv6
address families.
- Implement `Time_ns.Span.to_string_hum` by analogy to `Time.Span.to_string_hum`.
The code and tests are essentially copied from "lib/core/src/span.ml".
- Remove our stubs for `Unix.stat`.
They were upstreamed in 4.02.2.
## 112.35.00
- Tweaked `Unix.stat`'s C code to reduce float rounding error, by using
double-precision rather than single-precision floats.
Following Xavier's comment:
http://caml.inria.fr/mantis/view.php?id=6285
- Added `Date.O` module.
- In `Interval`, exposed `compare` in stable types by having the
appropriate modules match the `Stable` signature.
- Added `Iobuf.Fill.decimal` and `Poke.decimal`, for efficiently writing
integers in decimal format.
- Removed `Filename.O` (and `/^`), since it's not used that much, and is
inconsistent with the older operator for this that's exposed in
`Core.Std`: `^/`.
- Improved `Command` autocompletion to work even if some arguments
can't be parsed.
This is useful because the completion mode does not get fed
precisely the same arguments that it would get if you hit RETURN.
As a simple example, if completion is set up for `my-exe` which
takes a sexp as its first argument, then:
my-exe '(a b)' <TAB>
will run `my-exe` in completion mode with:
'(a b)'
as its first argument, rather than:
(a b)
as would be passed if RETURN had been pressed instead. Since
`Sexp.of_string "'(a b)'"` fails, in this example tab completion
won't work.
Changed the internals a bit to make this possible. Most notably,
the `Parser` module is now applicative rather than monadic, which
required only a few simple changes to support.
- Made `Time_ns.to_time` and `Time_ns.Span.to_span` round to the nearest
microsecond in all cases.
Previously, `Time_ns.Span.to_span` sometimes rounded incorrectly for
negative spans.
- Added `Time.Zone.prev_clock_shift`, the analog of `next_clock_shift`.
val prev_clock_shift
: t
-> before:Time_internal.T.t
-> (Time_internal.T.t * Span.t) option
Implemented `next_clock_shift` and `prev_clock_shift` using
`Array.binary_search_segmented`.
- Added `Lock_file.get_pid : string -> Pid.t option`.
- Added `val random: unit -> int` to `Time_ns` and `Time_ns.Span`.
- Renamed `Iobuf.sub` as `Iobuf.sub_shared`.
This more closely matches `Bigstring`, and clarifies the semantics
of `Iobuf.sub` vs `sub` in `Blit_intf.S`.
- Added `Iobuf` blit modules: `Blit`, `Blit_consume`, `Blit_fill`,
`Blit_consume_and_fill`.
- Added `Piecewise_linear.first_knot` and `last_knot`.
val first_knot : t -> (key * value) option
val last_knot : t -> (key * value) option
- Made `Unix.Cidr` match `Comparable.S_binable`, and added `Cidr.create` and
`Cidr.netmask_of_bits`.
- Moved `Unix.tm` and `Unix.strftime` from `Core_kernel` to `Core`.
- Made `Crc.crc32` return `Int63.t` rather than `int64`, and added
`Crc.bigstring_crc32` and `Iobuf.crc32`.
Cleaned up old cruft in the C stubs for CRC checking.
- Added `Iobuf.narrow_lo` and `narrow_hi`, which comprise
`Iobuf.narrow`.
- Changed `Linux_ext.Timerfd`, `Epoll.wait`, and `Unix.select` to use
(`int`) `Time_ns` rather than (`float`) `Time`.
This avoids spurious float conversions and rounding problems.
Made all timeouts consistently treat negative timeouts as "timeout
immediately".
This fixes an incorrect behavior of `Linux_ext.Timerfd.set_after`
and `set`, which had been rounding to the nearest microsecond, which
was particularly bad for time spans smaller than 500ns, which would
be rounded to zero, and then would cause the timerfd to never fire.
Now, the small span is directly fed to `timerfd_settime`. We also
changed a span of zero to be treated as `1ns`, to avoid the behavior
of `timerfd_settime 0`, which causes the timerfd to be cleared and
never fire.
- Made `Or_error` match `Applicative.S`.
- Added `Command.Param`, with the intention of one day replacing
`Command.Spec` and providing an applicative interface for command-line
parsing.
This change required lots of rearrangement of `command.mli` so that
`Command.Param` and `Command.Spec` could share large portions of
their interface. As a side effect, the interface is more sweeksy
than before.
- Added `Command.shape`, for exposing the shape of a command, including
what subcommands its has.
- Changed `Syscall_result.to_result` to return a preallocated object,
and changed many uses to take advantage of this property.
Pattern matching on results is much clearer than if-analysis and
avoids double-checking errors in many cases.
`Syscall_result.to_result` can only return preallocated results for
a few `Ok` values from `Syscall_result.Int`, of course, and likewise
for other large `ok_value` types. We have initially, and
arbitrarily, limited preallocation to 64 `errno`'s and 2048
`ok_value`'s.
- Added `Sys.big_endian : bool`, from `Caml.Sys`.
- Disabled unit tests in `Time_ns` that started failing around 10:40pm
NYC 2015-05-15.
The tests indicate an off-by-one-microsecond error in round tripping
between `Time.Span.t` and `Time_ns.Span.t`.
## 112.24.00
- Renamed `Dequeue` as `Deque`.
- Added `Fdeque`, a functional deque (a double-ended `Fqueue`, or a functional `Deque`).
- Changed `Fqueue`'s bin-io format, and added a stable type.
Deprecated deque-like functions in favor of `Fdeque`.
- Added `Fheap`, a functional heap implementation based on pairing heaps.
- Reverted the change to `Or_error`'s bin-io format made in 112.17, going back
to the format in 112.16 and before.
- Added to `Unix.env` type a ``Replace_raw` variant, as used in `exec` and
`fork_exec`.
- Added `Array.Permissioned` module, which has a permissioned array type and
permissioned versions of all the regular array functions.
- Added `Date.week_number : t -> int`.
- Added values to `Day_of_week`: `of_int_exn`, `iso_8601_weekday_number`,
`weekdays`.
val of_int_exn : int -> t
val iso_8601_weekday_number : t -> int
val weekdays : t list (- [ Mon; Tue; Wed; Thu; Fri ] *)
- Switched `Float` IEEE functions to use `Int63.t` for the mantissa rather than
`int`, so they work on 32-bit platforms.
- Added a `length` field to the `Map.t` record, making `Map.length` `O(1)`
rather than `O(n)`.
- Moved a fragment of `Time_ns` from `Core` to `Core_kernel`, enough so that
`Async_kernel` can use `Core_kernel.Time_ns` and ultimately only depend on
`Core_kernel`.
- Fixed compilation of `Time_ns` 32-bit Linux.
- Added `Bounded_int_table.clear`.
- Fixed the `module_name` passed to `Identifiable.Make` for a number of modules.
The module name must be an absolute module path.
Reported here: https://github.com/janestreet/core/issues/52
- Added `Tuple.Binable` functor, for making binable tuples.
- Sped up a `Time_stamp_counter` unit test.
`Time_stamp_counter` unit test has an 18s unit test, which seems
excessive. Take a couple of orders of magnitude off the number of
iterations.
- Added `Time_ns.pause`, whose implementation is the same as `Time.pause`.
This involved moving the `nanosleep` C code from `Core` to
`Core_kernel`.
This was necessary so that `Async_kernel` can pause without introducing
a dependence of Async on Core.
- Made `Core_kernel.Time_ns.Alternate_sexp` use a similar format to `Core.Time_ns`.
This was needed so that `Async_kernel` can use a nice sexp format for
time spans.
- Changed `Timing_wheel` implementation to use `Time_ns`, and moved to
`Core_kernel.Timing_wheel_ns`; made `Core.Timing_wheel` a wrapper around
`Timing_wheel_ns`.
Generalized the timing-wheel interface to be parametric in `Time`, so
that one interface applies to both `Timing_wheel` and
`Timing_wheel_ns`.
Generalized the timing-wheel unit tests to a functor,
`Timing_wheel_unit_tests.Make`, that is used to test both
`Timing_wheel_ns` and `Timing_wheel_float`. Moved a few tests that
depend on `Time` and `Date` from the functor into
`timing_wheel_float_unit_tests.ml`.
Split out `Timing_wheel.Debug` into a separate functor,
`Timing_wheel_debug.Make`.
This was done in so that `Async_kernel` can depend only on
`Core_kernel` and not `Core`.
- Added optional arguments to `Command.group`: `?body` and
`?preserve_subcommand_order`.
`preserve_subcommand_order : unit` causes subcommands to be in the order
they are specified, rather than sorted.
`body : (path:string list -> unit)` is called when no additional
arguments are passed.
- Added accessor function `Command.summary : t -> string`.
- Fixed a bug in `Time.Span` robust comparison.
- Changed `Command`'s tab-completion bash code so that it is possible for
programs to return completions containing spaces.
Actually knowing when and how to do so is difficult, because of course there's escaping to
worry about. Adding helper functions to make that sort of thing manageable is left for
future work.
- In `Command`, made the `-version` and `-build-info` flags work at the top
level when there are subcommands.
- Added `Sequence.interleaved_cartesian_product`, which implements cartesian
product of potentially infinite sequences.
## 112.17.00
- Deprecated the single-line files that simply `include` the
corresponding Core_kernel module. Those are unnecessary, because
people should use `Core.Std`.
We will keep these aliases around for a version before deleted them
entirely.
- Changed finalizers and signal handlers to, upon an unhandled
exception, exit nonzero rather than asynchronously raise.
- Removed `Time.Zone.find_office`.
Replaced uses with the still-blocking `Time.Zone.find_exn`
- Made many changes to `Time` to make the time zone explicit instead
of implicitly using the local timezone.
Added `zone:Time.Zone.t` parameters to many functions. In almost
all cases, used `~zone:Time.Zone.local` where previously it was
implicit.
Removed `of_local_ofday` and `to_local_ofday` in favor of the
explicit versions (with `Time.Zone.local`).
Removed `Time.Zone.machine_zone ()` in favor of `local`.
- Exported `Core.Std.With_return`.
- Exposed `Core.Std.with_return_option`.
- Fixed `Time_ns.Ofday.of_span_since_start_of_day` to check its input.
- Changed `Time_ns.to_span` and `of_span` to round to microseconds,
for round trippability.
- Added `Unix.Error` module, for the `Unix.error` type.
- Added `Unix.Syscall_result`, a new abstract type representing the
result of a Unix system call as an `int`, to avoid allocation.
A lot of Unix system calls return an integer on success, so for ones
that are called a lot, we can encode errors as `-errno`. This
module abstracts this concept.
- Changed `Iobuf.recvmmsg` functions to return the new
`Unix.Syscall_result`.
- Changed `Unix.exec`'s `?env` argument to support extending the
environment in addition to replacing it.
- Added `with compare` to `Unix.Exit.t` and `Unix.Exit_or_signal.t`.
- Moved `Backtrace` to `Core_kernel`.
Deleted `backtrace_stubs.c`, now that we have `Printexc.get_callstack`.
- Changed `Bigstring.read_assume_fd_is_nonblocking` and
`send_nonblocking_no_sigpipe` to return `Unix.Syscall_result.t`, to
reduce allocation.
- Changed `Iobuf.send_nonblocking_no_sigpipe` to handle `EINTR` like
`EAGAIN`, instead of raising.
- Added `Command.Spec.char`.
- Changed `Process_env.parse_ssh_client` to accept an `SSH_CLIENT`
that is just IP address without ports.
## 112.06.00
- Renamed `Linux_ext.gettid` as `Unix.gettid`, and added OpenBSD support.
`SYS_gettid` is not available on OpenBSD, but is used in
`Core_extended`. See the mailing list discussion about this here:
https://groups.google.com/forum/#!topic/ocaml-core/51knlnuJ8MM
Seems like the OpenBSD alternative is:
pid_t getthrid(void);
although it's not defined in any header file, which is a bit unfortunate.
- Added `Piecewise_linear.precache`, which computes a lookup table that
speeds up subsequent calls to `Piecewise_linear.get`.
- Added `Time_ns` module, representing times as 63-bit integers of
nanoseconds since the epoch.
- Fixed build of `unix_stubs.c` on OpenBSD.
- In `Daemon`, fixed an error message regarding `WSTOPPED` (fixes #47).
- Added `Time.Span.Stable.V2`, with sexps that use new suffixes for
microseconds (`us`) and nanoseconds (`ns`).
`Time.Span.of_string` supports the new format, but
`Time.Span.to_string` doesn't yet produce it -- we plan to change
that later, after the new `of_string` has made it out more widely.
- Added `Time.Span.to_string_hum`, which gives more options for
rendering time spans.
- Merged the `recvmmsg` stubs in `Bigstring` and `Iobuf`.
Factored out a shared underlying `recvmmsg` call that both
stubs use.
Restored `-pedantic` by avoiding a C99 feature (variable-length
stack arrays).
- Made `Date.t` abstract, and changed its representation from a 4-word
record to an immediate int (packing year, month, day).
- In `Daemon`, changed the permissions of the `std{err,out}` files
generated during daemonization from `0o777` to `0o644`.
- Moved `Thread_safe_queue` from `core` to `core_kernel`.
This was done so that `Async_kernel` can use it, eliminating one of
`Async_kernel`'s dependencies on `Core`.
`Thread_safe_queue_unit_tests` remains `Core`, at least for now,
because it has some dependencies on other stuff in `Core`.
## 112.01.00
- Removed vestigial code supporting OCaml 4.00.
- Added `Command` support for flags that are passed one or more times.
Added `Command.Spec.one_or_more` and
`Command.Spec.non_empty_sequence` to deal with the cases where you
expect a flag or anonymous argument (respectively) to be passed one
or (optionally) more times. This is common enough and distinct from
the case where you want the argument passed zero or more times that
it seems like we should canonize it in the library.
- In `Lock_file`, made stale lock detection more robust.
Made `Lock_file.create foo` succeed if `foo` is absent and
`foo.nfs_lock` file is present and stale. Previously, it would
fail.
- Removed `Syslog.syslog`'s `add_stderr` argument; use the `PERROR`
option instead.
- Fixed `unix_stubs.c` compilation on NetBSD
Closes #45
- Added `Filename` operators `/^` and `/@`, and `of_parts`, like the
same functions for Catalog paths.
- Changed `Iobuf` functions that advance the iobuf to not also return
a redundant number of bytes processed.
This avoids a small allocation (in the case of the `int option`
functions) and normalizes the result (so the same information isn't
returned two ways). Actually, it doesn't yet avoid the allocation in
the implementation, as the corresponding `Bigstring` functions must
still return the number of bytes processed, and currently do so as an
option. We hope to eventually change that.
In the future I expect we will change `unit` to some `error` variant
to also avoid the exception construction for `EWOULDBLOCK/EAGAIN`. We
can even make Unix syscalls `noalloc` if we're careful.
- In `Unix` module, added unit tests for `Cidr.does_match`.
## 111.28.00
- Added `Piecewise_linear.create_from_linear_combination`.
val create_from_linear_combination : (t * float) list -> t Or_error.t
- Added `Time.is_{earlier,later} : Time.t -> than:Time.t -> bool`, which
are easier to read than `Time.(<)` and friends.
- Added `Command.exec`, which allows one to include the `Command`
hierarchy from one executable in another.
`Command.exec` takes the file path to an executable that uses the
`Command` module and returns a `Command.t` that integrates the
executable (by exec'ing it), including providing recursive help and
autocompletion as if it were a standard `Command.t`.
- Replaced most uses of `Hashtbl.replace` with `Hashtbl.set`.
- Renamed `Float.epsilon` to `robust_comparison_tolerance`, to avoid
confusion with `epsilon_float`.
## 111.25.00
- Added `Gc.disable_compaction` function.
- Added `Time.to_string_abs_trimmed`, which prints a trimmed time and
takes a `zone` argument.
- Fixed `unix_stubs.c` to suppress a warning when building with some
versions of gcc.
- Changed `Time.Zone` to allow the zoneinfo location to be specified
by an environment variable.
Closes #40
- Fix compatibility with 4.02
## 111.21.00
- Fixed an issue where `Time.Zone.init` would not properly traverse the
directory containing timezone information.
- Added `Time.With_utc_sexp`, which has stable serialization of `Time.t`
that is byte-for-byte equal across timezones.
- Made `Uuid` stable.
- Made `Piecewise_linear` stable.
## 111.17.00
- Fixed a bug in `Bigstring.really_recv` if `recv` doesn't receive all
the data it wants.
This bug has been around forever; it may not have caused trouble
because `Bigstring.really_recv` (1) is barely used (the only use is
in `Bigstring.unmarshal_from_sock`) and (2) passes `recv` the
`MSG_WAITALL` flag, so it will read the full amount unless it gets
interrupted by a signal.
- Fixed `Bigstring.read`'s handling of `EINTR` so that it retries
rather than returning zero.
This fixes a bug introduced in 111.09 in the interaction between
`Bigstring.read` and `Async.Reader`. Prior to 111.09,
`Bigstring.read` would raise on `EINTR`, and `Async.Reader` would
propagate the exception. From 111.09 to 111.16, `Bigstring.read`
would return zero, which would confuse `Async.Reader` into thinking
it reached EOF when it hadn't. From 111.17, `Bigstring.read` will
retry and not return zero when not at EOF.
We believe the bug was rare, because otherwise we would have
frequently seen `EINTR` exceptions prior to 111.09.
- Added `Command.Spec.apply` and `pair`, which allow one to program
more with `Spec.param` rather than `Spec.t`.
```ocaml
val apply : ('a -> 'b) param -> 'a param -> 'b param
val pair : 'a param -> 'b param -> ('a * 'b) param
```
- Added `Command.Spec.file`, which builds an `Arg_type` value with the
same autocompletion as `Spec.file`.
```ocaml
(** [file] defines an [Arg_type.t] that completes in the same way as
[Command.Spec.file], but perhaps with a different type than [string] or with an
autocompletion key. *)
val file
: ?key:'a Univ_map.Multi.Key.t
-> (string -> 'a)
-> 'a t
```
## 111.11.00
- Change some `Bigstring` functions to retry on `EINTR` rather than
raise.
The following functions (and their unsafe versions) were affected:
* `read`
* `really_read`
* `really_recv`
* `really_write`
* `really_send_no_sigpipe`
Some other `Bigstring` functions, like `input` and `output`, already
retried on `EINTR`, so this change has precedent.
All of the affected stubs raise `Bigstring.IOError` on failure,
rather than `Unix_error`, which means the normal method for retrying
on `EINTR` doesn't work. In particular `Async.Reader` didn't retry
them, even though it was supposed to.
Additionally, the documentation for the following functions was
corrected to say that they raise =Unix_error= rather than =IOError=:
* `pread_assume_fd_is_nonblocking`
* `pwrite_assume_fd_is_nonblocking`
- Eliminated global binary-to-decimal tables computed at startup for
converting `Date` and `Of_day` to string.
Used an efficient implementation of division by 10, rather than the
`sprintf` tables in `time_internal.ml`. This result in much less
allocation at startup and it is a bit faster:
* before:
| Name | Time/Run | mWd/Run | Percentage |
|----------------|----------|---------|------------|
| Date.to_string | 69.39ns | 3.00w | 100.00% |
- after:
| Name | Time/Run | mWd/Run | Percentage |
|----------------|----------|---------|------------|
| Date.to_string | 53.38ns | 3.00w | 100.00% |
- Fixed `Time.Zone` tests so that they are deterministic.
- Added `Iobuf.to_string_hum`, which produces a readable, multi-line
representation of an iobuf, intended for debugging.
- Fixed brittle unit tests of `Command`.
## 111.08.00
- Improved `Command` to print a good error message if command-line
parsing raises.
`Command`'s `Exn.handle_uncaught` now protects the phase of parsing
command-line arguments in addition to protecting the phase of
running the `main` function as it did already.
## 111.06.00
- Added inline benchmarks for =Iobuf= and =Time=.
Hera are some of the results from the new benchmarks, with some
indexed tests dropped.
| Name | Time/Run | mWd/Run | Percentage |
|--------------------------------------|----------|---------|------------|
| [time.ml:Time] Time.to_string | 848.74ns | 249.98w | 100.00% |
| [time.ml:Time] Time.to_ofday | 59.66ns | 38.00w | 7.03% |
| [time.ml:Time] Time.now | 39.78ns | 2.00w | 4.69% |
| [time.ml:Time] Time.Zone.find_office | 83.64ns | 4.00w | 9.85% |
| [time.ml:Time] Time.Span.of_hr | 3.71ns | 2.00w | 0.44% |
| [time.ml:Time] Time.Span.of_min | 3.69ns | 2.00w | 0.44% |
| [time.ml:Time] Time.Span.of_sec | 2.72ns | | 0.32% |
| [time.ml:Time] Time.Span.of_ms | 6.02ns | 2.00w | 0.71% |
| [time.ml:Time] Time.Span.of_ns | 5.98ns | 2.00w | 0.71% |
| Name | Time/Run | Percentage |
|------------------------------------------|----------|------------|
| [iobuf.ml:Blit tests] functor blit:5 | 15.53ns | 7.66% |
| [iobuf.ml:Poke tests] char:0 | 4.11ns | 2.03% |
| [iobuf.ml:Poke tests] uint8:0 | 5.35ns | 2.64% |
| [iobuf.ml:Poke tests] int8:0 | 4.59ns | 2.26% |
| [iobuf.ml:Poke tests] int16_be:0 | 5.19ns | 2.56% |
| [iobuf.ml:Poke tests] int16_le:0 | 5.14ns | 2.53% |
| [iobuf.ml:Poke tests] uint16_be:0 | 5.11ns | 2.52% |
| [iobuf.ml:Poke tests] uint16_le:0 | 5.12ns | 2.53% |
| [iobuf.ml:Poke tests] int32_be:0 | 5.17ns | 2.55% |
| [iobuf.ml:Poke tests] int32_le:0 | 4.91ns | 2.42% |
| [iobuf.ml:Poke tests] uint32_be:0 | 5.73ns | 2.83% |
| [iobuf.ml:Poke tests] uint32_le:0 | 5.74ns | 2.83% |
| [iobuf.ml:Poke tests] int64_be:0 | 5.33ns | 2.63% |
| [iobuf.ml:Poke tests] int64_le:0 | 4.93ns | 2.43% |
| [iobuf.ml:Peek tests] char:0 | 5.50ns | 2.71% |
| [iobuf.ml:Peek tests] uint8:0 | 4.68ns | 2.31% |
| [iobuf.ml:Peek tests] int8:0 | 4.91ns | 2.42% |
| [iobuf.ml:Peek tests] int16_be:0 | 5.19ns | 2.56% |
| [iobuf.ml:Peek tests] int16_le:0 | 4.90ns | 2.42% |
| [iobuf.ml:Peek tests] uint16_be:0 | 5.17ns | 2.55% |
| [iobuf.ml:Peek tests] uint16_le:0 | 5.10ns | 2.51% |
| [iobuf.ml:Peek tests] int32_be:0 | 5.17ns | 2.55% |
| [iobuf.ml:Peek tests] int32_le:0 | 4.92ns | 2.42% |
| [iobuf.ml:Peek tests] uint32_be:0 | 5.45ns | 2.69% |
| [iobuf.ml:Peek tests] uint32_le:0 | 5.46ns | 2.69% |
| [iobuf.ml:Peek tests] int64_be:0 | 6.61ns | 3.26% |
| [iobuf.ml:Peek tests] int64_le:0 | 6.31ns | 3.11% |
- Re-implemented `Thread_safe_queue` to improve performance and reduce
allocation.
The new implementation requires 3 words per element, down from the 7
words required by the old implementation.
The new implementation pools elements so that they can be reused, so
there is no allocation in steady-state use.
The new implementation has `dequeue_exn` rather than `dequeue`, so
that one can dequeue without allocating 2 words.
Eliminated `create'`. One should just use `create` and explicit calls
to `enqueue` and `dequeue_exn`.
Eliminated `dequeue_until_empty`. One should use an explicit while
loop guarded by `length` and using `dequeue_exn`.
Moved `Thread_safe_queue` from `Core_kernel` to `Core`, since it's
thread related.
All in, there is now no allocation in a steady-state usage of
enqueueing and dequeueing elements, as opposed to 9 words per
`enqueue+dequeue` in the old implementation. This reduces the cost
from `enqueue+dequeue` taking 166-216ns to `enqueue+dequeue_exn`
taking 48-82ns (plus eliminating gc impacts). Here are some `BENCH`
results, the first table being the old implementation, and the
second table the new.
| Name | Time/Run | mWd/Run | mjWd/Run |
|------------------------------------------------------------|----------|---------|----------|
| [thread_safe_queue.ml] enqueue + dequeue of immediate | 183.89ns | 9.00w | 7.02w |
| [thread_safe_queue.ml] enqueue + dequeue of young object | 216.69ns | 11.00w | 9.01w |
| [thread_safe_queue.ml] enqueue + dequeue_exn of old object | 166.75ns | 9.00w | 7.02w |
| Name | Time/Run | mWd/Run |
|--------------------------------------------------------------|----------|---------|
| [thread_safe_queue.ml] enqueue + dequeue_exn of immediate | 48.20ns | |
| [thread_safe_queue.ml] enqueue + dequeue_exn of young object | 81.96ns | 2.00w |
| [thread_safe_queue.ml] enqueue + dequeue_exn of old object | 48.30ns | |
- Changed `{Bigstring,Iobuf}.recvmmsg_assume_fd_is_nonblocking`, when
no message is available, to return a negative number rather than
raise.
This was done for performance reasons, because raising an exception
is expensive, due to the stashing of the backtrace and the string
creation.
- Added `Iobuf.unsafe_resize`.
- Changed `Bigstring.blit` so that it doesn't release the OCaml lock
on `map_file` bigstrings.
The old behavior of releasing the lock for blits of (small)
bigstrings involving mmapped files was problematic and inconsistent.
Its cost is high, and fundamentally any access to a mapped bigstring
could cause some level of blocking.
- Added time-related `Arg_type.t` values to `Command.Spec`.
- Added module `Type_immediacy`, which has witnesses that express
whether a type's values are always, sometimes, or never immediate.
This code used to be in the `Typerep_immediate` library in typerep.
## 111.03.00
- Added `Unix.Syslog` module.
- Changed `Command.run` to no longer ignore the first element of its
`~argv` parameter.
- Made `Time.Span.to_short_string` show microsecond precision.
## 110.01.00
- Fixed `Time` unit tests that failed in London because of timezone
dependence.
- Added `Iobuf.protect_window_and_bounds`, which calls a user function
and restores the iobuf's bounds afterwards.
- Fixed compilation on OpenBSD, which doesn't support
`Unix.mcast_join`'s `?source : Inet_addr.t` argument.
## 109.60.00
- Added `Iobuf.unsafe_advance`.
This can be used to benchmark inner loops that have redundant bounds
checking, to see if the checks matter. For example, see the
following two `advance` calls:
let rec process_buffer buf ~f =
let len = Iobuf.length buf in
if header_len <= len then
let msg_len = header_len + Iobuf.Unsafe.Peek.uint16_be buf ~pos:0 in
if msg_len <= len then begin
let len = msg_len - header_len in
Iobuf.advance buf header_len;
f (Protocol.packed_of_iobuf buf);
Iobuf.advance buf len;
process_buffer buf ~f
end
- Added `Weak_hashtbl.add_exn` and `sexp_of_t`.
- Fixed `Lock_file.create` to behave correctly if the target mountpoint
is out of space.
Previously in this situation, `Lock_file.create` would create an
empty lock and exit with exception trying to write pid/message
there. Subsequent runs would not able to read pid out of empty pid
file and `blocking_create` would block instead of removing defective
lock.
## 109.58.00
- Added `Debug.should_print_backtrace : bool ref`, to control whether
`Debug.am*` functions print backtraces.
- Added to `Float` inline benchmarks.
- Moved all of the `Gc` module into `Core_kernel`.
Part of the `Gc` module used to be in `Core` because it used
threads. But it doesn't use threads anymore, so can be all in
`Core_kernel`.
- Improved `Iobuf` support for copying to/from strings and bigstrings.
The new modules are `Iobuf.{Consume,Peek}.To_{bigstring,string}`.
They match a `Blit`-like interface. We don't yet implement the
`Blit` interface in all applicable contexts, but do use `Blit.Make`
and expose some of the operations we want in the forms we expect
them to take under a `Blit` interface.
- Added `Linux_ext.Timerfd.to_file_descr`.
- Added to `Time.next_multiple` an optional argument to control
whether the inequality with `after` is strict.
- Added `Time.Zone.local`, a lazily cached `Time.Zone.machine_zone ()`.
This is the first stage in a plan to make explicit timezones more
pervasive. First, they are made more convenient, by replacing the
relatively wordy `Time.Zone.machine_zone ()` with `Time.Zone.local`.
This involves making the underlying timezone type lazy.
The next stage will be to remove `machine_zone` and use
`Time.Zone.local` everywhere instead. Then (it is hoped) instead of
`of_local_whatever`, we just say e.g. `of_date_ofday
Time.Zone.local` and currently-implicitly-local functions will be
able to switch over to explicit timezones without becoming too
verbose.
- Added `Timing_wheel.Alarm.null`.
- Made `Unix.File_descr.t` have `with sexp`.
Closes janestreet/async_unix#3
- Fixed OpenBSD compilation failures in C stubs.
- Fixed `Lock_file.is_locked` to require read permission, not write
permission, on the lock file.
- Added to `Unix.mcast_join` an optional `?source:Inet_addr.t` argument.
From pull-request on bitbucket:
https://bitbucket.org/janestreet/core/pull-request/1/receive-source-specific-multicast/diff
## 109.55.00
- Fixed building on FreeBSD and OpenBSD.
- Added `with typerep` to many `Core` types.
- Made `open Core.Std` support `with typerep`.
- Added `Iobuf.recvmmsg_assume_fd_is_nonblocking_no_options`,
a specialization of `recvmmsg_assume_fd_is_nonblocking` for improved
performance.
This improvement was driven by profiling at high message rates.
- Changed `Unix.Rlimit.virtual_memory` be an `Or_error.t`, for platforms
where it is undefined.
## 109.53.00
- Added `Linux_ext.Epoll.close`.
- Added `Weak_hashtbl` module, moved from `Async`.
It had only been in `Async` to use `Async`'s finalizers. The move
to `Core` exposes a bit more with respect to finalization so that
one can still implement `Async.Weak_hashtbl`, as well as do other
things (e.g. use `Weak_hashtbl` in `Incremental`, which does not use
`Async`).
Simplified the implementation of `Weak_hashtbl` to eliminate "entry
ids". They were only used to avoid removing a table entry that was
in use. But there is a more direct way to test for that -- just
check if the weak is `None` or `Some`.
- Added an autoload file for utop
- Disabled warning 40 in corebuild
## 109.52.00
- Added `Unix.File_descr.equal`.
- Added `Lock_file.Nfs.unlock`, the `Or_error` version of
`unlock_exn`.
- Improved the detail of the error messages exposed by
`Lock_file.Nfs.create{,_exn}`.
- Added `Unix.set_mcast_ifname`, to control the interface used for UDP
multicast traffic.
Added bindings for setsockopt `IP_MULTICAST_IF`.
See 6.3 in: http://www.tldp.org/HOWTO/Multicast-HOWTO-6.html
- Changed `Command` argument processing to treat a single dash (`-`)
as an anonymous argument rather than a flag.
This change follows the unix convention of passing `-` as an
anonymous argument meaning `stdin`.
- Added more bin-prot support to `Iobuf`: `Consume.bin_prot`,
`Fill.bin_prot`, `Peek.bin_prot`, `Poke.bin_prot`.
Framing doesn't do much for `Iobuf`, so these are to be more
standard, unframed accessors, as opposed to `fill_bin_prot`.
- Added `Core.Debug.am`, `amf`, and `ams`, for outputting debugging
messages showing the current source-code position.
Unfortunately, these aren't available in `Core.Std.Debug`, but only
in `Core.Debug`. That will be fixed in 109.49.
- Made `Time_stamp_counter` compile on non x86-64 platforms.
- Made `Core.Std.Debug` be `Core.Debug` rather than
`Core_kernel.Debug`.
This exposes the `Debug.am*` functions added in 109.48.
## 109.47.00
- Added `Time_stamp_counter` module, which has fast (< 10 nanos) access to the hardware time-stamp counter.
This module provides the fast function `Time_stamp_counter.now ()`
which is our best effort high-performance cycle counter for a given
platform. For x86 systems this retrieves the CPU's internal time
stamp counter using the `RDTSC` instruction. For systems that do not
have a RDTSC instruction, we fallback to using
`clock_gettime(CLOCK_MONOTONIC)`.
Here is a benchmark of execution time in nanos and allocations in words:
```
Name Time/Run Minor
------------------------------- ---------- -------
Time.now 39.02 2.00
TSC.now 7.54
TSC.to_time 4.88 2.00
TSC.to_time (TSC.now ()) 8.54 2.00
TSC.to_time_nanos 4.49
TSC.to_time_nanos(TSC.now ()) 8.95
Calibrator.calibrate 279 34.00
```
Historically, the rate of increment of the TSC (sometimes referred to
as the TSC frequency) varied based of CPU overclocking, temperature,
load etc. On modern Intel CPU's the TSC is expected to be stable. On
Linux systems, the "constant_tsc" in `/proc/cpuinfo` indicates that the
machine has a stable TSC rate. While this module assumes that the TSC
is relatively stable, it can adapt to small variations in the TSC
frequency.
- Changed `Daemon.daemonize` and `daemonize_wait` to leave the `umask` alone by default.
Previously, these had alwasy set the umask to `0`, which means that
all app-harness programs and all binaries run from grass were creating
world-writeable (`0666`) files by default.
## 109.45.00
- Added `Core.Std.phys_same`, which is like `phys_equal`, except has a
more general type.
```ocaml
val phys_equal : 'a -> 'a -> bool
val phys_same : _ -> _ -> bool
```
`phys_same` is useful when dealing with existential types, and one
has a packed value and an unpacked value that one wants to check are
physically equal. One can't use `phys_equal` in such a situation
because the types are different.
- Added `Iobuf.set_bounds_and_buffer` and `set_bounds_and_buffer_sub`,
which make it easier to use with zero allocation.
```ocaml
(** [set_bounds_and_buffer ~src ~dst] copies bounds (ie limits + window) and shallowly
copies the buffer from [src] to [dst]. [read_write] access is required on [src]
because the caller might have [read_write] access to [dst], and would after the call
then effectively have [read_write] access to [src]. *)
val set_bounds_and_buffer : src:(read_write, _) t -> dst:(_, seek) t -> unit
(** [set_bounds_and_buffer_sub ?pos ?len ~src ~dst ()] is a more efficient version of:
[set_bounds_and_buffer ~src:(Iobuf.sub ?pos ?len src) ~dst].
[set_bounds_and_buffer ~src ~dst] is not the same as
[set_bounds_and_buffer_sub ~dst ~src ()], because the limits are narrowed in the
latter case. *)
val set_bounds_and_buffer_sub
: ?pos:int
-> ?len:int
-> src:(read_write, _) t
-> dst:(_, seek) t
-> unit -> unit
```
- Added `?timeout:Time.Span.t` argument to
`Lock_file.blocking_create`, `Lock_file.Nfs.blocking_create` and
`critical_section`.
## 109.44.00
- Added `val Day_of_week.num_days : from:t -> to_:t -> int`.
- Added `Time.of_date_ofday_precise` and `Time.Zone.next_clock_shift`,
to deal with clocks going forward and backward.
Due to clocks going forward/backward, some local times occur twice,
and some never occur at all. `Time.of_date_ofday_precise`
identifies these cases and returns all of the relevant information.
- Added accessors for `Unix.Cidr`: `base_address` and `bits`.
```ocaml
(** Accessors.
- [base_address 192.168.0.0/24 ` 192.168.0.0]
- [bits 192.168.0.0/24 ` 24]. *)
val base_address : t -> Inet_addr.t
val bits : t -> int
```
## 109.42.00
- Removed `Zone` from `Core.Std`; use `Time.Zone` instead.
- Removed `Time.Date`; use `Date` instead.
- Improved the performance of `Piecewise_linear` by using arrays with binary search on indices.
The previous implementation `Piecewise_linear` used `(float * float)
list` (a list of (x,y) pairs) to represent piecewise linear functions,
with a linear search through the knots to evaluate the function at a
point. This type is now:
```ocaml
{ x : float array
; y : float array
}
```
and the implementation uses binary search to identify the correct array index.
Here are the costs of the `get` function under the old (list) and new (array)
implementations for various numbers of knots:
```
knots | old | new
------+------+-----
1 | 11ns| 12ns
2 | 18ns| 14ns
5 | 27ns| 19ns
100 | 182ns| 38ns
1000 |1974ns| 52ns
```
- Added module `Time.Ofday.Zoned`, which is a pair of an `Time.Ofday.t` and a `Time.Zone.t`.
- Added `with compare` to `Time.Zone.Stable.t`.
- Added `Timing_wheel` functionality.
* Added `Config` module, which combines `alarm_precision` and `timing_wheel_level_bits`.
* Removed the need to supply a dummy value to `create`.
* Added `mem` and `clear` functions.
* Added functions for dealing with the interval number: `interval_num`, `now_interval_num`, `interval_num_start`, `add_at_interval_num`.
This makes it easier to use a timing wheel with `int` interval
numbers, which are more efficient than than `float` times.
## 109.41.00
- Added `Command.Spec.map_anon` and `map_flag`.
```ocaml
(** [map_flag flag ~f] transforms the parsed result of [flag] by applying [f] *)
val map_flag : 'a flag -> f:('a -> 'b) -> 'b flag
(** [map_anons anons ~f] transforms the parsed result of [anons] by applying [f] *)
val map_anons : 'a anons -> f:('a -> 'b) -> 'b anons
```
- Fixed `Unix.open_flag` to compile with OCaml 4.01.
It needed the additional constructor `O_CLOEXEC`.
## 109.37.00
- Command.run now calls Exn.handle_uncaught so you don't have to.
- Fixes for building on FreeBSD.
- Fixed Blang to build with OCaml 4.01.
In blang.mli:
Blang.t is a private variant type, Blang.Stable.V1.t is a private
variant type, and client code knows Blang.t = Blang.Stable.V1.t.
Previously, this was done in a strange way, using with type 'a t =
private 'a t on the signature of Blang.Stable.V1. In addition to
being strange, this line no longer builds in OCaml 4.01, which
caused problems for building Real World Ocaml.
This patch changed the code to something much more straightforward,
although not quite so straightforward as we expect to be able to
achieve once a nonrec bug is fixed.
## 109.35.00
- Added `or_error` functions in `Unix.Exit_*` types to `unit
Or_error.t`.
This makes it easier to deal with combining with infix operators
`>>=?` and `>>|?`
## 109.34.00
- Added `val Backtrace.get_opt : unit -> t option`.
This is more convenient to use than `Backtrace.get`, which is an
`Or_error.t`.
- Moved functions for dealing with finalizers into the `Gc.Expert` module.
This was done to make people be very explicit and sure that they want
finalizers, which are very hard to use because they essentially
introduce multithreading semantics.
One should typically use async finalizers.
- Eliminated the thread that had been used to sequentialize all finalizers.
## 109.32.00
- Normalized `Command`'s help messages.
Made anonymous argument names uppercase and subcommand names lowercase.
- In `Iobuf`, added duals to `flip` and `snapshot` to work on the high end of the window.
`flip` has been renamed to `flip_lo`. The dual of `flip_lo` is the
newly added `flip_hi`, and shifts the window forward to continue
reading, rather than back to switch from writing to reading, as
`flip_lo` does.
`flip_hi`, in practice, needs snapshots of the upper bound of the
window, we split `Snapshot` into `Lo_bound` and `Hi_bound` and
introduced bounded versions of `flip_lo`, `compact`, and `flip_hi` to
support buffers which are only partially filled, but have
substructure, like packet buffers.
Here's the new API.
```ocaml
module type Bound = sig
type ('d, 'w) iobuf
(** Expose =t = private int= only if a =t= is stored in a mutable data structure
somewhere and leads to a measurable =caml_modify= performance problem. *)
type t with sexp_of
val window : (_, _) iobuf -> t
val limit : (_, _) iobuf -> t
val restore : t -> (_, seek) iobuf -> unit
end
module Lo_bound : Bound
module Hi_bound : Bound
val flip_lo : (_, seek) t -> unit
val bounded_flip_lo : (_, seek) t -> Lo_bound.t -> unit
val flip_hi : (_, seek) t -> unit
val bounded_flip_hi : (_, seek) t -> Hi_bound.t -> unit
```
## 109.30.00
- Created submodule `Core.Signal.Expert` module.
This is for functions previously in `Core.Signal` that introduce
multithreading semantics, and are hence hard to reason about and
should only be used by experts.
## 109.28.00
- Moved `Timing_wheel` from `Zero`.
## 109.27.00
- Disabled use of `recvmmssg`, which isn't available on our CentOS 5
machines.
- Defined `Option.compare` using `with compare` so that their
comparisons are consistent.
- Cleaned up the `Dequeue` module's interface and implementation.
The interface now matches the conventions used elsewhere in `Core`.
The new implementation is also cleaner and more efficient.
- Reimplemented the `Stack` module to improve performance, and renamed
the old implementation as `Linked_stack`.
The new `Stack` is implemented with this type:
```ocaml
type 'a t `
{ dummy : 'a;
mutable length : int;
mutable elts : 'a array;
}
```
`Linked_stack` is implemented with this type:
```ocaml
type 'a t `
{ mutable length : int;
mutable elts : 'a list;
}
```
Using an array rather than a linked list is a more efficient and
traditional implementation. Pushing to the stack now does not
require allocation, except in the rare case when the stack grows.
One downside is that `Stack.clear` is now O(n) rather than O(1).
This change also eliminates the `Stack.Empty` exception, so any code
matching on that exception should fail to compile, and should be
changed to depend on option-returning `top` and `pop` operations.
- Improved `Lock_file.Nfs`.
* Allowed an arbitrary message to be stored and retreived.
* Fixed a case where `create` might throw an exception.
* Delete both files used for locking when we unlock.
- Split `Core` into `Core_kernel` and `Core`.
- `Core_kernel` is composed of all modules of `Core` that do not
depend on unix or threads, and `Core` contains the rest and depends
on `Core_kernel`.
The goal is to have a very portable standard library that can
especially run on exotic environment such as Javascript.
So that code that directly refers to `Core` (rather than `Core.Std`)
for modules that have moved to `Core_kernel`, we included "proxy"
modules in `Core` that simply include the corresponding module from
`Core_kernel`.
- Fixed `Core.Flags` to build on 32-bit machines.
It had contained a unit test with an integer literal too large to be
accepted by the compiler when building on a 32-bit machine.
## 109.24.00
- Added module `Core.Iobuf`, a module aimed at zero-copy I/O.
An iobuf is a bigstring combined with a position and length, that
defines a contiguous region of bytes in the bigstring. Operations on
an iobuf operate relative to start of the region and cannot look
outside the region.
- Added module `Core.Validated` for creating an abstract type that
ensures a validation function has been run.
- Added function `Bigstring.recvmmsg_assume_fd_is_nonblocking`, which
allows one to read a number of UDP packets with a single system
call.
- Fixed `Unix.create_process` on OSX.
## 109.23.00
- Exposed `Core.Std.Flags` module.
- Made the `Heap` module implement `Container.S1`.
- Added module `Ref.Permissioned`, which is a ref with `read_only` /
`read_write` access control.
- Exposed the unique id in `Type_equal.Id`.
This allows, e.g. hash tables indexed by unique ids.
- Removed the use of `Obj.magic` from the implementation of
`Type_equal.Id.same`.
It is not needed because the `Id.t` contains a `Uid.t` and we can
just use `Uid.equal`.
## 109.21.00
- Massively improved the signatures of `Map` and `Set`, both for
readability and ocamldoc, as well as improved type error messages.
For instance the type of `Int.Set.singleton` was:
```ocaml
('a, 'comparator, 'a Core.Std.Int.Set.elt_ -> ('a, 'comparator) Core.Std.Int.Set.t_) Core.Core_set_intf.without_comparator
```
Now it is simply:
```ocaml
int -> Int.Set.t
```
- Added an optional argument to `Command.run` that can be used to
specify default flags from a user config file.
The optional argument can extend the command line based on the path
to the command.
- Rename module `Weekday` as `Day_of_week`.
The name `Weekday` conflicted with ordinary usage of "weekday" to
mean Monday through Friday.
- Changed `sexp_of_t` for `{Month,Ofday,Time,Time.Span}.{Set,Map}` to
use the nice sexp format of the underlying atomic type.
Previously, the converter had used thes raw type (`float`, `int`,
etc.). `t_of_sexp` still accepts both formats; we will remove the
ability to accept the raw format in the distant future.
This output-format change was planned when we originally in 108.06b
improved those `t_of_sexp` functions to accept both formats.
- Added `Unix.remove`.
- Removed some `IFDEF`'s connected to OCaml <4 support.
## 109.20.00
- Wrapped `Unix.wordexp` in an `Or_error.t` since it is not available on all systems.
- Added function `Process_env.parse_ssh_client`.
This gets the address from which you're currently ssh'd in.
- Added to `Unix` module the ability to get and set `IP_MULTICAST_LOOP` and `IP_MULTICAST_TTL`.
- Exposed module `Core.Std.Ref`, which was previously only available via `Core.Ref`.
- Remove `Mutex.am_holding_mutex` and changed the type of `Mutex.try_lock`.
With NPTL it is impossible to determine which thread is holding the
lock. So, `Mutex.am_holding_mutex` is unimplementable. Also,
`Mutex.try_lock` was incorrect because it claimed to raise if one was
attempting to recursively lock. Since it's not possible to
distinguish between recursive locking and the lock being held by
another thread, we changed the type to make this clear:
```ocaml
val try_lock : t -> [ `Already_held_by_me_or_other | `Acquired ]
```
- Removed our custom version of the OCaml runtime's `core_sys_open` function.
There used to be a bug in the OCaml runtime, PR#5069, in which
`open_{in,out}_gen` could block while holding the OCaml lock, because
they made a call to `fcntl` outside the blocking section. We had our
own C code with the bug fix and re-exposed the fixed versions of the
functions in `Core`.
The bug in OCaml has been fixed, so we have removed our patched
function from `Core`.
- In `unix_stubs.c`, switched from using `FNM_FILE_NAME` to `FNM_PATHNAME`.
The GNU project introduced FNM_FILE_NAME as a non-portable synonym for
FNM_PATHNAME.
We were using pre-processor macros to define FNM_FILE_NAME as
FNM_PATHNAME if unavailable, but it is simpler to just use the more
portable FNM_PATHNAME everywhere.
## 109.19.00
- Changed `Time.to_string` and `Time.sexp_of_t` to include the
timezone.
This is an incompatible change with very old programs in which
`Time.of_string` and `Time.t_of_sexp` did not support the timezone.
If you have programs that are:
* very old and do Time string/sexp handling
* rely on reading in time values without using `Time.of_string` and
`Time.t_of_sexp`.
* rely on chains of writing/reading/writing times across machines
and timezones where the time is always intended to be taken as the
local time on the currently reading machine
you should recompile/review your code to make sure you won't have
issues.
- Added function `List.remove_consecutive_duplicates : 'a t ->
equal:('a -> 'a -> bool) -> 'a t`.
This returns the input list with consecutive duplicates removed, and
doesn't change the order of the remaining elements.
- Added module `User_and_group`, which is a pair of a unix username
and primary unix group.
The string/sexp converters follow the usual unix convention of
`<user>:<group>`.
- Added function `Date.first_strictly_after : t -> on:Weekday.t -> t`.
`first_strictly_after t ~on:day_of_week` returns the first
occurrence of `day_of_week` strictly after `t`.
- Added functor `Type_equal.Lift`.
It is always safe to conclude that if type `a` equals `b`, then type
`a X.t` equals `b X.t`, for any type `X.t`. The OCaml type checker
uses this fact when it can. However, sometimes, e.g. when using
`Type_equal.conv`, one needs to explicitly use this fact to
construct an appropriate `Type_equal.t`. The `Type_equal.Lift*`
functors do this.
```ocaml
module Type_equal : sig
type ('a, 'b) t
...
module Lift (X : T1) : sig
val lift : ('a, 'b) t -> ('a X.t, 'b X.t) t
end
end
```
## 109.18.00
- changed implementation of `Array.sort` to use introsort.
See http://en.wikipedia.org/wiki/Introsort.
- tweaked a unit test in `Core.Flags` to not print a message to
stderr.
## 109.17.00
- Fixed `Random.self_init`, which was broken since 109.00.00 with the
upgrade to OCaml 4.0
The fix changed the type signature expressed in `core_random.ml` of
the standard OCaml `caml_sys_random_seed` C function from `unit ->
int` from `unit -> int array`. That C function changed between
OCaml 3.12 and 4.0.
- Moved module `Core_extended.Unix.Cidr` into `Core.Unix`.
- Wrapped `Unix.wordexp` into an `Or_error.t` to handle systems that
does not implement it in the libc.
- Fixed two other printer names
- Added `Array.int_blit` and `Array.float_blit`, which are specialized
fast blits for `int array` and `float array`.
For motivation underlying this change and other design alternatives
please see Section 3 "Fast, Slow and Incorrect Array blits" of
http://janestreet.github.com/ocaml-perf-notes.html
- Added `Unpack_buffer.Unpack_one.sexp` for parsing sexps using the
`Unpack_buffer` interface.
## 109.15.00
- Changed the tolerance of `Time.Robustly_compare` functions from
`1E-7` to `1E-6`.
- Fixed the names of some toplevel pretty-printers, which referred to
nonexistent modules.
Fix some of the `pp`'s for Core which are used to install printers
in the top-level. Some of the toplevel printers refer to
non-existent modules like `Core.Nativeint.pp`; this feature changed
to the correct name, like `Core.Std.Nativeint.pp`.
- Added to module `Unix` functionality for getting and setting flags
in the open-file-descriptor table.
```ocaml
module Open_flags : sig type t include Flags.S with type t :` t ... end
val fcntl_getfl : File_descr.t -> Open_flags.t
val fcntl_setfl : File_descr.t -> Open_flags.t -> unit
```
- Added module `Linux_ext.Timerfd`.
This allows one to create a file descriptor that can be monitored by
`epoll` or `select` and notify them at a certain time. It makes it
possible to use `epoll` with sub-millisecond timeouts.
- Added `Version_util.application_specific_fields`, which allows
custom build-time information to be included in an executable.
## 109.14.00
- Fixed major performance problem with hashing in `Int.Table`.
Our `Int.Table.replace` was 3 times slower than polymorphic hash
table and `find` was _8_ times slower.
This was caused by using:
```ocaml
external seeded_hash_param : int -> int -> int -> 'a -> int = "caml_hash" "noalloc"
```
in `Int.Table` but:
```ocaml
external old_hash_param : int -> int -> 'a -> int = "caml_hash_univ_param" "noalloc"
```
everywhere else.
The `seeded_hash_param` was introduced in Caml 4.
We fixed this problem by changing `Int.hash` from:
```ocaml
let hash (x : t) = Hashtbl.hash x
```
to:
```ocaml
let hash (x : t) = if x >= 0 then x else ~-x
```
- Added `Bigstring.{pread,pwrite}`, which allow reading and writing at
a specific file offset.
- Added module `Nothing`, which is a type with no values.
This is useful when an interface requires you to specify a type that
you know will never be used in your implementation.
- Changed `Identifiable.Make` so that it registers a pretty printer.
`Identifiable.Make` now uses `Pretty_printer.Register`. This
requires all calls to `Identifiable.Make` to supply a `val
module_name : string`.
- Made `Core.Zone` match the `Identifiable` signature.
- Made polymorphic equality always fail on `Core.Map.t` and
`Core.Set.t`.
Before this change, polymorphic equality on a `Core.Map` or a
`Core.Set` could either raise or return `false`. It returnd `false`
if the data structures were unequal, and raised if the data
structures were equal.
This is because their type definitions looked like:
```ocaml
type ('k, 'v, 'comparator) t =
{ tree : ('k, 'v) Tree0.t;
comparator : ('k, 'comparator) Comparator.t;
}
```
and polymorphic equality visits a block's fields in order. So, it
will detect unequal trees and return false, but if the trees are
equal, it will compare the comparators and raise because of the
functional value.
This change reversed the order of the fields so polymorphic equality
always fails.
## 109.13.00
- Added `Command.Spec.flags_of_args_exn`, for compatibility with
OCaml's standard library.
This function converts a `Core.Std.Arg.t` into a `Command.Spec.t`.
- Made various modules `Identifiable`: `Char`, `String`, and the
various `Int` modules.
In particular, `Int` being identifiable is useful, because one can
now write:
```ocaml
module My_numeric_identifier : Identifiable ` Int
```
You might think that we could now delete `String_id`, and just
write:
```ocaml
module My_string_identifier : Identifiable ` String
```
But this is not quite equivalent to using `String_id`, because
`String_id.of_string` enforces that its argument is nonempty.
- Removed module `Space_safe_tuple`, which became unnecessary in OCaml
4.00.0.
OCaml 4.00.0 included Fabrice's patch to fix the space leak that
`Space_safe_tuple` was circumventing (PR#5288, commit SVN 11085).
- Added `Exn.to_string_mach`, for single-line output.
- Added `Linux_ext.bind_to_interface`, to improve security of UDP
applications.
```ocaml
val bind_to_interface : (File_descr.t -> string -> unit) Or_error.t
```
This uses the linux-specifc socket option `BINDTODEVICE` to prevent
packets being received from any interface other than one named.
- Fixed `Unix.mkdir_p` on Mac OS X.
## 109.12.00
- Add some functions to `Byte_units`.
- Added functions: `to_string_hum`, `scale`, `Infix.//`.
- Eliminated the notion of "preferred measure", so a `Byte_units.t`
is just a `float`.
- Improved the performance of `Array.of_list_rev`.
The new implementation puts the list elements directly in the right
place in the resulting array, rather that putting them in order and
then reversing the array in place.
Benchmarking shows that the new implementation runs in 2/3 the time of
the old one.
- Fixed `Fqueue.t_of_sexp`, which didn't work with `sexp_of_t`.
There was a custom `sexp_of_t` to abstract away the internal record
structure and make the sexp look like a list, but there wasn't a
custom `t_of_sexp` defined, so it didn't work.
- Added `Stable.V1` types for `Host_and_port`.
- Removed `Identifiable.Of_sexpable` and `Identifiable.Of_stringable`,
in favor of `Identifiable.Make`
`Identifiable.Of_sexpable` encouraged a terrible implementation of
`Identifiable.S`. In particular, `hash`, `compare`, and bin_io were
all built by converting the type to a sexp, and then to a string.
`Identifiable.Of_stringable` wasn't as obviously bad as
`Of_sexpable`. But it still used the string as an intermediate,
which is often the wrong choice -- especially for `compare` and
`bin_io`, which can be generated by preprocessors.
Added `Identifiable.Make` as the replacement. It avoids using sexp
conversion for any of the other operations.
- Added `List.intersperse` and `List.split_while`.
These came from `Core_extended.List`.
```ocaml
val intersperse : 'a list -> sep:'a -> 'a list
val split_while : 'a list -> f:('a -> bool) -> 'a list ** 'a list
```
- Added a functor, `Pretty_printer.Register`, for registering pretty printers.
The codifies the idiom that was duplicated in lots of places:
```ocaml
let pp formatter t = Format.pp_print_string formatter (to_string t)
let () = Pretty_printer.register "Some_module.pp")
```
## 109.11.00
- Added module `Interned_string` This has a functor for creating
modules of interned strings. It uses the very simple mechanism of
mapping distinct strings to consecutive ints.
- Added value `Hashtbl.find_and_remove`.
## 109.10.00
- Added `|>`, which means the same as `|!`, but is likely to replace
it someday. This is mostly because `|>` is an accepted notation
elsewhere, particularly in F#. In the future, we will consider
eliminating `|!` in favor of `|>`, so as to avoid the duplication.
- Made `module Lazy` into a monad.
- Renamed
`List.stable_dedup_involving_an_application_of_the_set_functor` as
`List.stable_dedup_staged`. Made it use `Staged.t` to make explicit
the expectation of partial application.
- Added pretty printers for the toplevel to `Error` and `Info`.
## 109.09.00
- In `Core.Std`, exposed `Or_error.ok_exn` and `Or_error.error`
- Removed some values exported by `Core.Std`.
Removed some values from `Core.Std` that weren't widely used, or we
didn't think should be exposed, including `ascending`, `descending`,
and `equal`, which use polymorphic comparison, and we want to
discourage.
Here's a guide to some of what was removed, and what one should now
use instead.
| removed | replace with |
|-----------------------------------+---------------------------------------|
| `Int_replace_polymorphic_compare` | `Int.Replace_polymorphic_compare` |
| `ascending` | `Polymorphic_compare.ascending` |
| `descending` | `Polymorphic_compare.descending` |
| `equal` | `Polymorphic_compare.equal` |
| `ifprintf` | `Printf.ifprintf` |
| `sscanf` | `Scanf.sscanf` |
| `Scan_failure` | `Scanf.Scan_failure` |
| `string_of__of__sexp_of` | `Sexplib.Conv.string_of__of__sexp_of` |
| `of_string__of__of_sexp` | `Sexplib.Conv.of_string__of__of_sexp` |
| `type vec` | `type float64_vec` |
- Disallowed `<:sexp_of<` with two underscores; using a single underscore instead.
- Added `Command.Spec.Arg_type.of_alist_exn` as an alternative for `of_map`.
This captures the common pattern to create the map from an alist.
- Improved the performance of `Hashtbl`.
Constrained hashtbl size to a power of two and used a bitmask rather
than mod operation for finding hash buckets.
- Improved the performance of `Univ`, using the `Type_equal` GADT.
The new implementation improves the run-time and space usage over
the old one. In the old implementation, a `Univ.t` was represented
as record with three fields: an exception, a string, and a closure.
Creating a univ required allocating three heap blocks, the exception
(3 words), the closure (3 words), and the three-field record (4
words). In the new implementation, a `Univ.t` is represented as a
2-field heap block containing the `Constr.t` and the value.
Creating a univ allocates that single 3-word block, improving on the
10 words needed previously.
Matching on univs is also faster. In the old implementation,
matching on a univ required making a function call, testing
exception equality, and allocating a `Some` block. Now, it does
just the test and allocation. Furthermore, it is possible to use
`does_match` and `match_exn` to avoid the allocation.
- Added `Version_util.build_info_as_sexp`.
- Added `_squelch_unused_module_warning_` to
`Comparable.S.Replace_polymorphic_compare`.
## 109.08.00
- Cleaned up and updated the `README`.
- Changed executables to enable backtraces if `OCAMLRUNPARAM` is not set.
- Changed `Command` so that executables show build info and version info
This happens when an executatble is called as:
foo.exe version
Before this change, rather than display build info, executables
would display the not-so-helpful:
(no option given - printing version)
- Added back `Float` rounding functions with a hardcoded direction.
- Exposed `with bin_io` and `with compare` for the =sexp_bool= type.
- Added value `Core.Never_returns.sexp_of_t`.
- Added values `Or_error.tag{,_arg}`
These are analogous to `Error` functions of the same name.
- Added functor `Sexpable.Of_sexpable`
This is for serializing values of one type as though it were some
other isomorphic type.
- Added module `Backtrace.Exn`
This exposes OCaml stdlib's `Printexc` functions for backtraces.
- Added module `Flags`
This implements Unix-style sets of flags that are represented as an
`int` with various bits set, one bit for each flag, e.g.,
`Linux_ext.Epoll.Flag`.
- Added module `Uuid`
This module implements universally unique identifiers based on version
3 of the UUID specification. It used to be in `Core_extended=`
- Added module `Type_equal`, which defines the "equality" GADT.
## 109.07.00
- Added a number of functions to =Bounded_int_table=: =equal=,
=exists{,i}=, =for_all{,i}=, =filter_map{,i}=, =map{,i}=. Also
added a functor, =Bounded_int_table.With_key=, that makes a
bounded-int table binable and sexpable, and adds =of_alist= and
=of_alist_exn=.
- Added =Doubly_linked.iter_elt= and =Bag.iter_elt=.
- Added =module Invariant=, which defines signatures that are to
be included in other signatures to ensure a consistent interface to
invariant-style functions.
- Added =module Ordering=, which defines:
=type t = Less | Equal | Greater=
## 109.06.00
- Added [Map.symmetric_diff], for returning a list of differences
between two maps. It has a fast-path implementation for maps that
share a large amount of their internal structure.
## 109.05.00
- Updated [Core.Unix.stat] so that access, modify, and change times
have nanosecond precision.
- Fixed a bug in [Nano_mutex.invariant].
- Simplified the implementation of [with_return] using a local
explicit polymorphic type variable.
## 109.04.00
- Fix [Backtrace.get], which was broken in 109.00, with the
switch to OCaml 4.0.
- Added [Heap.iter_el].
## 109.02.00
- Add Char.of_string
## 113.24.00
- Switched to ppx.
## 112.35.00
- Exposed the equality of `Core_bench.Std.Bench.Test.t` with
`Core_bench.Test.t`, so that one can get the name of a test.
This is useful for filtering based on test name.
## 112.17.00
- Updated code to follow some core changes
## 112.06.00
- Solved a problem in which OCaml 4.02 was optimizing away benchmarks,
making them meaningless.
## 112.01.00
- fixed legacy format string
## 109.58.00
- Added support for saving inline benchmark measurements to tabular
files for easy loading into Octave.
## 109.55.00
- Improved `bench.mli`'s generated docs and added some usage examples.
This also partly satisfies issue #3.
- Added the ability to create groups of benchmarks with a common prefix.
For example, the prefix "Perf" below is created in created using
`create_group`:
```ocaml
let command = Bench.make_command [
Bench.Test.create ~name:"Time.now" (fun () ->
ignore (Time.now ()));
...
Bench.Test.create_group ~name:"Perf" [
Bench.Test.create ~name:"TSC.now" ...
```
and the output shows:
```
Estimated testing time 7s (7 benchmarks x 1s). Change using -quota SECS.
┌───────────────────────────────────────────┬──────────┬─────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ Percentage │
├───────────────────────────────────────────┼──────────┼─────────┼────────────┤
│ Time.now │ 41.38ns │ 2.00w │ 16.72% │
│ Calibrator.calibrate │ 247.42ns │ 32.00w │ 100.00% │
│ Perf/TSC.now │ 7.84ns │ │ 3.17% │
│ Perf/TSC.to_time │ 9.35ns │ 2.00w │ 3.78% │
│ Perf/TSC.to_time (TSC.now ()) │ 13.22ns │ 2.00w │ 5.34% │
│ Perf/TSC.to_nanos_since_epoch │ 10.83ns │ │ 4.38% │
│ Perf/TSC.to_nanos_since_epoch(TSC.now ()) │ 14.86ns │ │ 6.00% │
└───────────────────────────────────────────┴──────────┴─────────┴────────────┘
```
## 109.53.00
- Fixed a bug in `Core_bench` where the linear regression was
sometimes supplied with spurious data.
This showed up when doing custom regressions that allow for a non-zero
y-intercept.
## 109.52.00
- Exposed an extensible form of `make_command` so that
inline-benchmarking and the other tools can add more commandline
flags.
- A significant rewrite of `Core_bench`.
The rewrite provides largely the same functionality as the older
version. The most visible external change is that the API makes it
clear that `Core_bench` performs linear regressions to come up with
its numbers. Further, it allows running user-specified multivariate
regressions in addition to the built in ones.
The underlying code has been cleaned up in many ways, some of which
are aimed at improving the implementation of inline benchmarking
(the `BENCH` syntax, which has not yet been released).
## 109.41.00
- Columns that have a `+` prefix are now always displayed, whereas
columns that don't are displayed only if they have meaningful data.
- Added the ability to reload saved metrics (benchmark test data) so
that bench can re-analyze them.
## 109.39.00
- Added support for additional predictors like minor/major GCs and
compactions, using multi-variable linear regression.
Replaced linear regression with multi-variable linear regression.
The original algorithm estimated the cost of a function `f` by using
a linear regression of the time taken to run `f` vs the number of
runs. The new version adds the ability to include additional
predictors such as minor GCs, compactions etc.
This allows a more fine-grained split-up of the running costs of a
function, distinguishing between the time spent actually running `f`
and the time spent doing minor GCs, major GCs or compactions.
- Added a forking option that allows benchmarks to be run in separate
processes.
This avoids any influence (e.g. polluting the cache, size of live
heap words) they might otherwise have on each other.
## 109.32.00
- Changed `-save` to output compaction information.
- Added indexed tests.
These are benchmarks of the form `int -> unit -> unit`, which can be
profiled for a list of user specified `int`s.
## 109.30.00
- Report compaction stats
## 109.27.00
- Added R^2 error estimation.
Adding this metric should give us a sense of how closely the given
values fit a line. Even dots that are fairly scattered can give
tight confidence intervals. We would like to have to number to have
a sense of how much noise we have.
## 113.33.00
- Update to follow `core[_kernel]` evolution.
## 113.24.00
N.B. Some interface changes occured in Core which are repercuted in this
package, they are not all list in this file though.
- Switched to PPX.
- Upgrade `Interval_map.t` with monad operations.
- Update the `interval_map_intf.ml` file to try to make the documentation
clearer.
This mostly constitutes splitting out the core operations into a separate
module type earlier in the file, so that their documentation occurs before
the various more specific module types in reading order.
Various bits of documentation have been tweaked with examples or laws.
- Add underscores to color print names
Improve and uniformize the behavior of colorprintf functions at the cost of changing the type slightly
- Fix core_extended stubs on openbsd
Closes #7
Closes #2
- Move `Core_extended.Std.Sys.home` to `Core.Std.Sys.home_directory`.
- Add a module whose type `'a t` acts as a container of ordered items of type 'a
(morally, a `'a list`) but which supports efficient append operations.
Sometimes called a Rope, or Concatenable_list.
- Expose the constructors of `Ascii_table.Align.t` so that we can write
Column.create ~align:Left ...
instead of
Column.create ~align:Align.left
- Fix sexp diffing on records
The wrong comparaison was leading to huge diff as soon as one field was
missing on one side
## 113.00.00
- Added to `Interval_map` a more complete set of operations.
- Removed `Core_extended.Sexp.filter_record`, which has been superseded by
`Core.Std.Sexp.of_sexp_allow_extra_fields`.
- Added to `Interval_map` an `Interval` module, with the type of intervals used
in an interval map.
- In `Color_print`, added `sprintf` functions, and changed formatting to
compose properly.
## 112.35.00
- Removed the `Stats_reporting` module.
- Renamed `Quickcheck` module to `Quickcheck_deprecated`. It's replaced
by Janecheck, which for now is a separate library in the core_extended
package, but will soon be merged into core.
- Moved the `Selector` module to its own library. This is for internal
reasons related for code review; it is included as a library within the
core_extended package for now, but may move to another home in the
future.
- Added `Extended_unix.terminal_width : int Lazy.t`.
- Added `Interval_map` module.
- Added to `Sendmail.send` additional optional arguments:
`?message_id:string`, `?in_reply_to:string`.
## 112.24.00
- Added to `Shell.set_defaults` a `?preserve_euid:bool` argument, which causes
`Shell` to use `bash -p`.
- Removed `Array.Access_control`, now that there is
`Core.Std.Array.Permissioned`.
- Removed `Fast_int_div`.
## 112.17.00
- Added functions to `Low_level_debug` to get a sexp or string
representation of any type.
This could be handy when debugging polymorphic code.
- Renamed `String.is_substring` to `is_substring_deprecated`. Use
`Core.String.is_substring` instead.
- Fixed a bug in `Bin_io_utils.save`.
- Made `Unix.Mac_address` match `Hashable.S`.
## 112.06.00
- Sped up `String.is_substring` by replacing the OCaml implementation
with a call to libc `memmem`.
`memmem` runs in 20% of the time, incurs minimal GC pressure, is
portable among UNIXen that we target, AND it's clearer than the ML
version.
- Made `Float_ref` support `bin_io` and `sexp`.
- Removed `gettid`, which is now available in `Core.Unix`.
- Added `Fast_int_div` module, which speeds up integer division by
a fixed divisor.
- Moved `Sexp.of_sexp_allow_extra_fields` to core_kernel.
## 112.01.00
- Added `Float_ref` module, which is like `float ref` but faster for
sets due to bypassing the write barrier.
Benchmark results on Sandy Bridge:
| [float\_ref.ml:] float ref set | 2\_886.94ns | 8.00w | |
| [float\_ref.ml:] Float\_ref.set | 355.76ns | 6.00w | |
| [float\_ref.ml:] float ref get | 415.52ns | 6.00w | |
| [float\_ref.ml:] Float_ref.get | 416.19ns | 6.00w | |
- Added `Bin_io_utils.Wrapped.t`, which defines an `'a t with bin_io`
that supports size-prefixed serialization and deserialization.
`Wrapped` has two useful submodules, `Opaque` and `Ignored`, for
efficient handling of size-prefixed bin-io values in cases where
serialization can be bypassed. See the comments in the module for
more details.
## 111.28.00
- Implemented `Int.gcd` using binary GCD in C, for improved performance.
- Added `Bin_io_utils.Serialized`, which stores a value in memory as its
bin-io representation.
Writing such a value just blits the value.
- Moved `Text_block` from `Core_extended` into `Textutils`.
- Added modules `Hashtbl2` and `Hashtbl2_pair`.
## 111.25.00
- Moved `Quickcheck` from `core`.
- Added [Int.gcd].
## 111.17.00
- Added some functions to `Splay_tree`:
* `length`
* `keys`
* `data`
* `to_alist`
* `delete_{after,before}`
* `map`
* `map_range`
* `split`.
## 111.13.00
- Moved `Patience_diff` out of `Core_extended` into its own library.
## 111.11.00
- For `Flang`, added ordering to fields, and added `abs`, `min`, and
`max` to the language.
- Removed `Loggers` module.
## 111.03.00
- Added `Set_lang`, a DSL for sets with constants, union, intersection,
and difference.
- In `Process`, use `epoll` rather than `select` when possible,
This prevents errors when selecting on file descriptors numbered
greater than `FD_SETSIZE` (1024).
- Removed `Syslog` module. There is now `Unix.Syslog` in core instead;
the APIs are not compatible, but they are similar.
## 109.58.00
- Cleaned up the `Stats_reporting` module
## 109.55.00
- Added `Service_command.acquire_lock_exn`, for acquiring a service's lock.
## 109.53.00
- Fixed `Flang` and `Olang` to round-trip via sexps, i.e. `(t_of_sexp
(sexp_of_t t)) = t`.
## 109.52.00
- Removed `Sexp.load_sexp_with_includes`; one should use the new
`Sexplib.Macro` functions.
- Added `Blang`-like languages `Flang` and `Olang`.
* `Flang` -- terms over a field.
* `Olang` -- predicates over an ordered set.
## 109.45.00
- Fixed `Core_extended.Sys.groups` to use `Unix.Group.getbygid` rather
than `Unix.Group.getbygid_exn`.
This handles when a group is deleted and its gid remains in the
cache, which causes `Unix.Group.getbygid_exn` to fail because the
gid no longer resolves to a group.
## 109.40.00
- Added `Stats_reporting.Delta`, for recording deltas of values.
## 109.36.00
- In `Sexp` module, added ability to expand and compress bash-like brace wildcards.
## 109.35.00
- Added stable versions of types contained in the `Selector` module.
## 109.34.00
- Improved `Sexp.Diff`.
Labeled arguments, put them in the right order (old before new), and
rework the code to follow the same convention, and produce the output
where deletions precede insertions.
## 109.28.00
- In `Shell` functions, made the amount of captured stderr/stdout
configurable.
## 109.27.00
- In module `Sexp`, changed and renamed `load_includes_in_sexp`.
From:
```ocaml
val load_includes_in_sexp : ?max_depth:int -> Sexp.t -> Sexp.t
```
to:
```ocaml
val load_sexp_with_includes: ?max_depth:int -> ?buf:string -> string -> Sexp.t
```
- Added function `Sexp.Diff.to_string`.
- Previously the only option was to print to `Out_channel`.
## 113.33.01
- Fix segfault in [Stack]
- Fix BSD build problem related to endian.h
## 113.33.00
- Rename Tuple.T2.map1 and Tuple.T2.map2 to `map_fst` and `map_snd`,
following the convention of the accessors. Usually, numeric suffixes
mean higher arities, not different fields.
- After discussion, rather than checking for overflow in `Time_ns`
arithmetic, clarify that it's silently ignored. (Subsequent
conversions may or may not notice.)
We did identify the set of functions to document:
Time_ns.Span.((+), (-), scale_int, scale_int63, create, of_parts)
Time_ns.(add, sub, diff, abs_diff, next_multiple)
Added `Core_int63.(add_with_overflow_exn, abs_with_overflow_exn, neg_with_overflow_exn)`
in the course of abandoned work on overflow detection in `Time_ns`. These may
be useful. `mul_with_overflow_exn` was abandoned because
1. it's a lot of work to review
2. there's a better approach: Go to the C level and check the high word of
the product from the IMUL instruction, which is both simpler and faster.
- Changes related to Float.sign
Float.sign currently maps -1e-8 and nan to Zero. Some users don't
expect this. This feature addresses that via the following changes:
- `Float.sign` renamed to `Float.robust_sign`. (`Float.sign` is
still present, but deprecated.)
- `Float.sign_exn` introduced which does not use robust comparison,
and which raises on `nan`.
- `Sign` pulled out of `Float` and made its own module, and
`sign : t -> Sign.t` added to `Comparable.With_zero`. In particular,
`Int.sign : int -> Sign.t` now exists. (In looking at existing uses
of `Float.sign`, there was at least one case where the user was
converting an int to a float to get its sign. That ended up being
deleted, but it still seems desirable to have `Int.sign`.
There were also record types with a field `sign : Float.Sign.t` where
logically the type has no real connection to `Float`.)
- Uses of `Float.robust_sign` revisited to make sure that's the behavior
we want.
- Added Quickcheck tests for `Hashtbl` functions, using `Map` as a point of comparison.
A lot of `Hashtbl` functions did not have tests, so I used an interface trick to
require every function to show up in the test module. The easiest way to write a readable
test for every function was to compare it to a similar datatype, so I went with `Map`.
- Allow clients of `Hashtbl.incr` and `Hashtbl.decr` to specify entries should be removed if the value is 0
- The type of `symmetric_diff` has a typo in it.
- Switched `Timing_wheel_ns` to use `%message` and `%sexp`.
- Improved the error message raised by `Timing_wheel.add` and
`reschedule` if the supplied time is before the start of the current
interval.
Previously, the error message was something like:
("Timing_wheel.Priority_queue got invalid key"
(key ...) (timing_wheel ...))
Now, it will be like:
("Timing_wheel cannot schedule alarm before start of current interval"
(at ...) (now_interval_num_start ...))
The old message was confusing because `key` is less understandable
than `at`, and because it didn't make clear that this is a usage
error, as opposed to a Timing_wheel bug.
Implementing this efficiently required adding a field to timing wheel:
mutable now_interval_num_start : Time_ns.t
so that the check done by `add` is fast.
- Add `Comparable.Make_using_comparator`.
Since `Map` and `Set` already have `Make_using_comparator` functors,
there's no particular reason for `Comparable` not to have one.
More concretely, this will be useful when (if) we add stable
containers to core: we can add a stable version of `Comparable.Make`,
then pass the resulting comparator into the unstable functor to get
equal types.
- Add a `Total_map.Make_using_comparator` functor to allow the creation
of total maps which are type equivalent to regular maps.
- Change default major heap increments to be % of the heap size instead of a constant increment
Also changed type of overhead parameters to Percent.t
- Remove modules `Core.Std.Sexp.Sexp_{option,list,array,opaque}`, which
used to allow binability for types `sexp_option`, `sexp_list`, etc.,
but now serve no purpose.
- Change the signature of the output of
`Comparable.Make{,_binable}_using_comparator` to not include `comparator_witness`.
This is so that code like this will compile:
include T
include Comparable.Make_using_comparator (T)
- Changed `Timing_wheel_ns` so that it only supports times at or after
the epoch, i.e. only non-negative `Time_ns.t` values. Times before
the epoch aren't needed, and supporting negative times unnecessarily
complicates the implementation.
Removed fields from `Timing_wheel_ns.t` that are now constants:
; min_time : Time_ns.t
; max_time : Time_ns.t
; min_interval_num : Interval_num.t
- In `Timing_wheel.t`, cache `alarm_upper_bound`, which allows us to
give an improved error message when `Timing_wheel.add` is called with
a time beyond `alarm_upper_bound`.
- Add `Sequence.merge_with_duplicates`
(** `merge_with_duplicates_element t1 t2 ~cmp` interleaves the elements of `t1` and `t2`.
Where the two next available elements of `t1` and `t2` are unequal according to `cmp`,
the smaller is produced first. *)
val merge_with_duplicates
: 'a t
-> 'a t
-> cmp:('a -> 'a -> int)
module Merge_with_duplicates_element : sig
type 'a t =
| Left of 'a
| Right of 'a
| Both of 'a * 'a
`@@deriving bin_io, compare, sexp`
end
- Add `Set.merge_to_sequence`
(** Produces the elements of the two sets between `greater_or_equal_to` and
`less_or_equal_to` in `order`, noting whether each element appears in the left set,
the right set, or both. In the both case, both elements are returned, in case the
caller can distinguish between elements that are equal to the sets' comparator. Runs
in O(length t + length t'). *)
val merge_to_sequence
: ?order : ` `Increasing (** default *) | `Decreasing `
-> ?greater_or_equal_to : 'a
-> ?less_or_equal_to : 'a
-> ('a, 'cmp) t
-> ('a, 'cmp) t
-> 'a Merge_to_sequence_element.t Sequence.t
module Merge_to_sequence_element : sig
type 'a t = 'a Sequence.Merge_with_duplicates_element.t =
| Left of 'a
| Right of 'a
| Both of 'a * 'a
`@@deriving bin_io, compare, sexp`
end
- Make `Hashtbl.merge_into` take explicit variant type
type 'a merge_into_action = Remove | Set_to of 'a
val merge_into
: f:(key:'k key -> 'a1 -> 'a2 option -> 'a2 merge_into_action)
-> src:('k, 'a1) t
-> dst:('k, 'a2) t
-> unit
The `f` used to return 'a2 option, and it was unclear whether None
meant do nothing or remove. (It meant do nothing.)
- Some red-black tree code showed a 15-20% speedup by inlining the
comparison, rather than relying on the `caml_int_compare` external
call. I've tried to cleanly apply it to `Core_int` (though it can't
really be done without an Obj.magic), though this may be a better fit
for a compiler patch to treat int comparisons as an intrinsic.
Testing
-------
Added an inline test for boundary cases. Presently it returns the
identical values to `caml_int_compare`, though probably it should only
be held to same sign results.
- Rename `Hashtbl.[filter_]replace_all[i]` to `Hashtbl.[filter_]map[i]_inplace`.
- Import `debug.ml` from incremental.
- `Float_intf` used 'float' sometimes where it means 't'.
- Added `Identifiable.Make_with_comparator`, for situations where you want
to preserve the already known comparator, for example to define stable
sets and maps that are type equivalent to unstable types and sets.
## 113.24.00
- Add `Container.Make0` for monomorphic container types.
- Improved the performance of the implementation of `Bounded_int_table.find`.
- Switched to ppx
- Remove references to `Core_list` from `Sequence`.
- Added functions to `Bigstring` and `Iobuf` for reading unsigned 64-bit
integers.
- Move `Comparable.bound` to `Maybe_bound.t`. The purpose is to break up
dependencies between the two.
- `Doubly_linked` allocated during iteration. This became a large source of
allocation for simple benchmarks like TCP pingpong (`async/bench/pingpong`).
Some unnecessary allocations have been removed.
- Added `Timing_wheel.next_alarm_fires_at_exn`, which is useful to avoid
allocation when you know the timing wheel isn't empty.
- Make versions of `Binary_searchable.Make*` that don't require a `For_test` argument.
This allows `Binary_searchable.Make` to be used for types that don't easily convert from arrays.
- Add `Quickcheckable` interface to Core and move generators/observers into type modules.
Renames core\_list.ml to core\_list0.ml, then adds a new core\_list.ml with quickcheck
generators and observers. This allows quickcheck.ml to use core\_list0.ml without a
dependency cycle.
The feature also moves the contents of quickcheck.mli into quickcheck\_intf.ml.
- Made `Core.Unpack_buffer.Unpack_one.t` be a unary type rather than a
binary one, by hiding its `partial_unpack` type under an existential.
This makes it possible to make `Unpack_one` into a monad because we
can combine two `Unpack_one.t`'s with different `partial_unpack` types
into a new `Unpack_one.t` with a different `partial_unpack` type.
- https://github.com/janestreet/core\_kernel/pull/20
Core.Std module is not found when compiling lib\_test/pool\_caml\_modify\_check.ml.
- Added an optional argument `?key_order` for specifying the order of
Map.to\_alist output: either `Increasing or `Decreasing.
The default key order is no longer left unspecified: we're now
committed to the \`Increasing, which was the old behavior.
- Add Sexpable.Of\_sexpable2 functor, for symmetry with Binable.Of\_binable2.
Add sexpable.mli
- Added a function for sequencing computations stored in a total map:
`Total_map.sequence`.
- Added `Core.Bus`, a publisher/subscriber system within the memory
space of the program. This is a synchronous version of `Async.Bus`.
- Added `Core_map.fold2` (fold based on the contents of two maps side-by-side).
- `Core.Interfaces` defines the `Unit` module type to be `sig end`.
Increase uniformity with its other definitions by defining it to be
`Unit.S` instead.
- Adapt `Core_random.int` to accept larger values than `1 lsl 30`.
- Mark the `Sexpable.Of_*` and `Binable.Of_*` functors as stable.
- In `Core_char.int_is_ok`, used by `of_int` and `of_int_exn`, use int compare
instead of polymorphic compare.
- Fix a few files where toplevel side effects might not be running
when we don't pack libraries anymore and use -no-alias-deps.
- In `Char.For_quickcheck`, memoize construction of the filtered chars generators, since if
they are used once, they are likely to be used many times, and the construction is costly
compared to generating a single char.
- Extend `Core_map` to implement quickcheckable
Extend `Core_set` to implement quickcheckable
- In `Avltree.add`, replace `?(replace = true)` with `~replace`. This both makes the
behavior more explicit, and saves some allocation occasionally.
- Reimplement `Avltree.iter` directly, rather than using `fold`, which requires allocating
a closure. This winds up being expensive during `Hashtbl.iter`.
- Add a function in Blang to deal with boolean expressions E representing the
membership of elements in a set, given a universe U and a function projecting
each atoms of E to a subset of U.
Example:
--------
{`
Blang.eval_set ~universe:js_tech resolve_named_set
("(or (and has-blue-eyes has-brown-hair) (and has-brown-eyes has-blue-hair))"
|> Sexp.of_string
|> t_of_sexp)
`}
- Expose more functions in univ_map interface
- Made `Random.self_init` by default raise if used in inline tests.
One can opt out by passing `~allow_in_tests:true`.
- In core\_hashtbl.ml, `maybe_resize_table` allocates the same closure in each iteration of a
for loop. Allocate it just once.
- `Hashtbl.remove_one` and `Hashtbl.remove_multi` are the same function, written twice.
Remove `remove_one` and replace uses with `remove_multi`.
- `Bigstring.unsafe_{get,set}-{,u}int8` used the generic bigarray
access function without a type annotation. As a result the compiler
generated a call to the generic C function.
Fixed this by adding type annotations.
- Add new functions to map that add common missing functionality and/or that makes the interface more uniform and consistent with other container modules.
- Made `Unpack_buffer.Unpack_one` monadic so that users can easily
compose file parsers
Added a couple simple parsers as examples and for testing.
- Avoid use of polymorphic compare in Quickcheck.
Make `Quickcheck.Generator.bind_choice` lazy: do not eagerly descend into all branches.
Reduces memory overhead by setting a threshold on the probability of choices that are
remembered and discarded by `Quickcheck.iter` and friends.
Motivation: Currently, `Quickcheck.iter` and related functions guarantee never to repeat
a choice from a generator. This winds up recording every choice ever made, which for a
lot of generators is a prohibitive cost in space, and most of the recorded values are very
unlikely to be repeated anyway.
Implementation: This feature sets a probability threshold below which choices will not be
remembered. Choosing a fairly low, but still non-zero, threshold means values are still
very unlikely to be repeated, but memory usage stays low.
As of this version, the benefits of "forgetting" unlikely-to-repeat values:
┌──────────────────────────────────────────┬──────────┬─────────┬──────────┬──────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├──────────────────────────────────────────┼──────────┼─────────┼──────────┼──────────┼────────────┤
│ `quickcheck.ml:Quickcheck.iter` remember │ 20.26ms │ 16.33Mw │ 100.85kw │ 100.85kw │ 100.00% │
│ `quickcheck.ml:Quickcheck.iter` forget │ 17.65ms │ 16.21Mw │ 34.83kw │ 34.83kw │ 87.10% │
└──────────────────────────────────────────┴──────────┴─────────┴──────────┴──────────┴────────────┘
- Optimizations to:
+ various `Float.t` validation functions
+ various functions in `Validate`
+ `List.fold_right`
- Made the type of `Option.compare` compatible with `@@deriving compare`.
- Fixed an example code fragment in a comment in applicative_intf.ml
- In `Core_hashtbl`, the `add_worker` function used a `bool ref` both internally and to pass
to `Avltree` to track whether a new key is added. This was allocated on every
call to `add` or `set`, and `set` didn't even use its contents.
This version pre-allocates the `bool ref` inside each `Core_hashtbl.t` and reuses it. It
still can't be a `mutable` field because it does need to be passed to `Avltree`.
After change:
┌───────────────────────────────────────────────────┬──────────────┬────────────┬────────────┬────────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├───────────────────────────────────────────────────┼──────────────┼────────────┼────────────┼────────────┼────────────┤
│ Hashtbl.set `no collisions` │ 84.73ns │ 3.00w │ 0.83w │ 0.83w │ 0.01% │
│ Hashtbl.set `w/ collisions` │ 112.46ns │ │ │ │ 0.02% │
│ Hashtbl.change `no collisions` │ 82.74ns │ 3.50w │ 0.53w │ 0.53w │ 0.01% │
│ Hashtbl.change `w/ collisions` │ 191.50ns │ 4.56w │ 1.15w │ 1.15w │ 0.03% │
│ Hashtbl.merge `no collisions` │ 292_976.43ns │ 26_669.00w │ 15_381.62w │ 12_305.62w │ 48.52% │
│ Hashtbl.merge `w/ collisions` │ 603_822.86ns │ 33_001.00w │ 20_037.22w │ 16_961.22w │ 100.00% │
│ Hashtbl.add_exn `no resize, no collisions` │ 80_992.57ns │ 3_088.00w │ 4_102.63w │ 3_077.63w │ 13.41% │
│ Hashtbl.add_exn `no resize, w/ collisions` │ 178_080.05ns │ 4_621.00w │ 5_668.61w │ 4_643.61w │ 29.49% │
│ Hashtbl.add_exn `w/ resize, no collisions` │ 176_442.98ns │ 16_403.00w │ 9_222.64w │ 6_148.64w │ 29.22% │
│ Hashtbl.add_exn `w/ resize, w/ collisions` │ 297_577.29ns │ 19_472.00w │ 12_292.13w │ 9_218.13w │ 49.28% │
└───────────────────────────────────────────────────┴──────────────┴────────────┴────────────┴────────────┴────────────┘
Before change:
┌───────────────────────────────────────────────────┬──────────────┬────────────┬────────────┬────────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├───────────────────────────────────────────────────┼──────────────┼────────────┼────────────┼────────────┼────────────┤
│ Hashtbl.set `no collisions` │ 104.88ns │ 5.00w │ 1.26w │ 1.26w │ 0.02% │
│ Hashtbl.set `w/ collisions` │ 114.33ns │ 2.00w │ │ │ 0.02% │
│ Hashtbl.change `no collisions` │ 85.79ns │ 4.50w │ 0.58w │ 0.58w │ 0.02% │
│ Hashtbl.change `w/ collisions` │ 198.75ns │ 5.56w │ 1.28w │ 1.28w │ 0.04% │
│ Hashtbl.merge `no collisions` │ 307_857.59ns │ 31_787.00w │ 15_380.91w │ 12_304.91w │ 58.19% │
│ Hashtbl.merge `w/ collisions` │ 529_054.02ns │ 38_119.00w │ 20_015.32w │ 16_939.32w │ 100.00% │
│ Hashtbl.add_exn `no resize, no collisions` │ 77_708.20ns │ 5_135.00w │ 4_101.83w │ 3_076.83w │ 14.69% │
│ Hashtbl.add_exn `no resize, w/ collisions` │ 180_950.23ns │ 6_668.00w │ 5_638.77w │ 4_613.77w │ 34.20% │
│ Hashtbl.add_exn `w/ resize, no collisions` │ 177_492.82ns │ 19_476.00w │ 9_237.07w │ 6_163.07w │ 33.55% │
│ Hashtbl.add_exn `w/ resize, w/ collisions` │ 285_298.72ns │ 22_545.00w │ 12_330.90w │ 9_256.90w │ 53.93% │
└───────────────────────────────────────────────────┴──────────────┴────────────┴────────────┴────────────┴────────────┘
- In `Core_hashtbl.add_worker`, removed a `match` that avoided calling `Avltree.add`, but
actually did hurt performance overall.
Perhaps at some point before cross-module inlining, this was a helpful optimization.
Right now it bypasses the mutation inside `Avltree`, so replacing a value in a
non-colliding bucket (a `Leaf`) causes unnecessary re-allocation of the leaf.
After changes:
┌───────────────────────────────────────────────────┬──────────────┬────────────┬────────────┬────────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├───────────────────────────────────────────────────┼──────────────┼────────────┼────────────┼────────────┼────────────┤
│ Hashtbl.set `no collisions` │ 52.19ns │ 2.00w │ │ │ │
│ Hashtbl.set `w/ collisions` │ 112.04ns │ 2.00w │ │ │ 0.02% │
│ Hashtbl.change `no collisions` │ 87.25ns │ 4.50w │ 0.58w │ 0.58w │ 0.02% │
│ Hashtbl.change `w/ collisions` │ 195.85ns │ 5.56w │ 1.29w │ 1.29w │ 0.04% │
│ Hashtbl.merge `no collisions` │ 308_164.10ns │ 31_787.00w │ 15_380.91w │ 12_304.91w │ 58.48% │
│ Hashtbl.merge `w/ collisions` │ 526_914.80ns │ 38_119.00w │ 20_013.81w │ 16_937.81w │ 100.00% │
│ Hashtbl.add_exn `no resize, no collisions` │ 76_983.60ns │ 5_135.00w │ 4_100.44w │ 3_075.44w │ 14.61% │
│ Hashtbl.add_exn `no resize, w/ collisions` │ 174_712.92ns │ 6_668.00w │ 5_667.47w │ 4_642.47w │ 33.16% │
│ Hashtbl.add_exn `w/ resize, no collisions` │ 176_681.57ns │ 19_476.00w │ 9_231.75w │ 6_157.75w │ 33.53% │
│ Hashtbl.add_exn `w/ resize, w/ collisions` │ 280_448.62ns │ 22_545.00w │ 12_293.32w │ 9_219.32w │ 53.22% │
└───────────────────────────────────────────────────┴──────────────┴────────────┴────────────┴────────────┴────────────┘
Before changes:
┌───────────────────────────────────────────────────┬──────────────┬────────────┬────────────┬────────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├───────────────────────────────────────────────────┼──────────────┼────────────┼────────────┼────────────┼────────────┤
│ Hashtbl.set `no collisions` │ 104.88ns │ 5.00w │ 1.26w │ 1.26w │ 0.02% │
│ Hashtbl.set `w/ collisions` │ 114.33ns │ 2.00w │ │ │ 0.02% │
│ Hashtbl.change `no collisions` │ 85.79ns │ 4.50w │ 0.58w │ 0.58w │ 0.02% │
│ Hashtbl.change `w/ collisions` │ 198.75ns │ 5.56w │ 1.28w │ 1.28w │ 0.04% │
│ Hashtbl.merge `no collisions` │ 307_857.59ns │ 31_787.00w │ 15_380.91w │ 12_304.91w │ 58.19% │
│ Hashtbl.merge `w/ collisions` │ 529_054.02ns │ 38_119.00w │ 20_015.32w │ 16_939.32w │ 100.00% │
│ Hashtbl.add_exn `no resize, no collisions` │ 77_708.20ns │ 5_135.00w │ 4_101.83w │ 3_076.83w │ 14.69% │
│ Hashtbl.add_exn `no resize, w/ collisions` │ 180_950.23ns │ 6_668.00w │ 5_638.77w │ 4_613.77w │ 34.20% │
│ Hashtbl.add_exn `w/ resize, no collisions` │ 177_492.82ns │ 19_476.00w │ 9_237.07w │ 6_163.07w │ 33.55% │
│ Hashtbl.add_exn `w/ resize, w/ collisions` │ 285_298.72ns │ 22_545.00w │ 12_330.90w │ 9_256.90w │ 53.93% │
└───────────────────────────────────────────────────┴──────────────┴────────────┴────────────┴────────────┴────────────┘
- Add new functions to hashtbl that add common missing functionality and/or that makes the interface more uniform and consistent with other container modules.
- Add a bunch of functions to list and array that add common missing functionality and/or that make their interfaces more uniform and consistent with other container modules.
- Rewrite `Hashtbl.merge` to be simpler and faster.
After changes:
┌──────────────────────────────────────┬──────────┬─────────┬──────────┬──────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├──────────────────────────────────────┼──────────┼─────────┼──────────┼──────────┼────────────┤
│ Hashtbl.merge `no collisions` │ 172.57us │ 17.44kw │ 9.22kw │ 7.69kw │ 48.76% │
│ Hashtbl.merge `w/ collisions` │ 284.55us │ 20.61kw │ 11.53kw │ 9.99kw │ 80.41% │
│ Pooled_hashtbl.merge `no collisions` │ 260.57us │ 5.20kw │ 19.18kw │ 3.09kw │ 73.63% │
│ Pooled_hashtbl.merge `w/ collisions` │ 353.88us │ 5.20kw │ 19.18kw │ 3.09kw │ 100.00% │
└──────────────────────────────────────┴──────────┴─────────┴──────────┴──────────┴────────────┘
Before changes:
┌──────────────────────────────────────┬──────────┬─────────┬──────────┬──────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├──────────────────────────────────────┼──────────┼─────────┼──────────┼──────────┼────────────┤
│ Hashtbl.merge `no collisions` │ 309.59us │ 31.79kw │ 15.38kw │ 12.30kw │ 48.91% │
│ Hashtbl.merge `w/ collisions` │ 526.67us │ 38.12kw │ 19.97kw │ 16.90kw │ 83.21% │
│ Pooled_hashtbl.merge `no collisions` │ 469.41us │ 7.32kw │ 35.29kw │ 3.12kw │ 74.16% │
│ Pooled_hashtbl.merge `w/ collisions` │ 632.96us │ 7.32kw │ 35.29kw │ 3.12kw │ 100.00% │
└──────────────────────────────────────┴──────────┴─────────┴──────────┴──────────┴────────────┘
- Make `Hashtbl` functions raise an exception if a callback passed in as an argument mutates
one of the hash tables being worked on.
Usually, though not always, this comes up for iteration functions. Once a hash table has
been mutated, it is unsafe to continue operating on it, as its structure may have changed.
Buckets and their contents may have been moved or resized; continuing may result in
skipping key/value pairs, repeating key/value pairs, or executing unsafe operations.
This feature adds a `mutation_allowed` flag to hash tables. Each mutating operation first
checks the flag, and raises if it is not set. Each operation with callbacks that must not
mutate unsets the flag before calling the callbacks, and restores the flag's original
value when it finishes.
We compared the timing of this implementation to an alternate implementation using a
mutation counter, and the time and space used for this implementation was much better for
iteration and within epsilon of the other for single-key operations like `set`.
- Array function names related to zipping are all over the place. Make
them match List, which has a nice uniform naming scheme.
* Rename `combine` -> `zip_exn`
* Rename `split` -> `unzip`
* (`zip` remains named as `zip`)
- Add `~key` and `~data` labels to `Hashtbl.filteri_inplace`
- Added `Hash_set.to_hashtbl`, by analogy to `Set.to_map`.
- Since we are mutating avltrees in place, make sure the compiler sees
the type parameters as invariant.
Tested that a segfaulting example doesn't compile anymore.
- Add label `f` to Hashtbl.change, Map.change, & family.
Introduce the new function `update` in those modules, which enforces
statically the presence of a resulting value
Example:
-|val Hashtbl.change : 'a t -> key -> ('a option -> 'a option) -> unit
+|val Hashtbl.change : 'a t -> key -> f:('a option -> 'a option) -> unit
+|val Hashtbl.update : 'a t -> key -> f:('a option -> 'a) -> unit
The motivation for the introduction of `update` is that in an overwhelming
majority of the places where `Hashtbl.change` is used in our codebase, it is
statically known that a new value shall be computed and stored. The use of the
dynamism offered by `change`, which can return an option, is error prone.
The addition of the label is considered acceptable in consideration to external
libraries depending on core, because a missing label is just a warning, and we
do not guarantee stability in the presence of -warn-error = true.
- Changed `Source_code_position.t` from:
`@@deriving bin_io, sexp`
to:
`@@deriving sexp_of`
and made `sexp_of` use the human-readable format, `"FILE:LINE:COL"`,
rather than the unreadable format. Removed
`Source_code_position.t_hum`, which is now obsolete.
If one wants a serialized source-code position, one can use
`Source_code_position.Stable`.
- Added `Ref.set_temporarily`, for temporarily setting a ref to a value for
the duration of a thunk.
val set_temporarily : 'a t -> 'a -> f:(unit -> 'b) -> 'b
- Add the function `singleton : 'a -> 'a t` in the stack containers. It cannot be
added to `Container.S` directly because some container never have exactly 1
element.
- Made `Core.Array` match `Invariant.S1`.
- Change the interface of `Make_iterable_binable*` to give the control
back to the user when deserializing Bin\_protted data.
Improve the bin\_prot deserialization of `Map`s and `Set`s.
We construct a balanced tree directly instead of relying on `Map.add` / `Set.add`.
This is possibile because the size of the map is known and elements are sorted.
The complexity goes down from n.log(n) to n.
In case the comparison function changes (and the invariant is not respected),
there is a fallback to reconstruct the whole map from scratch.
- Add a function to blit a `Rope.t` into a `Buffer.t`.
- Hashtbl differs from some other core containers with idiosyncratic naming of iteration functions. Change to be consistent and to more closely match the conventions for List and Array.
Hashtbl:
* Copy `iter` -> `iteri`.
* Add a deprecation tag to `iter`.
- Made `Bag.invariant` and `Doubly_linked.invariant` match `Invariant.S1`.
- Map differs from some other core containers with idiosyncratic naming of iteration functions. The current Map name conventions are also internally inconsistent as well (ex: current `Map.iter` vs `Map.map` vs `Map.mapi`). Change to be consistent and to more closely match the conventions for List and Array.
Map:
* Copy `filter` -> `filteri`.
* Add a deprecation tag to `filter`.
- Map differs from some other core containers with idiosyncratic naming
of iteration functions. The current Map name conventions are also
internally inconsistent as well (ex: current `Map.iter` vs `Map.map`
vs `Map.mapi`). Change to be consistent and to more closely match the
conventions for List and Array.
Map:
* Copy `iter` -> `iteri`.
* Add a deprecation tag to `iter`.
- Made `Core.Set_once` match `Invariant.S1`.
- Add `Bigstring.concat`.
- For `Core.Unique_id`, exposed `@@deriving typerep`.
- Expose Hashtbl.hashable, analogous to Map.comparator.
- Adds a constant-time `val mem_elt : 'a t -> 'a Elt.t -> bool` to Doubly_linked and Bag
- Add `Ordering.to_int` which can be useful when one is writing a comparison
function. Instead of dealing with the int directly, one can return Ordering.t
values and transform them later into ints.
- `Float.int_pow`: Fast computation of `x ** n` when n is an integer.
- Make `Core_kernel.Std.Nothing.t` enumerable. There's no particular reason
not to.
- Minor improvements to queue interface
- Call `Caml.Pervasives.do_at_exit` before printing an exception and exiting
The default ocaml uncaught exception handler does this. It is
especially useful for curses applications as the `at_exit` handler has
a chance to put back the terminal in a good state before printing the
exception and backtrace.
Do the same in Core and Async.
- Removed big literals so that the compiler does not complain in 32bit
- Add `List.range'`, a generalization of `List.range`.
- Add some functions to `Map` that are present in `Hashtbl`:
- `remove_multi`
- `partition_tf`
- `partitioni_tf`
- `partition_map`
- `partition_mapi`
- Add a `Map.nth_exn` as a missing complementary function to nth
- Renamed `Validate.fail_sexp` as `fail_s`, to follow our new `*_s`
convention for `Sexp.t`-taking functions.
- `Sequence.split_n_eagerly` returns a pair of sequences, but every element of the
first sequence has already been evaluated by the time it returns. This feature
just makes the first component of the tuple a list instead of a sequence, and
renames `split_n_eagerly` to `split_n`.
Additionally, this feature adds a new `chunks_exn` function, which just applies
`split_n` until the input sequence is empty.
- Removed `Timing_wheel`'s default `alarm_precision`, to force people to
think about the precision they want when they create a timing wheel.
- In `Timing_wheel.Config.sexp_of_t`, used `@sexp_drop_default` with
`level_bits`.
- Write a better-performing `Array.filter_mapi` function, and implement
`Array.filter_map`, `Array.filter_opt`, `Array.partitioni_tf`, and
`Array.partition_tf` in terms of it.
Slightly worse for zero-length input arrays, about unch'd if we're filtering out
almost everything (`eq_zero`), better on most everything else.
┌────────────────────────────────────────────────────┬─────────────────┬─────────────┬─────────────┬─────────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├────────────────────────────────────────────────────┼─────────────────┼─────────────┼─────────────┼─────────────┼────────────┤
│ `core\_array.ml:filter` old-filter-even:0 │ 12.37ns │ 9.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-even:1 │ 77.44ns │ 15.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-even:10 │ 207.10ns │ 36.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-even:100 │ 1\_699.41ns │ 261.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-even:1000 │ 56\_320.50ns │ 1\_009.00w │ 2\_506.01w │ 1\_004.01w │ 0.30% │
│ `core\_array.ml:filter` old-filter-even:10000 │ 469\_134.89ns │ 10\_009.00w │ 25\_007.38w │ 10\_005.38w │ 2.46% │
│ `core\_array.ml:filter` old-filter-even:100000 │ 4\_421\_742.22ns │ 100\_009.00w │ 250\_130.09w │ 100\_128.09w │ 23.17% │
│ `core\_array.ml:filter` new-filter-even:0 │ 13.87ns │ 14.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-even:1 │ 57.64ns │ 18.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-even:10 │ 196.28ns │ 35.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-even:100 │ 1\_361.04ns │ 215.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-even:1000 │ 21\_473.76ns │ 1\_014.00w │ 1\_001.02w │ │ 0.11% │
│ `core\_array.ml:filter` new-filter-even:10000 │ 204\_033.12ns │ 10\_014.00w │ 10\_001.14w │ 0.14w │ 1.07% │
│ `core\_array.ml:filter` new-filter-even:100000 │ 2\_058\_144.47ns │ 100\_014.00w │ 100\_002.00w │ 1.00w │ 10.78% │
│ `core\_array.ml:filter` old-filter-eq\_zero:0 │ 12.21ns │ 9.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-eq\_zero:1 │ 71.23ns │ 15.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-eq\_zero:10 │ 174.80ns │ 24.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-eq\_zero:100 │ 1\_212.70ns │ 114.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-eq\_zero:1000 │ 23\_347.51ns │ 13.00w │ 1\_007.00w │ 6.00w │ 0.12% │
│ `core\_array.ml:filter` old-filter-eq\_zero:10000 │ 210\_509.83ns │ 13.00w │ 10\_007.00w │ 6.00w │ 1.10% │
│ `core\_array.ml:filter` old-filter-eq\_zero:100000 │ 1\_912\_253.91ns │ 13.00w │ 100\_007.01w │ 6.01w │ 10.02% │
│ `core\_array.ml:filter` new-filter-eq\_zero:0 │ 13.70ns │ 14.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-eq\_zero:1 │ 56.56ns │ 18.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-eq\_zero:10 │ 179.42ns │ 27.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-eq\_zero:100 │ 1\_254.49ns │ 117.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-eq\_zero:1000 │ 20\_968.06ns │ 16.00w │ 1\_001.02w │ │ 0.11% │
│ `core\_array.ml:filter` new-filter-eq\_zero:10000 │ 204\_299.82ns │ 16.00w │ 10\_001.13w │ 0.13w │ 1.07% │
│ `core\_array.ml:filter` new-filter-eq\_zero:100000 │ 2\_019\_283.81ns │ 16.00w │ 100\_001.91w │ 0.91w │ 10.58% │
│ `core\_array.ml:filter` old-filter-neq\_zero:0 │ 12.14ns │ 9.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-neq\_zero:1 │ 32.72ns │ 11.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-neq\_zero:10 │ 219.18ns │ 48.00w │ │ │ │
│ `core\_array.ml:filter` old-filter-neq\_zero:100 │ 1\_902.76ns │ 408.00w │ 0.12w │ 0.12w │ │
│ `core\_array.ml:filter` old-filter-neq\_zero:1000 │ 82\_032.44ns │ 2\_007.00w │ 3\_998.20w │ 1\_997.20w │ 0.43% │
│ `core\_array.ml:filter` old-filter-neq\_zero:10000 │ 850\_234.44ns │ 20\_007.00w │ 40\_014.86w │ 20\_013.86w │ 4.46% │
│ `core\_array.ml:filter` old-filter-neq\_zero:100000 │ 7\_345\_941.05ns │ 200\_007.00w │ 400\_407.82w │ 200\_406.82w │ 38.49% │
│ `core\_array.ml:filter` new-filter-neq\_zero:0 │ 13.66ns │ 14.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-neq\_zero:1 │ 18.26ns │ 14.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-neq\_zero:10 │ 201.04ns │ 43.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-neq\_zero:100 │ 1\_404.33ns │ 313.00w │ │ │ │
│ `core\_array.ml:filter` new-filter-neq\_zero:1000 │ 22\_829.70ns │ 2\_012.00w │ 1\_001.02w │ │ 0.12% │
│ `core\_array.ml:filter` new-filter-neq\_zero:10000 │ 218\_872.52ns │ 20\_012.00w │ 10\_001.21w │ 0.21w │ 1.15% │
│ `core\_array.ml:filter` new-filter-neq\_zero:100000 │ 2\_121\_340.68ns │ 200\_012.00w │ 100\_002.77w │ 1.77w │ 11.12% │
│ `core\_array.ml:filter` old-filter\_map-int:0 │ 9.58ns │ 5.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-int:1 │ 68.46ns │ 11.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-int:10 │ 191.66ns │ 32.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-int:100 │ 1\_492.60ns │ 257.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-int:1000 │ 57\_155.42ns │ 1\_005.00w │ 2\_507.01w │ 1\_005.01w │ 0.30% │
│ `core\_array.ml:filter` old-filter\_map-int:10000 │ 522\_177.50ns │ 10\_005.00w │ 25\_008.54w │ 10\_006.54w │ 2.74% │
│ `core\_array.ml:filter` old-filter\_map-int:100000 │ 5\_945\_405.67ns │ 100\_005.00w │ 250\_170.69w │ 100\_168.69w │ 31.15% │
│ `core\_array.ml:filter` new-filter\_map-int:0 │ 12.03ns │ 10.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-int:1 │ 53.63ns │ 14.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-int:10 │ 164.16ns │ 31.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-int:100 │ 1\_263.42ns │ 211.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-int:1000 │ 23\_113.12ns │ 1\_010.00w │ 1\_001.02w │ │ 0.12% │
│ `core\_array.ml:filter` new-filter\_map-int:10000 │ 218\_152.23ns │ 10\_010.00w │ 10\_001.15w │ 0.15w │ 1.14% │
│ `core\_array.ml:filter` new-filter\_map-int:100000 │ 2\_217\_307.86ns │ 100\_010.00w │ 100\_002.11w │ 1.11w │ 11.62% │
│ `core\_array.ml:filter` old-filter\_map-float:0 │ 9.32ns │ 5.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-float:1 │ 66.68ns │ 13.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-float:10 │ 182.86ns │ 42.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-float:100 │ 1\_496.56ns │ 357.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-float:1000 │ 76\_479.74ns │ 2\_005.00w │ 3\_507.02w │ 2\_005.02w │ 0.40% │
│ `core\_array.ml:filter` old-filter\_map-float:10000 │ 694\_999.59ns │ 20\_005.00w │ 35\_011.08w │ 20\_009.08w │ 3.64% │
│ `core\_array.ml:filter` old-filter\_map-float:100000 │ 8\_694\_669.26ns │ 200\_005.00w │ 350\_476.44w │ 200\_474.44w │ 45.56% │
│ `core\_array.ml:filter` new-filter\_map-float:0 │ 12.29ns │ 10.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-float:1 │ 58.24ns │ 16.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-float:10 │ 142.67ns │ 41.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-float:100 │ 1\_119.41ns │ 311.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-float:1000 │ 14\_262.66ns │ 2\_010.00w │ 1\_001.02w │ │ 0.07% │
│ `core\_array.ml:filter` new-filter\_map-float:10000 │ 136\_448.05ns │ 20\_010.00w │ 10\_001.23w │ 0.23w │ 0.71% │
│ `core\_array.ml:filter` new-filter\_map-float:100000 │ 1\_282\_005.01ns │ 200\_010.00w │ 100\_003.14w │ 2.14w │ 6.72% │
│ `core\_array.ml:filter` old-filter\_map-boxed:0 │ 9.48ns │ 5.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-boxed:1 │ 71.16ns │ 13.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-boxed:10 │ 197.40ns │ 42.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-boxed:100 │ 1\_762.40ns │ 357.00w │ │ │ │
│ `core\_array.ml:filter` old-filter\_map-boxed:1000 │ 86\_220.67ns │ 2\_005.00w │ 3\_507.02w │ 2\_005.02w │ 0.45% │
│ `core\_array.ml:filter` old-filter\_map-boxed:10000 │ 828\_291.42ns │ 20\_005.00w │ 35\_011.84w │ 20\_009.84w │ 4.34% │
│ `core\_array.ml:filter` old-filter\_map-boxed:100000 │ 7\_955\_395.61ns │ 200\_005.00w │ 350\_441.44w │ 200\_439.44w │ 41.68% │
│ `core\_array.ml:filter` new-filter\_map-boxed:0 │ 14.43ns │ 10.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-boxed:1 │ 59.24ns │ 16.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-boxed:10 │ 198.19ns │ 41.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-boxed:100 │ 1\_580.21ns │ 311.00w │ │ │ │
│ `core\_array.ml:filter` new-filter\_map-boxed:1000 │ 52\_045.31ns │ 2\_010.00w │ 2\_011.01w │ 1\_010.01w │ 0.27% │
│ `core\_array.ml:filter` new-filter\_map-boxed:10000 │ 479\_239.44ns │ 20\_010.00w │ 20\_012.42w │ 10\_011.42w │ 2.51% │
│ `core\_array.ml:filter` new-filter\_map-boxed:100000 │ 4\_389\_392.06ns │ 200\_010.00w │ 200\_135.09w │ 100\_134.09w │ 23.00% │
│ `core\_array.ml:filter` old-partition\_tf:0 │ 16.55ns │ 16.00w │ │ │ │
│ `core\_array.ml:filter` old-partition\_tf:1 │ 128.08ns │ 29.00w │ │ │ │
│ `core\_array.ml:filter` old-partition\_tf:10 │ 554.15ns │ 111.00w │ │ │ │
│ `core\_array.ml:filter` old-partition\_tf:100 │ 4\_853.58ns │ 921.00w │ 0.46w │ 0.46w │ 0.03% │
│ `core\_array.ml:filter` old-partition\_tf:1000 │ 201\_289.06ns │ 5\_016.00w │ 9\_015.21w │ 5\_010.21w │ 1.05% │
│ `core\_array.ml:filter` old-partition\_tf:10000 │ 1\_796\_749.87ns │ 50\_016.00w │ 90\_040.96w │ 50\_035.96w │ 9.41% │
│ `core\_array.ml:filter` old-partition\_tf:100000 │ 19\_084\_871.85ns │ 500\_016.00w │ 902\_187.67w │ 502\_182.67w │ 100.00% │
│ `core\_array.ml:filter` new-partition\_tf:0 │ 28.29ns │ 23.00w │ │ │ │
│ `core\_array.ml:filter` new-partition\_tf:1 │ 103.78ns │ 31.00w │ │ │ │
│ `core\_array.ml:filter` new-partition\_tf:10 │ 504.10ns │ 96.00w │ │ │ │
│ `core\_array.ml:filter` new-partition\_tf:100 │ 3\_869.52ns │ 726.00w │ 0.23w │ 0.23w │ 0.02% │
│ `core\_array.ml:filter` new-partition\_tf:1000 │ 122\_807.29ns │ 4\_023.00w │ 5\_013.04w │ 2\_010.04w │ 0.64% │
│ `core\_array.ml:filter` new-partition\_tf:10000 │ 1\_197\_596.39ns │ 40\_023.00w │ 50\_020.05w │ 20\_017.05w │ 6.28% │
│ `core\_array.ml:filter` new-partition\_tf:100000 │ 10\_458\_344.09ns │ 400\_023.00w │ 500\_590.94w │ 200\_587.94w │ 54.80% │
└────────────────────────────────────────────────────┴─────────────────┴─────────────┴─────────────┴─────────────┴────────────┘
- Added `Binable.Of_sexpable` functor.
- Install the sexp exception printer sooner so that we can get proper
`%test_result ...` errors in things that come before `core_kernel`.
- In `Stable_unit_test.Make` functors, include all test failures rather
than just the first. This is useful for updating batches of expected
`bin_io` results when stabilizing a module.
- Remove an unnecessary cast in or_error.ml
## 113.00.00
- Added `Float.int63_round_nearest_exn`.
val int63_round_nearest_exn : t -> Core_int63.
- Changed `Hashtbl.sexp_of_t` so that keys are sorted in increasing order.
This also applies to the `sexp_of_t` produced by `Hashtbl.Make` and
`Make_binable`. Sorting by key is nice when looking at output, as well as
in tests, so that the output is deterministic and so that diffs are
minimized when output changes.
- Added to `Info`, `Error`, and `Or_error` a `Stable.V2` module, whose `bin_io`
is the same as the unstable `bin_io`.
- Replaced `Map.prev_key` and `next_key` with `closest_key`.
val closest_key
: ('k, 'v, 'cmp) t
-> [ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than
]
-> 'k
-> ('k * 'v) option
- Shared code between `Monad.Make{,2}` and `Applicative.Make{,2}`.
- Added tests to make sure `round_nearest` and `int63_round_nearest_exn`
don't allocate.
- Added `Lazy.T_unforcing` module, with a custom `sexp_of_t` that doesn't
force.
This serializer does not support round tripping, i.e. `t_of_sexp`. It
is intended to be used in debug code or `<:sexp_of< >>` statements. E.g:
type t =
{ x : int Lazy.T_unforcing.t
; y : string
}
with sexp_of
- Extended `Map.to_sequence` and `Set.to_sequence` to take any combination of
upper bound, lower bound, and direction.
- Added `Map.split`.
- Added `Timing_wheel.fire_past_alarms`, which fires alarms in the current time
interval's bucket whose time is in the past.
- Added a `Total_map` module, for maps where every value of the key type is
present in the map.
- Added `Bigstring.compare` and `Bigstring.equal`.
- Split `monad.ml` into three files: `monad.ml`, `monad.mli`, and `monad_intf.ml`.
- Removed the last remaining dependence of `Core_kernel` on Unix, moving
`Time_ns.pause` functions to `Core`.
- Added optional arguments to `Hash_queue.create`, `?growth_allowed` and
`size`, which then get passed to `Hashtbl.create`.
- Added a `?strict:unit` argument to functions that ordinarily create lazy
sexps, like `failwiths`.
Info.create
Error.create
Error.failwiths
Error.failwithp
Or_error.error
This makes it easy to force a use to be strict, which is sometimes
useful to accurately capture the state of a mutable data structure at
the time the error happens, lest it change by the time the error is
rendered.
- Removed `Interned_string` module.
- In `Pooled_hashtbl`, avoid trying to create arrays bigger than
`Sys.max_array_length`.
The problem affected 32-bit platforms.
- Added `Quickcheck` module.
Supports automated testing with randomly-generated inputs in the style of
Haskell's Quickcheck library. Our adaptation supports flexible probability
distributions for values of a given type and uniqueness guarantees for
generated values.
- Made `Set.to_sequence` and `Set.split` have the same interface as
`Map.to_sequence` and `Map.split`, respectively.
- Fixed `Float` and `Timing_wheel` to compile on 32-bit platforms.
- Added `Lazy.Stable.V1`.
- Added `List.reduce_balanced`, which is like `reduce`, but relies on
associativity of `f` to make nesting of calls to `f` logarithmic rather than
linear in the input list length.
- Added `String_id.Make_without_pretty_printer`.
- Restricted `Time_ns.Span` values to be less than 135 years, which ensures the
corresponding `float` `Time.Span` values have microsecond precision.
Fixed a `Time_ns` test that recently started failing due to crossing
the 135-year boundary.
Reducing the range of `Time_ns.Span` required adjusting the implementation
of `Core.Time_ns.Option.Stable.V1`, which (accidentally, incorrectly)
incorporated the (unstabilized) `Core_kernel.Time_ns.Span.min_value` as the
representation of `bid_none` and `.max_value` as `ask_none`. The prior
representation is preserved, but some previously allowed values are no
longer allowed and now raise exceptions!
- Added `Rope` module, the standard data structure for efficient string
manipulation.
- Added `Sequence.unfold_with_and_finish`, a variant of `unfold_with` that can
continue the sequence after the inner sequence finishes.
- Replaced `Sequence.cycle` with `Sequence.cycle_list_exn`, to work around a
bug in `Sequence.cycle` raising on the empty sequence.
Sequence.cycle can cause an infinite loop if its input is empty. It is
problematic to check whether the input sequence is empty.
* If we check it eagerly, we have to turn `cycle` into
`cycle_eagerly_exn`, and it will evaluate the first element twice.
* If we check it lazily, we might raise an exception in a seemingly
unrelated part of the code, and the usually-good habit of wrapping a
function like `cycle_exn` in `try .. with ..` would not catch it.
To get around these issues, [cycle] is changed to accept only lists as
inputs, not sequences. It is now called [cycle_list_exn].
- Fixed assumptions about the size of integers, to support compiling to
Javascript, where integers are 32-bit.
- Fixed build on Mac OSX.
Fix build when LINUX_EXT or TIMERFD are undefined.
- Added `Caml.Bytes`.
Add an alias for Bytes in Caml. Fixes janestreet/core_kernel#46.
- In `Container`, exposed polymorphic functions individually building container functions using `fold` or `iter`.
Exposed polymorphic functions in `Core_kernel.Container` for
individually building each of the `Container` functions using `fold`
or `iter`. E.g.:
type ('t, 'elt, 'accum) fold =
't -> init:'accum -> f:('accum -> 'elt -> 'accum) -> 'accum
type ('t, 'elt) iter = 't -> f:('elt -> unit) -> unit
val length : fold:('t, _, int ) fold -> 't -> int
val exists : iter:('t, 'a) iter -> 't -> f:('a -> bool) -> bool
- Added container.mli, which was sorely missing.
- Added `Doubly_linked.to_sequence`.
- Added `Hash_queue.sexp_of_t`.
## 112.35.00
- Added an Applicative interface to Core
(a.k.a. idioms or applicative functors)
- Generalized the signature of `Hashtbl.merge_into` to allow the types
of `src` and `dst` to be different.
- Made `Day_of_week.of_string` accept additional formats (integers 0-6,
full day names).
- Added `Day_of_week.to_string_long`, which produces the full day name.
- Changed `Hashtbl.add_exn` to not create a new exception constructor
when it raises due to a duplicate key.
- Added `Map.nth`, which returns the nth element of a map, ordered by
key rank.
- Added `Binable.Of_binable` functors, similar to `Sexpable.Of_sexpable`
One should use `Binable.Of_binable` rather than the functionally
equivalent `Bin_prot.Utils.Make_binable`.
- Added `Either` module, with
`type ('a, 'b) t = First of 'a | Second of 'b`.
- Added to `Univ_map` a functor that creates a new `Univ_map` type in
which the type of data is a function of the key's type, with the type
function specified by the functor's argument.
Normally, a `Univ_map.t` stores `('a Key.t * 'a)` pairs. This feature
lets it store `('a Key.t * 'a Data.t)` pairs for a given
`('a Data.t)`.
- Made `Day_of_week.Stable` be `Comparable` and `Hashable`.
- Fixed a couple `Exn` unit tests that mistakenly relied on the global
setting of `Printexc.get_backtrace`.
Now the tests locally set it to what they need.
This avoids unit-test failures when running with no
`OCAMLRUNPARAM` set:
File "exn.ml", line 130, characters 2-258: clear_backtrace threw "Assert_failure exn.ml:133:4".
in TEST_MODULE at file "exn.ml", line 127, characters 0-1057
- Renamed `Monad.ignore` as `Monad.ignore_m`, while preserving
`ignore = ignore_m` in existing modules (e.g. `Deferred`)
that used it.
We can later consider those modules on a case-by-case basis to see
whether we want to remove `ignore`.
- Added `Set.symmetric_diff`.
- Added `Timing_wheel.reschedule`, which reschedules an existing alarm.
- Added `Applicative.S2`, analogous to `Monad.S2`.
- Added combinators to `Either`.
- Added `Hashtbl.add_or_error` and `create_with_key_or_error`, which use
`Or_error` and are more idiomatic ways of signalling duplicates.
- Added `Sexpable.Of_sexpable1` functor, for one-parameter type
constructors.
- Made `Timing_wheel_ns` keys be `Int63.t` rather than `int`, so that
behavior is consistent on 32-bit and 64-bit machines.
Also, made `Timing_wheel.Interval_num` an abstract type.
- Hid the `bytes` type in `Core.Std`, so that type errors refer to
`string` rather than `bytes`.
Added `Bytes` module so that people can say `Bytes.t` if they
need to.
Now we get reasonable error messages:
String.length 13
-->
Error: This expression has type int but an expression was expected of type
string
"" + 13
-->
Error: This expression has type string but an expression was expected of type
int
- Modernized the coding style in `Timing_wheel`.
- Replaced `Unpack_buffer.unpack` with `unpack_into` and `unpack_iter`,
to avoid allocation.
`Unpack_buffer.unpack` created a (vector-backed) `Core.Std.Queue`
for each call. When unpacking a buffer containing many values,
resizing of the buffer can be costly and in some cases leads to
promotions of short-lived data to the major heap.
The new functions avoid allocating the queue:
val unpack_into : ('value, _) t -> 'value Queue.t -> unit Or_error.t
val unpack_iter : ('value, _) t -> f:('value -> unit) -> unit Or_error.t
- Cleaned up the implementation of `Gc.tune`.
- Change `Unit` implementation to use `Identifiable.Make` instead of
applying functors separately.
- Added `val random: unit -> int` to `Int63`.
- Reworked `Float.iround_*_exn` functions to not allocate in the common case.
- Added `Fqueue.singleton` and `Fdeque.singleton`.
- Moved `Unix.tm` and `Unix.strftime` from `Core_kernel` to `Core`.
Added external time formatting:
float (* seconds *)-> string (* format *) -> string = "..."
- Made `String_id.Make` call `Pretty_printer.Register`.
- Changed `String_id` to allow the pipe character in identifiers.
- Made `List.compare` have the usual type from `with compare`,
`val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int`.
Previously, `List.compare`'s type was:
val compare : 'a t -> 'a t -> cmp:('a -> 'a -> int) -> int
- Made stable `Map`'s and `Set`'s conform to the `Stable1` interface.
- Reworked `Hashtbl.find_exn` to not allocate.
Previously, `Hashtbl.find_exn` allocated because it called
`Hashtbl.find`, which allocates an option (partially because
`Avltree` allocates options in its `find` function).
## 112.24.00
- Added `Time_ns` module.
A fragment of `Core.Std.Time_ns` is now in `Core_kernel.Std.Time_ns` such that
`Async_kernel` can use `Time_ns` and only depend on `Core_kernel`.
- Renamed `Dequeue` as `Deque`.
`Dequeue` remains for backward compatibility, but should not be used anymore.
Use `Deque` instead.
- Added `Fdeque` module, a functional version `Deque`.
Deprecate deque-like functions in `Fqueue`.
## 112.17.00
- Added `List.is_prefix`.
```ocaml
val List.is_prefix : 'a t -> prefix:'a t -> equal:('a -> 'a -> bool) -> bool
```
- Made `String_id.Make` functor generative, which exposes that the
result has `type t = private string`.
Previously the result of `String_id.Make` didn't expose `type t =
private string` due to a type-checker bug:
* http://caml.inria.fr/mantis/view.php?id=6485
* http://caml.inria.fr/mantis/view.php?id=6011
- Used generative functors, e.g. for `Unique_id`.
Used generative functors (new feature in 4.02) where previously we
used dummy `M : sig end` arguments in the signature and `(struct
end)` when applying the functor.
Just to note the difference between applicative and generative
functors. Suppose we have:
```ocaml
module F (M : sig end) : sig type t end
```
and we apply it several times
```ocaml
module A = F (struct end)
module B = F (struct end)
module C = F (String)
module D = F (String)
```
Then we have that `A.t <> B.t` but `C.t = D.t`. This can lead to
subtle bugs, e.g. `Unique_id.Int (Unit)`. Note that it is perfectly
valid to apply any module to `F`, even though that is certainly not
what we want.
In 4.02, we can explicitly say that functor generates new types,
i.e. it is generative. For this we use argument `()`. So `F`
becomes
```ocaml
module F () : sig type t end
```
You can only apply `F` to `()` or `(struct end)` but each
application yields a new type `t`.
```ocaml
module A = F ()
module B = F ()
module C = F (struct end)
module D = F (String) (* illegal *)
```
and now `A.t`, `B.t` and `C.t` are all different.
Note that `F (struct end)` is still allowed but was converted to to
`F ()` for consistency with signatures.
Propagated generativity where necessary. If inside a functor we use
generative functor that creates new types, then we also need to make
the enclosing functor generative.
For functors that don't create types (like `Async.Log.Make_global`),
generative or applicative functors are the same, but the syntax of
generative functors is lighter.
- Exported `Core_kernel.Std.With_return`.
- Exposed the record type of `Source_code_position.t`.
- In `Weak_hashtbl.create`, exposed the `?growth_allowed` and `?size`
arguments of the underlying `Hashtbl.create`.
- Added `with compare` to `Array`.
- Sped up `Int.pow`.
Benchmarks before:
| Name | Time/Run | mWd/Run | Percentage |
|-----------------------------------------------|--------------|---------|------------|
| [int_math.ml:int_math_pow] random[ 5] x 10000 | 140_546.89ns | | 53.98% |
| [int_math.ml:int_math_pow] random[10] x 10000 | 173_853.08ns | | 66.77% |
| [int_math.ml:int_math_pow] random[30] x 10000 | 219_948.85ns | | 84.47% |
| [int_math.ml:int_math_pow] random[60] x 10000 | 260_387.26ns | | 100.00% |
| [int_math.ml:int_math_pow] 2 ^ 30 | 11.34ns | | |
| [int_math.ml:int_math_pow] 2L ^ 30L | 21.69ns | 3.00w | |
| [int_math.ml:int_math_pow] 2L ^ 60L | 22.95ns | 3.00w | |
and after:
| Name | Time/Run | mWd/Run | Percentage |
|-----------------------------------------------|--------------|---------|------------|
| [int_math.ml:int_math_pow] random[ 5] x 10000 | 105_200.94ns | | 80.78% |
| [int_math.ml:int_math_pow] random[10] x 10000 | 117_365.82ns | | 90.12% |
| [int_math.ml:int_math_pow] random[30] x 10000 | 130_234.51ns | | 100.00% |
| [int_math.ml:int_math_pow] random[60] x 10000 | 123_621.45ns | | 94.92% |
| [int_math.ml:int_math_pow] 2 ^ 30 | 8.55ns | | |
| [int_math.ml:int_math_pow] 2L ^ 30L | 22.17ns | 3.00w | 0.02% |
| [int_math.ml:int_math_pow] 2L ^ 60L | 22.49ns | 3.00w | 0.02% |
- Removed the old, deprecated permission phantom types (`read_only`,
etc.) and replaced them with the new =Perms= types.
The old types had subtyping based on covariance and `private` types.
The new types have subtyping based on contravariance and dropping
capabilities.
Renamed `read_only` as `read`, since `Perms` doesn't distinguish
between them.
The idiom for the type of a function that only needs read access
changed from:
```ocaml
val f : _ t -> ...
```
to
```ocaml
val f : [> read ] t -> ...
```
This mostly hit `Iobuf` and its users.
- Added `String.is_substring`.
- Added `With_return.prepend`, and exposed `With_return.t` as
contravariant.
```ocaml
(** [prepend a ~f] returns a value [x] such that each call to [x.return] first applies [f]
before applying [a.return]. The call to [f] is "prepended" to the call to the
original [a.return]. A possible use case is to hand [x] over to an other function
which returns ['b] a subtype of ['a], or to capture a common transformation [f]
applied to returned values at several call sites. *)
val prepend : 'a return -> f:('b -> 'a) -> 'b return
```
- Moved the `Gc` module's alarm functionality into a new
`Gc.Expert.Alarm` module.
The was done because the Gc alarms introduce threading semantics.
- Exposed modules in `Core_kernel.Std`: `Int_conversions`,
`Ordered_collection_common`
- Removed `Pooled_hashtbl` from `Hashable.S`, to eliminate a
dependency cycle between `Int63` and `Pool`.
This was needed to use `Int63` in `Pool`. Previously, `Int63 <- Int
<- Hashable <- Pool`, which made it impossible to use `Int63` in
`Pool`.
So, we are removing the dependency `Hashable <- Pool`, simplifying
`Hashable` to not include `Pooled_hashtbl`, and letting users call
the `Pooled_hashtbl` functor directly when necessary.
- Added to `Pool.Pointer.Id` conversions to and from `Int63`.
- Made `Pooled_hashtbl.resize` allocate less.
- Removed `Pool.pointer_of_id_exn_is_supported`, which was always
`true`.
- Added `with compare` to `Info`, `Error`, `Or_error`.
- Moved `Backtrace` from `Core`
- In C stubs, replaced `intxx` types by `intxx_t`.
Following this: http://caml.inria.fr/mantis/view.php?id=6517
Fixes #23
- Removed `Backtrace.get_opt`, which is no longer necessary now that
`Backtrace.get` is available on all platforms.
- Added module types: `Stable`, `Stable1`, `Stable2`.
- Exposed `Core_kernel.Std.Avltree`.
- Removed from `Binary_packing` a duplicated exception,
`Pack_signed_32_argument_out_of_range`.
Closes #26
- Made `Info`, `Error`, and `Or_error` stable.
The new stable serialization format is distinct from the existing
unstable serialization format in the respective modules, which wasn't
changed.
- Add `Sequence.Step.sexp_of_t`.
## 112.06.00
- Made `String_id` have `Stable_containers.Comparable`.
- Changed `Gc.disable_compaction` to require an `allocation_policy`.
- Made `Option` match `Invariant.S1`.
- Added `Sequence.filter`, `compare`, and `sexp_of_t`.
- Added `With_return.with_return_option`, abstracting a common pattern
of `with_return`.
val with_return : ('a return -> 'a ) -> 'a
val with_return_option : ('a return -> unit) -> 'a option
- Install a handler for uncaught exceptions, using
`Printexc.set_uncaught_exception_handler`, new in OCaml 4.02.
- Changed `Day_of_week` representation to a normal variant.
- Changed `Exn.handle_uncaught` so that if it is unable to print, it
still does `exit 1`.
- Added `Sexp.of_sexp_allow_extra_fields`, previously in
`Core_extended.Sexp`.
- Changed the implementation of `Exn.raise_without_backtrace` to use
`raise_notrace`, new in OCaml 4.02.
- Added `Float` functions for converting to and from IEEE
sign/exponent/mantissa.
- Added `String.Caseless` module, which compares and hashes strings
ignoring case.
- Reimplemented `Type_equal.Id` using extensible types (new in OCaml
4.02), removing a use of `Obj.magic`.
Changed `Type_equal.Id.same_witness` to return `option` rather than
`Or_error`, which allows it to be implemented without allocation.
- Removed a reference to the `Unix` module. Applications using
`core_kernel` should be able to link without `unix.cma` again.
- Made `Char.is_whitespace` accept `\f` and `\v` as whitespace,
matching C.
## 112.01.00
- Removed vestigial code supporting OCaml 4.00.
- Used `{Hashable,Comparable}.S_binable` in `Day_of_week` and `Month`.
- Improved the performance of `Set_once.set`.
- Added `Type_equal.Lift3` functor.
- Replaced occurrences of `Obj.magic 0` with `Obj.magic None`.
With the former the compiler might think the destination type is
always an integer and instruct the GC to ignore references to such
values. The latter doesn't have this problem as options are not
always integers.
- Made `String_id.of_string` faster.
- Added `Bigstring` functions for reading and writing the
size-prefixed bin-io format.
- `bin_prot_size_header_length`
- `write_bin_prot`
- `read_bin_prot`
- `read_bin_prot_verbose_errors`
- Added `{Info,Error}.to_string_mach` which produces a single-line
sexp from an `Error.t`.
- Added `{Info,Error}.createf`, for creation from a format string.
- Added new `Perms` module with phantom types for managing access
control.
This module supersedes the `read_only`, `read_write`, and
`immutable` phantom types, which are now deprecated, and will be
removed in the future. This module uses a different approach using
sets of polymorphic variants as capabilities, and contravariant
subtyping to express dropping capabilities.
This approach fixes a bug with the current phantom types used for
`Ref.Permissioned` in which `immutable` types aren't guaranteed to
be immutable:
```ocaml
let r = Ref.Permissioned.create 0
let r_immutable = (r : (int, immutable) Ref.Permissioned.t)
let () = assert (Ref.Permissioned.get r_immutable = 0)
let () = Ref.Permissioned.set r 1
let () = assert (Ref.Permissioned.get r_immutable = 1)
```
The bug stems from the fact that the phantom-type parameter is
covariant, which allows OCaml's relaxed value restriction to kick
in, which allows one to create a polymorphic value, which can then
be viewed as both immutable and read write. Here's a small
standalone example to demonstrate:
```ocaml
module F (M : sig
type +'z t
val create : int -> _ t
val get : _ t -> int
val set : read_write t -> int -> unit
end) : sig
val t : _ M.t
end = struct
let t = M.create 0
let t_immutable = (t : immutable M.t)
let () =
assert (M.get t_immutable = 0);
M.set t 1;
assert (M.get t_immutable = 1);
;;
end
```
The new approach fixes the problem by making the phantom-type
parameter contravariant, and using polymorphic variants as
capabilities to represent what operations are allowed.
Contravariance allows one to drop capabilities, but not add them.
- Added `Int.Hex` module, which has hexadecimal sexp/string
conversions.
- Added `Gc.major_plus_minor_words`, for performance reasons.
## 111.28.00
- Added `Pooled_hashtbl.resize` function, to allow preallocating a table
of the desired size, to avoid growth at an undesirable time.
- Added `Pooled_hashtbl.on_grow` callback, to get information about
hashtbl growth.
- Changed `Hashable.Make` to not export a `Hashable` module.
The `Hashable` module previously exported was useless, and shadowed
`Core.Std.Hashable`.
- Moved `Common.does_raise` to `Exn.does_raise`, to make it easier to
find.
- Added `Float.one`, `minus_one`, and `~-`. (fixes #12).
- Removed `Core.Std.unimplemented` and renamed it as
`Or_error.unimplemented`.
It is not used enough to live in the global namespace.
## 111.25.00
- Fix build on FreeBSD
Closes #10
- Added functions to `Container` interface: `sum`, `min_elt`,
`max_elt`.
```ocaml
(** Returns the sum of [f i] for i in the container *)
val sum
: (module Commutative_group.S with type t = 'sum)
-> t -> f:(elt -> 'sum) -> 'sum
(** Returns a min (resp max) element from the collection using the provided [cmp]
function. In case of a tie, the first element encountered while traversing the
collection is returned. The implementation uses [fold] so it has the same
complexity as [fold]. Returns [None] iff the collection is empty. *)
val min_elt : t -> cmp:(elt -> elt -> int) -> elt option
val max_elt : t -> cmp:(elt -> elt -> int) -> elt option
```
- Made `Core_hashtbl_intf` more flexible. For instance supports
modules that require typereps to be passed when creating a table.
Address the following issues:
The type `('a, 'b, 'z) create_options` needs to be consistently used
so that `b` corresponds with the type of data values in the returned
hash table. The type argument was wrong in several cases.
Added the type `('a, 'z) map_options` to `Accessors` so that
map-like functions -- those that output hash tables of a different
type than they input -- can allow additional arguments.
- Fixed a bug in `Dequeue`'s `bin_prot` implementation that caused it
to raise when deserializing an empty dequeue.
- Made `Container.Make`'s interface match `Monad.Make`.
- Deprecated infix `or` in favor of `||`.
- Simplified the interface of `Arg` (which was already deprecated in
favor of `Command`).
- Replaced `Bag.fold_elt` with `Bag.filter`.
- `Memo.general` now raises on non-positive `cache_size_bound`.
- Removed `Option.apply`.
- Removed `Result.call`, `Result.apply`.
- Moved `Quichcheck` to `core_extended`.
It should not be used in new code.
## 111.21.00
- Removed our custom C stub for closing channels, reverting to the one
in the OCaml runtime.
A long time ago we found that the OCaml runtime did not release the
lock before calling `close` on the fd underlying a channel. On some
filesystems (e.g. smb, nfs) this could cause a runtime hang. We
filed a bug with INRIA and wrote our own `close` function which
`In_channel` calls to this day. The bug has long been fixed, and
our function is probably buggy, so this reverts us to the runtime's
`close`.
- Added `Float.{of,to}_int64_preserve_order`, which implement the
order-preserving zero-preserving bijection between non-NaN floats and
99.95% of `Int64`'s.
Used the new function to improve `one_ulp`, which is now exposed:
(** The next or previous representable float. ULP stands for "unit of least precision",
and is the spacing between floating point numbers. Both [one_ulp `Up infinity] and
[one_ulp `Down neg_infinity] return a nan. *)
val one_ulp : [`Up | `Down] -> t -> t
- Changed `Map.symmetric_diff` to return a `Sequence.t`
instead of a `list`.
- Added `Sequence.filter_map`.
- Improved `Stable_unit_test.Make_sexp_deserialization_test`'s error
message so that it includes the expected sexp.
## 111.17.00
- In `Bigstring`, made many operations use compiler primitives new in
OCaml 4.01.
Exposed `Bigstring.get` and `set` as compiler primitives in the
interface.
Added `Bigstring.unsafe_get_int64_{le,be}_trunc`.
- Made `Error` round trip `exn`, i.e. `Error.to_exn (Error.of_exn exn)
= exn`.
- Added to `failwiths` an optional `?here:Lexing.position` argument.
- Added `with typerep` to `Flags.S`.
- Optimized `List.dedup []` to return immediately.
- Added `data` argument to polymorphic type `Hashtbl_intf.Creators.create_options`.
This allows implementations of `Hashtbl_intf.Creators` to have
constructor arguments that depend on the type of both key and data
values. For example:
```ocaml
module type Hashtbl_creators_with_typerep =
Hashtbl_intf.Creators
with type ('key, 'data, 'z) create_options
= typerep_of_key:'key Typerep.t
-> typerep_of_data:'data Typerep.t
-> 'z
```
- Improved the interface for getting `Monad.Make` to define `map` in
terms of `bind`.
Instead of passing a `map` function and requiring everyone who wants
to define `map` using `bind` to call a special function, we use a
variant type to allow the user to say what they want:
```ocaml
val map : [ `Define_using_bind
| `Custom of ('a t -> f:('a -> 'b) -> 'b t)
]
```
- Improved the performance of many `Dequeue` functions.
Previously, many `Dequeue.dequeue`-type functions worked by raising
and then catching an exception when the dequeue is empty. This is
much slower than just testing for emptiness, which is what the code
now does.
This improves the performance of `Async.Writer`, which uses
`Dequeue.dequeue_front`.
## 111.13.00
- Added a `Sequence` module that implements polymorphic, on-demand
sequences.
Also implemented conversion to `Sequence.t` from various containers.
- Improved the explicitness and expressiveness of
`Binary_searchable.binary_search`.
`binary_search` now takes an additional (polymorphic variant)
argument describing the relationship of the returned position to the
element being searched for.
val binary_search
: ?pos:int
-> ?len:int
-> t
-> compare:(elt -> elt -> int)
-> [ `Last_strictly_less_than (** {v | < elt X | v} *)
| `Last_less_than_or_equal_to (** {v | <= elt X | v} *)
| `Last_equal_to (** {v | = elt X | v} *)
| `First_equal_to (** {v | X = elt | v} *)
| `First_greater_than_or_equal_to (** {v | X >= elt | v} *)
| `First_strictly_greater_than (** {v | X > elt | v} *)
]
-> elt
-> int option
- Added a new function, `Binary_searchable.binary_search_segmented`,
that can search an array consisting of two segments, rather than ordered
by `compare`.
(** [binary_search_segmented ?pos ?len t ~segment_of which] takes an [segment_of]
function that divides [t] into two (possibly empty) segments:
{v
| segment_of elt = `Left | segment_of elt = `Right |
v}
[binary_search_segmented] returns the index of the element on the boundary of the
segments as specified by [which]: [`Last_on_left] yields the index of the last
element of the left segment, while [`First_on_right] yields the index of the first
element of the right segment. It returns [None] if the segment is empty.
By default, [binary_search] searches the entire [t]. One can supply [?pos] or
[?len] to search a slice of [t].
[binary_search_segmented] does not check that [segment_of] segments [t] as in the
diagram, and behavior is unspecified if [segment_of] doesn't segment [t]. Behavior
is also unspecified if [segment_of] mutates [t]. *)
val binary_search_segmented
: ?pos:int
-> ?len:int
-> t
-> segment_of:(elt -> [ `Left | `Right ])
-> [ `Last_on_left | `First_on_right ]
-> int option
- Made `Queue` match `Binary_searchable.S1`.
- Made `Gc.Stat` and `Gc.Control` match `Comparable`.
- Fixed some unit tests in `Type_immediacy` that were fragile due to GC.
## 111.11.00
- Added to `String` functions for substring search and replace, based
on the KMP algorithm.
Here are some benchmarks, comparing `Re2` for a fixed pattern,
Mark's kmp from extended_string, and this implementation ("needle").
The pattern is the usual `abacabadabacabae...`. The text looks
similar, with the pattern occurring at the very end.
For =Re2= and =Needle= search benchmarks, the pattern is
preprocessed in advance, outside of the benchmark.
FWIW: I've also tried searches with pattern size = 32767, but =Re2=
blows up, saying:
```
re2/dfa.cc:447: DFA out of memory: prog size 32771 mem 2664898
```
| Name | Time/Run | mWd/Run | mjWd/Run | Prom/Run | Percentage |
|-------------------------------|-----------------|---------------|-------------|----------|------------|
| create_needle_15 | 102.56ns | 21.00w | | | |
| re2_compile_15 | 6_261.48ns | | 3.00w | | 0.01% |
| create_needle_1023 | 13_870.48ns | 5.00w | 1_024.01w | | 0.03% |
| re2_compile_1023 | 107_533.32ns | | 3.03w | | 0.24% |
| create_needle_8191 | 90_107.02ns | 5.00w | 8_192.01w | | 0.20% |
| re2_compile_8191 | 1_059_873.47ns | | 3.28w | 0.28w | 2.37% |
| create_needle_524287 | 6_430_623.96ns | 5.00w | 524_288.09w | | 14.35% |
| re2_compile_524287 | 44_799_605.83ns | | 3.77w | 0.77w | 100.00% |
| needle_search_15_95 | 349.65ns | 4.00w | | | |
| re2_search_15_95 | 483.11ns | | | | |
| mshinwell_search_15_95 | 1_151.38ns | 781.01w | | | |
| needle_search_15_815 | 2_838.85ns | 4.00w | | | |
| re2_search_15_815 | 3_293.06ns | | | | |
| mshinwell_search_15_815 | 8_360.57ns | 5_821.07w | 0.55w | 0.55w | 0.02% |
| needle_search_15_2415 | 8_395.84ns | 4.00w | | | 0.02% |
| re2_search_15_2415 | 9_594.14ns | | | | 0.02% |
| mshinwell_search_15_2415 | 24_602.09ns | 17_021.16w | 1.62w | 1.62w | 0.05% |
| needle_search_1023_6143 | 14_825.50ns | 4.00w | | | 0.03% |
| re2_search_1023_6143 | 40_926.59ns | | | | 0.09% |
| mshinwell_search_1023_6143 | 81_930.46ns | 49_149.66w | 1_025.65w | 1.65w | 0.18% |
| needle_search_1023_52223 | 126_465.96ns | 4.00w | | | 0.28% |
| re2_search_1023_52223 | 365_359.98ns | | | | 0.82% |
| mshinwell_search_1023_52223 | 527_323.73ns | 371_715.39w | 1_033.17w | 9.17w | 1.18% |
| needle_search_1023_154623 | 377_539.53ns | 4.00w | | | 0.84% |
| re2_search_1023_154623 | 1_001_251.93ns | | | | 2.23% |
| mshinwell_search_1023_154623 | 1_499_835.01ns | 1_088_518.15w | 1_033.19w | 9.19w | 3.35% |
| needle_search_8191_49151 | 115_223.31ns | 4.00w | | | 0.26% |
| re2_search_8191_49151 | 559_487.38ns | | | | 1.25% |
| mshinwell_search_8191_49151 | 653_981.19ns | 393_219.50w | 8_201.01w | 9.01w | 1.46% |
| needle_search_8191_417791 | 976_725.24ns | 4.00w | | | 2.18% |
| re2_search_8191_417791 | 4_713_965.69ns | | | | 10.52% |
| mshinwell_search_8191_417791 | 4_224_417.93ns | 2_973_709.32w | 8_202.37w | 10.37w | 9.43% |
| needle_search_8191_1236991 | 2_912_863.78ns | 4.00w | | | 6.50% |
| re2_search_8191_1236991 | 14_039_230.59ns | | | | 31.34% |
| mshinwell_search_8191_1236991 | 11_997_713.73ns | 8_708_130.87w | 8_202.47w | 10.47w | 26.78% |
- Added to `Set` functions for converting to and from a `Map.t`.
```ocaml
val to_map : ('key, 'cmp) t -> f:('key -> 'data) -> ('key, 'data, 'cmp) Map.t
val of_map_keys : ('key, _, 'cmp) Map.t -> ('key, 'cmp) t
```
This required adding some additional type trickery to
`Core_set_intf` to indicate that the comparator for a given module
may or may not be fixed.
- Added an optional `iter` parameter to `Container.Make`.
A direct implementation of `iter` is often more efficient than
defining `iter` in terms of `fold`, and in these cases, the results
of `Container.Make` that are defined in terms of `iter` will be more
efficient also.
- Added `Int.pow` (and for other integer types), for bounds-checked
integer exponentiation.
## 111.08.00
- Added `Hashtbl.for_all` and `for_alli`.
- Added `Float.to_padded_compact_string` for converting a floating point
number to a lossy, compact, human-readable representation.
E.g., `1_000_001.00` becomes `"1m "`.
- Tweaked the form of the definition of `Blang.Stable.V1`.
Removed a `type t_` that is not necessary now that we can use `nonrec`
without triggering spurious warnings.
## 111.06.00
- Added inline benchmarks for `Array`
Here are some of the results from the new benchmarks, with some
indexed tests dropped.
| Name | Time/Run | mWd/Run | mjWd/Run |
|-----------------------------------------------------|-------------|---------|-----------|
| [core_array.ml:Alloc] create:0 | 13.65ns | | |
| [core_array.ml:Alloc] create:100 | 99.83ns | 101.00w | |
| [core_array.ml:Alloc] create:255 | 201.32ns | 256.00w | |
| [core_array.ml:Alloc] create:256 | 1_432.43ns | | 257.00w |
| [core_array.ml:Alloc] create:1000 | 5_605.58ns | | 1_001.01w |
| [core_array.ml:Blit.Poly] blit (tuple):10 | 87.10ns | | |
| [core_array.ml:Blit.Poly] blito (tuple):10 | 112.14ns | 2.00w | |
| [core_array.ml:Blit.Poly] blit (int):10 | 85.25ns | | |
| [core_array.ml:Blit.Poly] blito (int):10 | 107.23ns | 2.00w | |
| [core_array.ml:Blit.Poly] blit (float):10 | 84.71ns | | |
| [core_array.ml:Blit.Poly] blito (float):10 | 86.71ns | 2.00w | |
| [core_array.ml:Blit.Int] blit:10 | 19.77ns | | |
| [core_array.ml:Blit.Int] blito:10 | 23.54ns | 2.00w | |
| [core_array.ml:Blit.Float] blit:10 | 19.87ns | | |
| [core_array.ml:Blit.Float] blito:10 | 24.12ns | 2.00w | |
| [core_array.ml:Is empty] Polymorphic '=' | 18.21ns | | |
| [core_array.ml:Is empty] Array.equal | 8.08ns | 6.00w | |
| [core_array.ml:Is empty] phys_equal | 2.98ns | | |
| [core_array.ml:Is empty] Array.is_empty (empty) | 2.98ns | | |
| [core_array.ml:Is empty] Array.is_empty (non-empty) | 3.00ns | | |
- Moved `Thread_safe_queue` to core
- Generalized the type of `Exn.handle_uncaught_and_exit` to `(unit ->
'a) -> 'a`.
In the case where `handle_uncaught_and_exit` succeeds, it can return
the value of the supplied function.
It's type had been:
```ocaml
val handle_uncaught_and_exit : (unit -> never_returns) -> never_returns
```
- Added `Int.round*` functions for rounding to a multiple of another
int.
```ocaml
val round : ?dir:[ `Zero | `Nearest | `Up | `Down ] -> t -> to_multiple_of:t -> t
val round_towards_zero : t -> to_multiple_of:t -> t
val round_down : t -> to_multiple_of:t -> t
val round_up : t -> to_multiple_of:t -> t
val round_nearest : t -> to_multiple_of:t -> t
```
These functions were added to `Int_intf.S`, implemented by `Int`,
`Nativeint`, `Int32`, and `Int64`.
Various int modules were also lightly refactored to make it easier
in the future to implement common operators available for all
modules implementing the int interface via a functor to share the
code.
## 111.03.00
- Added `Error.to_string_hum_deprecated` that is the same as
`Error.to_string_hum` pre 109.61.
- Changed `Error.to_string_hum` so that
`Error.to_string_hum (Error.of_string s) = s`.
This fixed undesirable sexp escaping introduced in 109.61 and
restores the pre-109.61 behavior for the special case of
`Error.of_string`. A consequence of the removal of the custom
`to_string_hum` converter in 109.61 was that:
```ocaml
Error.to_string_hum (Error.of_string s) =
Sexp.to_string_hum (Sexp.Atom s)
```
That introduced sexp escaping of `s`.
- Added to `Doubly_linked` functions for moving an element
within a list.
```ocaml
val move_to_front : 'a t -> 'a Elt.t -> unit
val move_to_back : 'a t -> 'a Elt.t -> unit
val move_after : 'a t -> 'a Elt.t -> anchor:'a Elt.t -> unit
val move_before : 'a t -> 'a Elt.t -> anchor:'a Elt.t -> unit
```
- Improved `Core_map_unit_tests.Unit_tests` to allow arbitrary data
in the map, not just `ints`.
This was done by eta expansion.
## 110.01.00
- Changed `Queue` from a linked to an array-backed implementation.
Renamed the previous implementation to `Linked_queue`.
Renamed `transfer`, which was constant time, as `blit_transfer`,
which is linear time.
Removed `partial_iter`. One can use `with_return`.
Added `singleton`, `filter`, `get`, `set`.
- For `Error` and `Info`, changed `to_string_hum` to use `sexp_of_t`
and `Sexp.to_string_hum`, rather than a custom string format.
- Changed the output format of `Validate.errors` to be a sexp.
- Added `Hashtbl.of_alist_or_error` and `Map.of_alist_or_error`.
- Added `String_id.Make` functor, which includes a module name for
better error messages.
- Exposed `Bucket.size`.
- Changed the default for `Debug.should_print_backtrace` to be `false`
rather than `true`.
Usually the backtraces are noise.
- Removed the tuning of gc parameters built in to Core, so that the
default is now the stock OCaml settings.
Such tuning doesn't belong in Core, but rather done per application.
Also, the Core settings had fallen way out of date, and not kept up
with changes in the OCaml runtime settings. We have one example
(lwt on async) where the Core settings significantly slowed down a
program.
- Added `Exn.raise_without_backtrace`, to raise without building a
backtrace.
`raise_without_backtrace` never builds a backtrace, even when
`Backtrace.am_recording ()`.
- Made `with_return` faster by using `Exn.raise_without_backtrace`.
- Improved `with_return` to detect usage of a `return` after its
creating `with_return` has returned.
## 109.60.00
- Added `Gc.keep_alive`, which ensures its argument is live at the point
of the call.
- Added `Sexp.With_text` module, which keeps a value and the a sexp it
was generated from, preserving the original formatting.
## 109.58.00
- Moved all of the `Gc` module into `Core_kernel`.
Part of the `Gc` module used to be in `Core` because it used
threads. But it doesn't use threads anymore, so can be all in
`Core_kernel`.
- Made `Stable.Map` and `Set` have `with compare`.
- Added `String.rev`.
Closes janestreet/core#16
We will not add `String.rev_inplace`, as we do not want to encourage
mutation of strings.
- Made `Univ_map.Key` equivalent to `Type_equal.Id`.
- Added `Univ.view`, which exposes `Univ.t` as an existential, `type t
= T : 'a Id.t * 'a -> t`.
Exposing the existential makes it possible to, for example, use
`Univ_map.set` to construct a `Univ_map.t`from a list of `Univ.t`s.
This representation is currently the same as the underlying
representation, but to make changes to the underlying representation
easier, it has been put in a module `Univ.View`.
## 109.55.00
- Added `with typerep` to many `Core` types.
- Changed `Flat_queue` to raise if the queue is mutated during
iteration.
- Improved `Map.merge` to run in linear time.
## 109.53.00
- Added `Float.to_string_round_trippable`, which produces a string
that loses no precision but (usually) uses as few digits as
possible.
This can eliminate noise at the end (e.g. `3.14` not
`3.1400000000000001243`).
Benchmarks:
New sexp:
| Name | Time/Run | mWd/Run | Percentage |
|------------------------|----------|---------|------------|
| new Float.sexp_of 3.14 | 463.28ns | 6.00w | 48.88% |
| new Float.sexp_of e | 947.71ns | 12.00w | 100.00% |
Old sexp:
| Name | Time/Run | mWd/Run | Percentage |
|------------------------|----------|---------|------------|
| old Float.sexp_of 3.14 | 841.99ns | 178.00w | 98.03% |
| old Float.sexp_of e | 858.94ns | 178.00w | 100.00% |
Much of the speedup in the 3.14 case comes from the fact that
`format_float "%.15g"` is much faster than `sprintf "%.15g"`. And
of course the above does not capture any of the benefits of dealing
with shorter strings down the road.
Here are some detailed benchmarks of the various bits and pieces of
what's going on here:
| Name | Time/Run | mWd/Run | Percentage |
|-------------------------------------|------------|---------|------------|
| format_float '%.15g' 3.14 | 335.96ns | 2.00w | 32.71% |
| format_float '%.17g' 3.14 | 394.18ns | 4.00w | 38.38% |
| format_float '%.20g' 3.14 | 459.79ns | 4.00w | 44.77% |
| format_float '%.40g' 3.14 | 638.06ns | 7.00w | 62.13% |
| sprintf '%.15g' 3.14 | 723.71ns | 165.00w | 70.47% |
| sprintf '%.17g' 3.14 | 803.44ns | 173.00w | 78.23% |
| sprintf '%.20g' 3.14 | 920.78ns | 176.00w | 89.66% |
| sprintf '%.40g' 3.14 | 990.09ns | 187.00w | 96.41% |
| format_float '%.15g' e | 357.59ns | 4.00w | 34.82% |
| format_float '%.17g' e | 372.16ns | 4.00w | 36.24% |
| format_float '%.20g' e | 434.59ns | 4.00w | 42.32% |
| format_float '%.40g' e | 592.78ns | 7.00w | 57.72% |
| sprintf '%.15g' e | 742.12ns | 173.00w | 72.26% |
| sprintf '%.17g' e | 747.92ns | 173.00w | 72.83% |
| sprintf '%.20g' e | 836.30ns | 176.00w | 81.43% |
| sprintf '%.40g' e | 1_026.96ns | 187.00w | 100.00% |
| valid_float_lexem 12345678901234567 | 76.29ns | 9.00w | 7.43% |
| valid_float_lexem 3.14 | 9.28ns | 5.00w | 0.90% |
| float_of_string 3.14 | 130.19ns | 2.00w | 12.68% |
| float_of_string 1234567890123456.7 | 184.33ns | 2.00w | 17.95% |
| to_string 3.14 | 316.47ns | 7.00w | 30.82% |
| to_string_round_trippable 3.14 | 466.02ns | 9.00w | 45.38% |
| to_string e | 315.41ns | 7.00w | 30.71% |
| to_string_round_trippable e | 949.12ns | 15.00w | 92.42% |
- Replaced `Float.min_positive_value` with `min_positive_normal_value`
and `min_positive_subnormal_value`.
- Added some functions to `Float.O`: `abs`, `of_float`, and
`Robustly_comparable.S`.
- Small improvements to the `Heap` module.
Implemented `Heap.iter` directly rather than in terms of `fold`.
In `heap.ml`, fixed the idiom for using `Container.Make`.
- Added an `Int.O` and other `Int*.O` modules, with arithmetic
operators, infix comparators, and a few useful arithmetic values.
- Added `Int.( ~- )`, for unary negation.
- Added `Pool.unsafe_free`.
- Added `Percent` module.
## 109.52.00
- Added to `Binary_packing` module functions for packing and unpacking
signed 64-bit ints in little- and big-endian.
- Changed the `Comparator` interfaces to no longer have `with bin_io`
or `with sexp`.
The `Comparator` interfaces are now just about having a comparator.
Also, renamed `type comparator` as `type comparator_witness`. And,
removed `Comparator.S_binable`, since one can use:
```ocaml
type t with bin_io
include Comparator.S with type t :` t
```
- Changed `Comparator.Make` to return a module without a type `t`,
like other `*able` functors,
This made it possible to remove the signature constraint when
`Comparator.Make` is applied.
- Made `Comparable.S_binable` be like `Comparable.S` and not have
`type t with sexp`.
The following two functors now fail to type check:
```ocaml
module F1 (M : Comparable.S ) : sig type t with sexp end ` M
module F2 (M : Comparable.S_binable) : sig type t with sexp end ` M
```
whereas previously `F1` was rejected and `F2` was accepted.
- Changed the `Monad.Make` functor to require a `val map` argument.
This was done since we almost always want a specialized `map`, and
we kept making the mistake of not overriding the generic one in the
three places needed.
Added `Monad.map_via_bind`, which one can use to create a standard
`map` function using `bind` and `return`.
- Removed unnecessary signature constraints on the result of applying
`Monad.Make`.
Some time ago, `Monad.Make` changed from returning:
```ocaml
S with type 'a t ` 'a M.t
```
to returning:
```ocaml
S with type 'a t :` 'a M.t
```
so we no longer need to constrain the result of `Monad.Make` at its
uses to remove `t`.
- Changed `String.exists` and `String.for_all` to iterate by
increasing index rather than decreasing.
- Added `with compare` to module `Ref`.
- Made `Flags` be `Comparable`, with the order consistent with bitwise
subset.
- Cleaned up the implementation of `Union_find`.
Improvemed the code in `union_find.ml`:
* Removed an assert false.
* do not reallocate a parent node during compress. This should
result in more stability for sets memory wise.
* Added implementation notes.
* Renamed internal variant constructors.
* Added unit tests.
- Added `Float.O`, a sub-module intended to be used with local opens.
The idea is to be able to write expressions like:
```ocaml
Float.O.((3. + 4.) > 6. / 2.)
```
This idiom is expected to be extended to other modules as well.
- Added a `sexp_of_t` converter to `Type_equal.Id`.
- Replaced `Univ.Constr` with `Type_equal.Id`.
- Added `Debug.eprintf`, analogous to `eprint` and `eprints`.
## 109.47.00
- Added `Error.to_info` and `of_info`.
- Significantly sped up `Float.iround_*` functions.
For `iround_down_exn`, the new version appears to use about 25% of the
CPU time of the old version on non-negative floats. For negative
floats it uses around 60% of the CPU time.
| Name | Time (ns) | % of max |
|-------------------------|-----------|----------|
| old iround_down_exn pos | 15.02 | 95.23 |
| new iround_down_exn pos | 3.75 | 23.75 |
| old iround_down_exn neg | 15.78 | 100.00 |
| new iround_down_exn neg | 9.80 | 62.10 |
- Added `Binary_searchable.Make` functor to core, and used it in `Array` and `Dequeue`.
- Fixed `Bounded_int_table` to match `Invariant.S2`.
- Added to `Pool` support for `10-`, `11-`, and `12-` tuples.
- Added functions to the `Gc` module to get usage information without allocating.
Added these functions, all of type `unit -> int`:
```
minor_collections
major_collections
heap_words
heap_chunks
compactions
top_heap_words
```
They all satisfy:
```ocaml
Gc.f () = (Gc.quick_stat ()).Gc.Stat.f
```
They all avoid the allocation of the stat record, so one can monitor
the garbage collector without perturbing it.
## 109.45.00
- Changed `Blang.bind` to short-circuit `And`, `Or`, and `If`
expressions.
For example if `bind t1 f ` false`, then `bind (and_ t1 t2) `
false`, and will not evaluate `bind t2 f`.
- Renamed `Dequeue.get` as `get_opt`, and `get_exn` as `get`, to be
consistent with other containers which don't use the `_exn` suffix
for subscripting exceptions.
- Removed `Source_code_position.to_sexp_hum`, in favor of
`sexp_of_t_hum`, which works smoothly with `with sexp`.
- Changed `Flat_queue_unit_tests` to run `Flat_queue.invariant`, which
was mistakenly not being used.
## 109.44.00
- Implemented `Dequeue.iter` directly, instead of as a specialization
of `fold`.
Extended random tests to cover `iter`.
## 109.42.00
- Added `Array.is_sorted_strictly` and `List.is_sorted_strictly`.
```ocaml
val is_sorted_strictly : 'a t -> cmp:('a -> 'a -> int) -> bool
```
- Added `Array.find_consecutive_duplicate` and `List.find_consecutive_duplicate`.
```ocaml
val find_consecutive_duplicate : 'a t -> equal:('a -> 'a -> bool) -> ('a * 'a) option
```
- Added `Array.truncate`, which changes (shortens) the length of an array.
```ocaml
val truncate : _ t -> len:int -> unit
```
- Improved the debugging message in `Bounded_int_table.remove` to show the data structure's details.
- Added `Float.iround_lbound` and `iround_ubound`, the bounds for rounding to `int`.
- Added `Hashtbl.similar`, which is like `equal`, but allows the types of the values in the two tables to differ.
- Added `Pool.Pointer.phys_compare`, which is analagous to `phys_equal`, and does not require an argument comparison function.
```ocaml
val phys_compare : 'a t -> 'a t -> int
```
- Exposed that `Pool.Debug`'s output types are the same as its input types.
## 109.41.00
- Added `Map.of_alist_reduce`.
This function is a natural addition alongside `of_alist_fold`. Its
advantage is that it does not require an `init` argument like
`of_alist_fold`. Moreover, it does not involve `option` types, like
`List.reduce` does in order to handle the empty list case.
## 109.39.00
- Implemented `Heap.iter` directly instead of in terms of `fold`.
## 109.37.00
- Added Core.Std.Poly as a short name for
Core.Std.Polymorphic_compare.
- Exposed module Core.Std.Decimal.
## 109.36.00
- Made `Hashtbl.Poly.hash` equal `Caml.Hashtbl.hash`, and changed changed `String.hash` and `Float.hash` to match OCaml's hash function.
Previously, `Core.Poly.hash` had been defined as:
```ocaml
let hash x = hash_param 10 100 x
```
This fell out of sync with OCaml's hash function, and was providing worse hash values.
- Fixed `Obj_array.singleton` to never create a float array.
Also made it clearer that `Obj_array.copy` could never create a float
array.
- Changed `Pool.create` to allow zero-length pools.
Previously, `Pool.create ~capacity:0` had raised, which made it easy
to write code that blows up on edge cases for no apparent reason. For
example, `Heap.copy` was written in a way that copying an empty heap
would blow up (regardless of its capacity), and `Heap.of_array` would
also blow up on an empty array.
- Added `String.split_lines`.
```ocaml
(** [split_lines t] returns the list of lines that comprise [t]. The lines do
not include the trailing ["\n"] or ["\r\n"]. *)
val split_lines : t -> t list
```
## 109.35.00
- Added `with compare` to `List.Assoc.t`.
- Made `Pooled_hashtbl.create` handle non-positive and very large
`size`s in the same way as `Core.Hashtbl`.
- Added `is_error`, `is_ok`, and `does_raise` to `Core.Std`.
```ocaml
let is_error ` Result.is_error
let is_ok ` Result.is_ok
val does_raise : (unit -> _) -> bool
```
- Reimplemented `Heap` and reworked the interface to be more standard.
The new implementation uses pairing heaps and `Pool`.
- Added a module `Pool.Unsafe`, which is like `Pool`, except that
`create` doesn't require an initial value.
This makes it unsafe to access pool pointers after they have been
freed. But it is useful for situations when one isn't able to
create an initial value, e.g. `Core.Heap`.
- Removed `Time.to_localized_string` and `Time.to_string_deprecated`.
These did not include the time-zone offset. Instead, use
`Time.to_string` and `Time.to_string_abs`, which do include the
time-zone offset.
- Exposed that `Int63.t = private int` on 64-bit machines.
This lets the OCaml compiler avoid `caml_modify` when dealing with
it.
- Added `Gc` stat functions that don't allocate: `Gc.minor_words`,
`Gc.major_words`, `Gc.promoted_words`.
Added the following `Gc` functions:
```ocaml
Gc.minor_words : unit -> int
Gc.major_words : unit -> int
Gc.promoted_words : unit -> int
```
such that these functions cause no allocations by themselves. The
assumption being that 63-bit ints should be large enough to express
total allocations for most programs. On 32-bit machines the numbers
may overflow and these functions are not as generally useful.
These functions were added because doing memory allocation debugging
with `Gc.quick_stat` as the primary means of understanding
allocations is difficult: tracking down allocations of the order of
a few hundred words in a hot loop by putting in lots of `quick_stat`
statements becomes too intrusive because of the memory allocations
they cause.
Here are some benchmarks of existing `Gc` functions and the newly
added functions:
```
$ ./test_bench.exe -q 2 -clear name time +alloc +time-err
Estimated testing time 12s (change using -quota SECS).
```
| Name | Time (ns) | 95% ci | Time R^2 | Minor |
|-----------------|-----------|-------------|----------|-------|
| quick_stat | 92.16 | +0.72 -0.64 | 1.00 | 23.00 |
| counters | 33.63 | +0.26 -0.23 | 1.00 | 10.00 |
| allocated_bytes | 37.89 | +0.34 -0.32 | 1.00 | 12.00 |
| minor_words | 4.63 | +0.03 -0.02 | 1.00 | |
| major_words | 4.36 | +0.02 -0.02 | 1.00 | |
| promoted_words | 4.10 | +0.03 -0.02 | 1.00 | |
## 109.34.00
- Added a new module, `Flat_queue`, which is a queue of flat tuples.
This is essentially:
```ocaml
('a1 * .. * 'aN) Queue.t
```
However the queue is implemented as a `Flat_array`, so the tuples are layed out
flat in the array and not allocated.
- Improved `Bounded_int_table.remove`'s error message when it detects an internal inconsistency.
- Added new `Debug` module.
- Changed `Invariant.invariant` to take `_here_` rather than a string.
- Made `Float` satisfy the `Identifiable` interface.
## 109.32.00
- Added `val Option.merge: 'a t -> 'a t -> f:('a -> 'a -> 'a) -> 'a t`.
- Added `val Validate.failf : ('a, unit, string, t) format4 -> 'a`.
- In `Validated.Make_binable`, made it possible to apply the validation function when un-bin-io-ing a value.
- Added `module Pooled_hashtbl` to `module type Hashable`.
This is an alternative implementation to `Core.Hashtbl`. It uses a
standard linked list to resolve hash collisions, and `Pool` to manage
the linked-list nodes.
## 109.31.00
- Renamed some functions in module `Lazy`: dropped the `lazy_` prefix from `is_val`, `from_val`, and `from_fun`.
## 109.30.00
- Added module, `Core.Blit`, which codifies the type, implementation, and unit-testing of blit functions.
- Added `remove_zero_flags` option to `Flags.Make`, to support flags that are zero.
This fixes a problem with `Flags.Make` on CentOS 5 because `O_CLOEXEC` is `0` there.
- Removed `Pool.None`, and folded `Pool.Obj_array` into `Pool` proper.
`Pool.None` had its day, but `Pool.Obj_array` dominates it, so we don't need it any more.
## 109.28.00
- Moved all the contents of the `Zero` library into `Core`, mostly
into `Core_kernel`.
We want to start using `Zero` stuff more in `Core`, which couldn't
be done with `Zero` as a separate library.
Everything moved into `Core_kernel`, except for `Timing_wheel`,
which moved into `Core` proper, due to its dependence on `Time`.
- Renamed `Flat_tuple_array` as `Flat_array`.
- Added `Dequeue.{front,back}_index_exn`
These are more efficient than using `{front,back}_index` and then
`Option.value_exn`.
- Exposed `Core.String.unsafe_{get,set}`.
## 113.24.00
- Switched to ppx.
- Minor adjustments to the command line of profiler_tool.exe:
- Make '-%' an alias for '-percentile'
- Make '-percentile' accept a comma-separated list of numbers
- Add '-median' argument that is equivalent to '-percentile 50'
## 113.00.00
- Changed delta timers and probes so they record the total amount of time/value
change between each start and pause.
## 112.19.00
Initial release
## 112.17.00
Initial release
## 112.06.00
- Solved a problem in which OCaml 4.02 was optimizing away benchmarks,
making them meaningless.
## 112.01.00
- fixed legacy format string
## 109.58.00
- Added support for saving inline benchmark measurements to tabular
files for easy loading into Octave.
## 109.55.00
- Improved `bench.mli`'s generated docs and added some usage examples.
This also partly satisfies issue #3.
- Added the ability to create groups of benchmarks with a common prefix.
For example, the prefix "Perf" below is created in created using
`create_group`:
```ocaml
let command = Bench.make_command [
Bench.Test.create ~name:"Time.now" (fun () ->
ignore (Time.now ()));
...
Bench.Test.create_group ~name:"Perf" [
Bench.Test.create ~name:"TSC.now" ...
```
and the output shows:
```
Estimated testing time 7s (7 benchmarks x 1s). Change using -quota SECS.
┌───────────────────────────────────────────┬──────────┬─────────┬────────────┐
│ Name │ Time/Run │ mWd/Run │ Percentage │
├───────────────────────────────────────────┼──────────┼─────────┼────────────┤
│ Time.now │ 41.38ns │ 2.00w │ 16.72% │
│ Calibrator.calibrate │ 247.42ns │ 32.00w │ 100.00% │
│ Perf/TSC.now │ 7.84ns │ │ 3.17% │
│ Perf/TSC.to_time │ 9.35ns │ 2.00w │ 3.78% │
│ Perf/TSC.to_time (TSC.now ()) │ 13.22ns │ 2.00w │ 5.34% │
│ Perf/TSC.to_nanos_since_epoch │ 10.83ns │ │ 4.38% │
│ Perf/TSC.to_nanos_since_epoch(TSC.now ()) │ 14.86ns │ │ 6.00% │
└───────────────────────────────────────────┴──────────┴─────────┴────────────┘
```
## 109.53.00
- Fixed a bug in `Core_bench` where the linear regression was
sometimes supplied with spurious data.
This showed up when doing custom regressions that allow for a non-zero
y-intercept.
## 109.52.00
- Exposed an extensible form of `make_command` so that
inline-benchmarking and the other tools can add more commandline
flags.
- A significant rewrite of `Core_bench`.
The rewrite provides largely the same functionality as the older
version. The most visible external change is that the API makes it
clear that `Core_bench` performs linear regressions to come up with
its numbers. Further, it allows running user-specified multivariate
regressions in addition to the built in ones.
The underlying code has been cleaned up in many ways, some of which
are aimed at improving the implementation of inline benchmarking
(the `BENCH` syntax, which has not yet been released).
## 109.41.00
- Columns that have a `+` prefix are now always displayed, whereas
columns that don't are displayed only if they have meaningful data.
- Added the ability to reload saved metrics (benchmark test data) so
that bench can re-analyze them.
## 109.39.00
- Added support for additional predictors like minor/major GCs and
compactions, using multi-variable linear regression.
Replaced linear regression with multi-variable linear regression.
The original algorithm estimated the cost of a function `f` by using
a linear regression of the time taken to run `f` vs the number of
runs. The new version adds the ability to include additional
predictors such as minor GCs, compactions etc.
This allows a more fine-grained split-up of the running costs of a
function, distinguishing between the time spent actually running `f`
and the time spent doing minor GCs, major GCs or compactions.
- Added a forking option that allows benchmarks to be run in separate
processes.
This avoids any influence (e.g. polluting the cache, size of live
heap words) they might otherwise have on each other.
## 109.32.00
- Changed `-save` to output compaction information.
- Added indexed tests.
These are benchmarks of the form `int -> unit -> unit`, which can be
profiled for a list of user specified `int`s.
## 109.30.00
- Report compaction stats
## 109.27.00
- Added R^2 error estimation.
Adding this metric should give us a sense of how closely the given
values fit a line. Even dots that are fairly scattered can give
tight confidence intervals. We would like to have to number to have
a sense of how much noise we have.
0.2.1 (2016-06-29)
* add some missing spaces to feed rendering
0.2.0 (2016-03-16)
* Use cow 2.0.0, do not use camlp4 extensions anymore
0.1.0 (2016-02-29)
* Do not use lwt.syntax
* Use magic-mime to set the page headers for assets
* Remove unused disqus support: remove optional `disqus` argument from
`Wiki.html_of_page`
0.0.9 (2014-12-18):
* Compatibility with Cohttp 0.14.x.
0.0.8 (2014-11-02):
* Support Conduit 0.6 APIs.
0.0.7 (2014-07-12):
* Add support for multi-author blog posts (#19 via @pqwy).
0.0.6 (2014-03-26):
* Explicitly depend on `Re_str` instead of a silent dependency on Cohttp.
0.0.5 (2014-03-02):
* Compatibility with Cohttp 0.10.x
0.0.4 (2014-02-02):
* Refactor Foundation module for more modularity.
* Add a `Page` module.
* Add PDF type to `Headers`.
0.0.3 (2014-02-01):
* Add a `Link` module for keeping track of external articles.
* Fix blog template columns to work better on small devices.
* Add a `Feed` module that aggregates together all the other feeds (Blog/Wiki).
* Add a Google Analytics option to `Foundation.body`.
0.0.2 (2013-12-24):
* Factor Wiki support to better support independent sites.
* Add an `Atom_feed` module to drive both the blog and wiki modules.
0.0.1 (2013-12-22):
* Initial public release.
0.4.1 (2016-06-26)
=====
* Revert back to Bytes.t for backward compatibility
with old OCaml compilers.
0.4.0 (2016-06-25)
=====
* Fixed shoutcast v2 metadata update
* Better API
* Switch to Bytes.set
* Implement Https connection for icecast.
0.3.0 (2015-07-29)
=====
* Switch to Bytes API.
* Implemented shoutcast v2 protocol extension
allowing multiple sources connected to the same
shoutcast v2 server.
* Added experimental HTTP capabilities:
- Use any PUT, POST or SOURCE verb
- Use chunked transfer for HTTP 1.1
* Added HTTP Host: header.
0.2.2 (2011-04-10)
=====
* Add second timeout parameters for connection attempts.
* New optional charset parameter for ICY metadata updates.
* Added new functions [string_of_protocol] and
[string_of_connection]
0.2.1 (2011-08-04)
=====
* Implemented a proper connection
timeout mechanism.
0.2.0 (2011-06-26)
=====
* Added an exception parameters
to propagate original exceptions
when raising an internal's exception.
* Fixed exception handling in ICY's answer
parsing.
* Remove buggy timeout option.
0.1.5 (2010-09-06)
=====
* Icy connection was broken
with previous release, fixed..
0.1.4 (2010-09-06)
=====
* Fixed http headers generation.
Before,ocaml-cry was sending
one extra \r\n before starting sending
the stream..
0.1.3 (2010-08-19)
=====
* Use recursive calls to Unix.write
everywhere and make it safer.
0.1.2 (2010-02-08)
=====
* Fix the sending code: older versions resulted in a high load and
in some cases in loss of stream chunks.
* Added manual_update_metadata to update metadata on any source without
being necessarily connected/streaming on it.
0.1.1 (2009-10-26)
=====
* Fixed ICY source connection; send headers only after receiving "OK2".
* Fixed error: Scanf may raise other exceptions, catching any of them now.
0.1.0 (2009-10-12)
=====
* Initial release
2.2.0 (2016-06-30):
* Make `create` zero out the new buffer. The new `create_unsafe`
function can be used if you want to trade safety for speed.
2.1.0 (2016-05-04):
* Add `hexdump_pp` that uses the Format module. This works better with the
Logs library than using `hexdump_to_buffer`, and also makes it easy to
indent the hexdump (#100 via @talex5).
2.0.0 (2016-04-26):
* Remove camlp4 extension as it is no longer maintained (#95).
* Add support for OCaml 4.03 in the PPX extension (#96).
* Minimum supported OCaml version for the library is now 4.02.3.
* Fix parsing of high int32 `@@enum` values.
* Move `Cstruct.check_alignment` into the stubs. Before this patch
we returned the buffer address from C and then calculated using
OCaml's boxed `Int64.t`. This patch reduces minor allocations by
performing the calculation in the C stubs. This makes the function
suitable for use in an assert in a performance sensitive path.
1.9.0 (2016-02-19):
* Add support for a ppx-based extension that uses the extension point
support in OCaml 4.02 and higher to generate Cstruct and Cenum
function definitions. The new syntax is documented in the README file.
1.8.0 (2016-01-05):
* Add support for `-safe-string` in OCaml 4.02 upwards.
The main change is to rename `blit_to_string` to `blit_to_bytes` and
change its type so that it writes to bytes rather than string
(#74 by @yallop).
* Remove strong build-time dependency on `camlp4` in the base library.
The `sexplib` functions were only used in the interface, so replace them
with manually written ones. This also enables compatibility with latest
Core that has switched to ppx.
* Add multi-distro testing via Travis/Docker containers.
1.7.1 (2015-12-15):
* Correct error output for `LE.get_uint16` on invalid bounds (#75)
* Fix `fillv`. If the source didn't fit in the buffer then we
skipped the amount we wanted to copy, not the amount actually copied (#77).
1.7.0 (2015-07-11):
* Add `Cstruct.concat` and `Cstruct.append` (#57, @pqwy)
* Add `js_of_ocaml` stubs (#63, #64, @djs55)
1.6.0 (2015-03-28):
* Add `memset` to set all the bytes of a cstruct value efficiently (#49)
* More useful `Invalid_argument` parameters (#48).
* Fix `to_sexp` to expose only the current view (#44 from David Kaloper).
* Add `compare` and `equal` (#23, #24 and #45 from David Kaloper).
* Add `fillv` to copy over a list of buffers (from Thomas Leonard).
* Shift to centralised Travis scripts.
1.5.0 (2014-11-24):
* Make `camlp4` an optional build-time dependency (#35).
* Remove `ounit` as a dependency in the `opam` file.
* Improve `opam` description file for OPAM 1.2 workflow (#36).
* Refresh Merlin IDE description (#37).
1.4.0 (2014-08-10):
Comprehensive addition of bounds checking to all cstruct operations
(from @pqwy in #33). The major changes are:
* Disallow negative indexing with all cstruct accessors.
* Disallow negative `sub` and `shift` operations.
* Make sure `of_bigarray` cannot create invalid `cstruct` values.
1.3.1 (2014-07-10):
* Also bounds test single-byte operations on views (#31 via @pqwy).
1.3.0 (2014-07-04):
* Add bounds checks for `Cstruct.BE/LE` functions that violate a view.
Previously, only bounds errors on the underlying buffers would raise.
Bug #25, reported by Mindy Preston in mirage/mirage-tcpip#56.
* Add 'Lwt_cstruct.complete' to ensure that `read`/`write` operatiosn
run to completion.
* Add `Sexplib` conversion functions to `Cstruct.t` values (#27 #22).
1.2.0 (2014-06-06):
Add a `sexp` optional decorator to `cenum` to output the values as s-expressions.
This is compatible with the `sexplib` convention. The syntax is;
```
cenum foo64 {
ONE64;
TWO64;
THREE64
} as uint64_t(sexp)
```
And `sexp_of_foo64` and `foo64_of_sexp` functions will also be available.
The representation of the Sexp is the string representation of the enum.
1.1.0 (2014-02-19):
* Improve bounds checks on sub, shift, set_len, add_len.
* Add `to_bigarray` to convert back into a Bigarray slice.
1.0.1 (2013-12-09):
* Fix Cstruct.shift function
1.0.0 (2013-12-05):
* Remove IPv4/IPv6 types (now moved to `ocaml-ipaddr`).
* Improved ocamldoc for the interface.
* More conservative bounds checking in the length manipulation functions.
* Build C stubs with `-Wall`.
0.8.1 (2013-11-06):
* Trailing semicolons are allowed in cstruct field definitions.
* Buffer elements can be any primitive integer, not just `uint8`.
0.8.0 (2013-10-13):
* Improved ocamldoc for BE/LE modules.
* Add Travis-CI test scripts and fix `test.sh` script compilation.
* Support int32/int64 constant values in cenum like `VAL = 0xffffffffl`, useful for 32-bit hosts.
* Check and raise error in case of negative offsets for blits (#4).
* Correctly preserve the sequence after a constant constructor is set during a `cenum` definition.
* Do not repeat the `sizeof_<field>` binding for every get/set field (should be no externally observable change).
* Add `Cstruct.hexdump_to_buffer` to make spooling hexdump output easier.
* Generate `hexdump_foo` and `hexdump_foo_to_buffer` prettyprinting functions for a `cstruct foo`.
0.7.1 (2013-03-06):
* Add `Async_cstruct.Pipe` to map pipes of `Cstruct` buffers to strings or `Bigsubstring`.
0.7.0 (2013-02-25):
* Add zero-copy conversion functions to/from the Core `Bigsubstring`.
* Add an `of_string` function to simplify the construction from OCaml values.
* Add Async interface to interoperate with Jane Street Core code.
0.6.2 (2013-02-08):
* Add experimental `cstruct.obuild` for the `obuild` build tool.
* Use bounds checked version of all functions in the external interface.
* Expose the `Cstruct.debug` to dump internal state of a buffer to a string.
* Add `set_len` and `add_len` to manipulate the total-length field directly.
0.6.1 (2012-12-20):
* Add `sendto`, `read` and `recvfrom` functions to the Lwt subpackage.
0.6.0 (2012-12-20):
* Add fast bigarray<->string functions to replace byte-by-byte copies.
* Add an Lwt sub-package to expose a write call.
* Depend on ocplib-endian for fast low-level parsing of integers.
* Make `Cstruct.t` a record type that doesn't use Bigarray slicing
to provide views onto buffers. This lets views be allocated directly
on the minor heap rather than forcing a major heap allocation. It
does alter the external API, so previous users of cstruct wont work.
0.5.3 (2012-12-16):
* No functional changes, just OASIS packaging fix to right version.
0.5.2 (2012-12-11):
* Remove the separate `xen` and `unix` subdirectories, as the
portable `Bigarray` is now provided by the `xenbigarray` package.
0.5.1 (2012-09-28):
* Add `string_to_<cenum>` function to match the `<cenum>_to_string`,
primarily to help with command-line parsing of enum arguments.
0.5.0 (2012-09-20):
* Add a signature generator for cstruct and cenum to permit their use in `.mli` files.
* Use the more reliable revised syntax camlp4 quotation expander, to avoid
broken AST output from antiquotations.
* Switch the `xen/` version over to using OASIS also.
0.4.0 (2012-09-02):
* Fix META file for use with Xen
0.3 (2012-08-25):
* Initial public release
## ctypes 0.7.0
### Features
* Add support for bytecode-only architectures
https://github.com/ocamllabs/ocaml-ctypes/issues/410
* Add a new `sint` type corresponding to a full-range C integer and update `errno` support to use `sint`
https://github.com/ocamllabs/ocaml-ctypes/issues/411
### Bug fixes
* Handle small integer return types correctly on big-endian platforms
https://github.com/ocamllabs/ocaml-ctypes/issues/404
https://github.com/ocamllabs/ocaml-ctypes/issues/405
* Fix a bug with callbacks that return small types (less than a word)
https://github.com/ocamllabs/ocaml-ctypes/issues/405
Thanks to Stephane Glondu (@glondu) for contributions to this release.
## ctypes 0.6.2
### Bug fixes
* Fix for argument quoting in the Windows build after new cross compilation support
https://github.com/ocamllabs/ocaml-ctypes/pull/399
* Improve Lwt jobs support for functions with many or no arguments
https://github.com/ocamllabs/ocaml-ctypes/pull/400
Thanks to Andreas Hauptmann (@fdopen) for contributing to this release.
## ctypes 0.6.1
### Bug fixes
* Fix constructor qualification in code generated for inverted stubs:
https://github.com/ocamllabs/ocaml-ctypes/pull/397
## ctypes 0.6.0
### Features
* The `Cstubs.FOREIGN` interface has been extended with `returning` and `@->`, and some new types.
See the pull request for details:
https://github.com/ocamllabs/ocaml-ctypes/pull/389
NB: code that generates bindings using `Cstubs` may need to be updated to select `return` and `@->` from the bindings functor argument rather than from the `Ctypes` module. Code that needs to be updated will fail to compile with the new interface. The pull request shows how to update your code, if necessary.
* The `Cstubs` module can now generate asynchronous bindings to C functions using the Lwt jobs framework.
See the pull request for details:
https://github.com/ocamllabs/ocaml-ctypes/pull/391
* The `Cstubs` module now supports optionally returning `errno` alongside the return value of bound C functions.
See the pull request for details:
https://github.com/ocamllabs/ocaml-ctypes/pull/392
* Cross-compilation support is improved: the configuration step no longer runs binaries on the host.
See the pull request for details:
https://github.com/ocamllabs/ocaml-ctypes/pull/383
* The `Unsigned.S` interface has new `of_int64` and `to_int64` functions.
### Compatibility
* The deprecated `*:*` and `+:+` functions have been removed. Use `Ctypes.field` instead.
* OCaml 4.00.* is no longer supported. The earliest supported OCaml release is 4.01.0
Thanks to Spiros Eliopoulos (@seliopou), @orbitz, Leonid Rozenberg (@rleonid) and Peter Zotov (@whitequark) for contributions to this release.
## ctypes 0.5.1
### Bug fixes
* Use a C function, not `Pervasives.ignore`, to keep values alive.
## ctypes 0.5.0
Thanks to Andreas Hauptmann (@fdopen), David Sheets (@dsheets), Etienne Millon (@emillon), Goswin von Brederlow (@mrvn), Leonid Rozenberg (@rleonid), @orbitz, Max Mouratov (@cakeplus), and Peter Zotov (@whitequark) for contributions to this release.
### Features
* Build and install `*.cmt` and `*.cmti` files.
* Expose `time_t` as an unsigned value
* Expose larger interfaces for POSIX types known to be integer types.
* Add support for 1- and 2-byte unsigned integer typedefs.
* Add support for 1-byte and 2-byte integer typedefs.
* Add a `Signed.Int` module.
* Expose more information in the `Uncoercible` exception.
* `allocate_n` now defaults to zeroing its memory.
* Add public root management interface.
NB: the interface is experimental and subject to change.
* Look through views to add fields to structs and unions.
* Support signed arithmetic operations for `ssize_t`.
* Add support for `ptrdiff_t` as a typedef for a signed integer type.
* Support `intptr_t` and `uintptr_t` as typedefs
* Support coercions between object and function pointers.
* Add public `funptr_of_raw_address` function.
* Support `static_funptr` coercions
* Add function pointers to the core type language
(See the `Ctypes_static.static_funptr` type, on which
`Foreign.funptr` and `Foreign.foreign` are now based.)
* Better support for functions returning void with inverted stubs.
* Add support for releasing runtime lock to Cstubs_inverted.
### Bug fixes
* Fix: inconsistent use of `caml_stat_*` functions
* Fix: a memory leak in `ctypes_caml_roots_release`
## ctypes 0.4.2
* Fix a bug involving access to local roots while the runtime lock was not held.
## ctypes 0.4.1
Thanks to Etienne Millon (@emillon) for contributing to this release.
* Fix placement of docstring titles
* Add funptr's optional arguments to funptr_opt
* Fix a typo in libffi detection code
* Synchronize foreign.mli files (documentation)
## ctypes 0.4
Thanks to A. Hauptmann (@fdopen), David Sheets (@dsheets), Maverick Woo (@maverickwoo), Peter Zotov (@whitequark), David Kaloper (@pqwy), Ramkumar Ramachandra (@artagnon), Thomas Braibant (@braibant), Hugo Heuzard (@hhugo) and Edwin Török (@edwintorok) for contributions to this release.
### Major features
* Support for the C99 bool type
* Typedef support
* Enum support
* Support for accessing C globals with foreign_value in generated stubs
* Support for retrieving #define and enum constants from C
* Windows support
There is now support for Windows (32-bit and 64-bit, using MinGW) and automatic building and testing on Windows using [Appveyor][appveyor-builds].
* Support for releasing the runtime lock in C calls
The new `release_runtime_lock` argument to `Foreign.foreign` indicates whether the OCaml runtime lock should be released during the call to the bound C function, allowing other threads to run.
* Support for acquiring the runtime lock in callbacks
There is a new `runtime_lock` argument to `Foreign.funptr`. Setting `runtime_lock` to `true` indicates that the OCaml runtime lock should be acquired during calls from C to OCaml and released during calls through function pointers from OCaml to C.
* Support for passing 'bytes' values directly to C
See the [relevant section of the FAQ][strings_faq].
* Add support for custom printers in views.
* Optionally obtain struct and union layout from C
#### Other changes
* string_opt wraps char *, not void *.
* Remove some poorly-supported POSIX types
* Use nativeint to represent pointers
* Support zero-argument callbacks
* findlib package naming: ctypes.foreign-base ~> ctypes.foreign.base &c.
* Make it possible to print a field name
* Better exception handling when using RTLD_NOLOAD
* RTLD_LOCAL support
* Changed the #include path to $(ocamlfind query ctypes)
* Renamed some internal modules to avoid name clashes
[appveyor-builds]: https://ci.appveyor.com/project/yallop/ocaml-ctypes/branch/master
## ctypes 0.3.4
#### Bug fixes
Thanks to Yakov Zaytsev (@ysz) for contributing to this release.
* fix printing for nullary function stubs
## ctypes 0.3.3
#### Bug fixes
* respect `pbyte_offset` with cstubs
## ctypes 0.3.2
* Add bytes to the META "requires" field
## ctypes 0.3.1
#### New features
* Support for 'bytes'
#### Bug fixes
* Avoid invalidated pointer access
## ctypes 0.3
Thanks to Peter Zotov (@whitequark), David Sheets (@dsheets), Mike McClurg (@mcclurmc) and Anil Madhavapeddy (@avsm) for contributions to this release.
#### Major features
##### Support for passing OCaml strings directly to C
(Patch by Peter Zotov.)
The implications are discussed [in the FAQ][strings_faq].
[strings_faq]: https://github.com/ocamllabs/ocaml-ctypes/wiki/FAQ#strings
##### Support for generating C stubs from names and type declarations.
There are various examples available of packages which use stub support: see the [fts example][fts-example] in the distribution (which uses a custom Makefile), [this fork of async_ssl][async_ssl] (which uses OCamlMakefile), and [the cstubs branch of ocaml-lz4][ocaml-lz4] (which uses oasis and ocamlbuild).
[fts-example]: https://github.com/ocamllabs/ocaml-ctypes/tree/master/examples/fts/stub-generation
[async_ssl]: https://github.com/yallop/async_ssl/tree/stub-generation
[ocaml-lz4]: https://github.com/whitequark/ocaml-lz4/tree/cstubs
##### Support for turning OCaml modules into C libraries.
See the [ocaml-ctypes-inverted-stubs-example][inverted-stubs-example] repository for a sample project which exposes a part of [Xmlm][xmlm]'s API to C.
[inverted-stubs-example]: https://github.com/yallop/ocaml-ctypes-inverted-stubs-example/
[xmlm]: http://erratique.ch/software/xmlm
#### Other changes
* Add a function [`string_from_ptr`][string_from_ptr] for creating a string from an address and length.
* Generate [codes for libffi ABI specifications][libffi_abi].
* Support for passing complex numbers to C using the stub generation backend.
* Add [`raw_address_of_ptr`][raw_address_of_ptr], an inverse of [`ptr_of_raw_address`][ptr_of_raw_address].
* Add a function [`typ_of_bigarray_kind`][typ_of_bigarray_kind] for converting `Bigarray.kind` values to `Ctypes.typ` values.
* Improved [coercion][coercion] support
[typ_of_bigarray_kind]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#VALtyp_of_bigarray_kind
[string_from_ptr]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#VALstring_from_ptr
[raw_address_of_ptr]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#VALraw_address_of_ptr
[ptr_of_raw_address]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#VALptr_of_raw_address
[CArray]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.Array.html
[libffi_abi]: http://ocamllabs.github.io/ocaml-ctypes/Libffi_abi.html
[coercion]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#VALcoerce
#### Backwards incompatibilities
* `Array` has been renamed to [`CArray`][CArray].
## ctypes 0.2.3
#### Bug fixes
* Fix GC-related bug that shows up on OS X.
## ctypes 0.2.2
* Don't install ctypes-foreign cmx files.
## ctypes 0.2.1
* Bump META version
## ctypes 0.2
Thanks to Ivan Gotovchits, Greg Perkins, Daniel Bünzli, Rob Hoes and Anil Madhavapeddy for contributions to this release.
#### Major features
##### Bigarray support.
See [Bigarray types][bigarray-types] and [Bigarray values][bigarray-values] for details.
[bigarray-types]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#4_Bigarraytypes
[bigarray-values]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#4_Bigarrayvalues
##### Give the user control over the lifetime of closures passed to C.
See [the FAQ][faq-lifetime] for details.
[faq-lifetime]: https://github.com/ocamllabs/ocaml-ctypes/wiki/FAQ#function-lifetime
##### Top level printing for C values and types
Loading the new findlib package `ctypes.top` in the toplevel will install custom printers for C types and values.
#### Other changes
* Basic [coercion][coercion] support
* Remove `returning_checking_errno`; pass a flag to [`foreign`][foreign] instead.
* Add an optional argument to [`Foreign.foreign`][foreign] that ignores absent symbols.
(Patch by Daniel Bünzli.)
* More precise tests for whether types are 'passable'
* Compulsory names for structure and union fields (`*:*` and `+:+` are deprecated, but still supported for now.)
* [`UInt32.of_int32`][of_int32], [`UInt32.to_int32`][to_int32], [`UInt64.of_int64`][of_int64], and [`UInt64.to_int64`][to_int64] functions.
* Finalisers for ctypes-allocated memory.
* Add a [`string_opt`][string_opt] view
(Patch by Rob Hoes.)
* Add the ['camlint'][camlint] basic type.
* Complex number support
* Abstract types [now have names][abstract].
[foreign]: http://ocamllabs.github.io/ocaml-ctypes/Foreign.html#VALforeign
[of_int32]: http://ocamllabs.github.io/ocaml-ctypes/Unsigned.Uint32.html#VALof_int32
[to_int32]: http://ocamllabs.github.io/ocaml-ctypes/Unsigned.Uint32.html#VALto_int32
[of_int64]: http://ocamllabs.github.io/ocaml-ctypes/Unsigned.Uint64.html#VALof_int64
[to_int64]: http://ocamllabs.github.io/ocaml-ctypes/Unsigned.Uint64.html#VALto_int64
[string_opt]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#VALstring_opt
[camlint]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#VALcamlint
[abstract]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#VALabstract
[coercion]: http://ocamllabs.github.io/ocaml-ctypes/Ctypes.html#VALcoerce
## ctypes 0.1.1
#### Bug fixes
* Remove hard-coded alloc size
## ctypes 0.1
initial release
1.0.0 (2016-06-19):
* Add support for `-y`, `-j <jobs>` and `-v` flags when used in
conjunction with `opam depext -i`. These are passed through to
the `opam install` command and allow non-interactive, parallel and
verbose output to be activated in the OPAM source builds. This
conveniently allows the most common flags to `opam install` to be
used by an equivalent `opam depext -i` call.
* Fix the debug printing when using `opam depext -d` to flush output
more often and add newlines.
* Add support for Oracle Linux via the `oraclelinux` tag.
* Add support for Raspbian Linux via the `raspbian` tag (#41).
* Add support for OpenSUSE via the `opensuse` tag.
0.9.1 (2016-02-22):
* Do not assume that `bash` is installed for source depexts (#35).
* Add support for Red Hat Enterprise Linux via `rhel` tag (#32).
* Add multi-distro Docker-based Travis file.
0.9.0 (2016-01-04):
* Add support for Alpine Linux.
0.8.1 (2015-08-03):
* Repair OpenBSD depext support
0.8 (2015-07-27):
* Detect and support opam 1.1.0
* Revert unneeded #23
0.7 (2015-07-12):
* Fix `os-release` detection by evaluating it through a shell rather
than parsing the file directly. Repairs CentOS and RHEL detection.
* Fix package detection on Ubuntu and Debian by doing a sequence of
`dpkg` queries instead of a combined one. (#23 via Francois Berenger).
0.6 (2015-06-25):
* Detect already installed packages and skip them
* Better OS detection, use `os-release`
* Added a `--dryrun` option
0.5 (2015-04-19):
* Do not let `yum upgrade` go interactive.
* Print commands before `sudo` so that they can be cut-and-pasted (#4).
* Double-check the installation of multiple RPMs as the exit code
can be unreliable (#9).
* Add support for Gentoo and Arch Linux (#11).
* Add Travis CI scripts.
0.4 (2015-03-22):
* Add `-u` or `--update` flag to trigger an OS package set update
before performing external dependency installation. This is useful
on Debian or Ubuntu where package installation may fail if the
sets are not up-to-date with respect to latest security updates.
* Fix installation of source packages.
* Detect the CentOS distribution correctly.
* Fix external command detection to not go through a subshell.
0.3 (2015-01-27):
* Add OCaml 3.12.1 compatibility.
* Add `-i` flag to perform OPAM package installation after the
external OS dependencies are installed.
* Fixes for MacPorts and CentOS support.
0.2 (2015-01-21):
* Initial public release.
== 0.7.1
* Compatibility with OCaml 4.03
== 0.7
* Compatibility with ocaml-4.02 (Peter Zotoz, Hugo Heuzard)
* Fix toplevel usage (Vincent Bernardoff)
* Class: add equality for sets (Jeremy Yallop)
== 0.6
* Added a 'Default' class (Hugo Heuzard)
* Allow private variant in the 'Functor' class (Pierre Chambart)
* Switch build system to oasis and improved META
== 0.5-ocsigen
* Experimental minimalistic support of GADT
* Allows to register predefined instances
== 0.4-ocsigen
* Compatibility with typeconv >= 108.07.00
== 0.3-ocsigen
* Use "lazy first-order module" instead of "recursive module" to be
compatible with {{{js_of_ocaml}}}.
* Be less restrictive with mutually recursive type definition
* Split runtime into deriving.cma and deriving_num.cma
* Class:
** Typeable: use OCaml's lazy for {{{type_rep}}}
** Show: added separators to {{{map}}} and {{{set}}}
** Show, Dump and Eq: Allow polymorphic type fields.
== 0.2-ocsigen
* Add compatibility with ocamlfind
* Add a type-conv compatibility mode
* Simplify the definition of new class
* Syntax: Add {{{Class<typ>}}} in module_expr.
* Small bug fixes in class:
** Show: Added parentheses around tuples.
** Pickle: remove warning in generated code.
== 0.1.1
* Renamed serialisation classes:
** Pickle -> Dump
** Shelve -> Pickle
* Made Dump and Pickle interface compatible with each other and more
compatible with Marshal.
* Bugfix in the tag hash function on 64-bit platforms.
* Fixed a bug with a functor application quotation that used revised
syntax.
== 0.1
* Initial release
### 0.2.1 (2016-06-16)
* Switch to topkg
* Support Irmin `0.10`
* Add Dockerfiles
### 0.2.0 (2015-06-11)
* Updates to support Irmin version `0.9.5`
### 0.1.0 (2015-02-15)
* Initial release
dose3 (5.0) UNRELEASED; urgency=low
* finally implement keep_package/version/feature properly. The globalid
index that was used to optionally encode the global constraints is
now disappeared. This simplify the interface of the solver.
* massive refactoring. Change of API . All functions in Depsolver*
accept a new paramenter "global_constraints" that is a vpkgformula
enconding all packages that must be co-installed by by default with
each request. This is used to properly encode debian essential packages
without abusing 'Keep_package as before.
* Depsolver_int.{solve,init_solver_unit,init_solver_cache} have a new optional
argument 'explain'. When false, reduce the memory footprint.
* Depsolver.{check_request,check_request_using} accept a new parameter dummy
that can be used to pass arbitrary contraints as a cudf.package that is going
to be coinstalled as part of the request and filtered out in the result.
* improvements to the documentation and test units
* add --compare to ceve when used with pef://
* improvements to distcheck --lowmem
* StdOptions.lastest now returns an integer to consider only the last n versions
of each package
* API change : CudfAdd.latest
* API change : CudfAdd.inttovar -> CudfAdd.inttopkg
* API change : add parameter to check_request and check_request_using
* apt-cudf : package up or downgrades are expressed in a single
"Install" request and that these do not show up as a "Remove" request anymore.
* StdOptions.DistribOptions.add_options are now different for each input ( ex.
StdOptions.DistribOptions.add_debian_options )uu
* Debian.Printer.pp_* functions are now methods of the Debian.package class
-- Pietro Abate <pietro.abate@inria.fr> Thur, 06 Jun 2016 13:13:06 +0200
dose3 (4.3) UNRELEASED; urgency=low
* Fix exitcode problem with apt-cudf
* Add new comparison functions to parse npm like versions
* Make ocamlgraph a hard dependency of dose.
* Switch to ocamlgraph based explanation graphs by default
* add {foregin,native}-architecture field to distcheck output
* add essential cudf property only if really needed. Assuming default otherwise.
* bump output-version to 1.2
* add --lowmem option to distcheck (slow, but consumes less memory)
* remove build-essential field from buildcheck
* add --deb-drop-b-d-indep and --deb-profiles to ceve
* API Change. Debian.Debutil.debvpkg is replaced by Pef.Pefcudf.pefvpkg
* API Change. Depsolver_int.solve has a addition argument "explain"
* add new option to ditcheck and ceve --compare to specify a comparison
function to be used with the pef format.
-- Pietro Abate <pietro.abate@inria.fr> Thur, 21 Apr 2016 13:13:06 +0200
dose3 (4.2) UNRELEASED; urgency=low
* Fix META file and other compilation problems (notably on 32 bits architectures)
* Add back the "Enhances" field in the debian printer
* the new yaml format also drops the architecture suffix in the package and
unsat-dependency fields
* Add new function Depsolver.is_consistent and Debian.Debcudf.get_real_name
* Expose Diagnostic.request and Diagnostic.result
* Update the yaml output of outdated (no more cudf-related cruft in package names)
* bump yaml output-version to 1.1
-- Pietro Abate <pietro.abate@pps.univ-paris-diderot.fr> Thur, 14 Jan 2016 13:13:06 +0200
dose3 (4.1) UNRELEASED; urgency=low
* New optimization criteria parser. apt-cudf now accepts only optimization criterias in
misc2012 format.
* the extended MISC 2012 syntax extends the count criteria allowing the
following additional forms:
count(selector,field:=/plain/)
count(selector,field:~/regex/)
* Update Documentation
* Modules are renamed (compiled with -pack) :
Versioning.Debian
Versioning.Semver
* API change : Debian.Debcudf.get_real_version tables now returns
a tuple (name, version) . Name is the original Debian name without
encoding ( "src:" , ":$arch" , "--virtual-" ).
* Implement versioned provides
* strict dependency ocamlgraph >= 1.8.6
* strict dependency extlib >= 1.7.0
* new cudf property for deb/edsp types
native is 1 if the pkg architecture is equal to the native architecture,
0 otherwise. This can be used to maximise the number of packages
belonging to the native architecture ( +sum(solution,active) )
* better parsing and error reporting
* More Module refactoring (algo/deb/pef/opam)
-- Pietro Abate <pietro.abate@pps.univ-paris-diderot.fr> Tue, 01 Dec 2015 13:13:06 +0200
dose3 (4.0) UNRELEASED; urgency=low
* Minor Bugs
* Add opam module
* Major refactoring of parsing functions Pef/Deb/Opam
-- Pietro Abate <pietro.abate@pps.univ-paris-diderot.fr> Mon, 29 June 2015 13:13:06 +0200
dose3 (4.0-rc3) UNRELEASED; urgency=low
* Minor Bugs
-- Pietro Abate <pietro.abate@pps.univ-paris-diderot.fr> Mon, 29 June 2015 13:13:06 +0200
dose3 (4.0-rc2) UNRELEASED; urgency=low
* Add new module Versioning to group all the comparison functions
* Add a new comparison schema (http://semver.org/)
* Add new two new ceve output formats: deb and debsrc
-- Pietro Abate <pietro.abate@pps.univ-paris-diderot.fr> Fri, 26 June 2015 13:13:06 +0200
dose3 (4.0-rc1) UNRELEASED; urgency=low
* Remove dependency to camlp4. Add build dependency to cppo
* Add option --dot to create explanation graphs in dot format
* add 'out-version' field to yaml format
* Debian Essential packages are now kept into account while
generating strong dependencies. You must pass
--deb-ignore-essential to restore the previous behaviour
* Add --latest to challenged
* Add new format PEF : package export format
* Drop eclipse format (superceded by PEF)
* Drop cv format (superceded by PEF)
* Ceve can read source packages
* Add grep-able one line explanations (success/failure) to distcheck
* Switch architecture and name around in cudf representation for debian packages
* Add new function to detect unsused dependencies/conflicts
* API change : Diagnostic.request, Depsolver.request, StdLoaders.load_list,
Debcudf.init_tables,
* add debsrc input format to ceve
-- Pietro Abate <pietro.abate@pps.univ-paris-diderot.fr> Wed, 24 June 2015 13:13:06 +0200
dose3 (3.3) UNRELEASED; urgency=low
* Clearly forgot to update this file ...
dose3 (3.2.1) UNRELEASED; urgency=low
* Support for debian multi-arch format
* Add deb-coinstall to check the coinstallation of multiple debian packages
* Numerous bug fixes to buildcheck
* Drop PCRE in favour of Ocaml Re library
* New framework to run unit-tests
* Support for EDSP 0.5 (backward compatibility with EDSP 0.4)
* bump dependency to cudf 0.7
* bump dependency to ocamlgraph 1.8.5
-- Pietro Abate <pietro.abate@pps.jussieu.fr> Wed, 14 May 2014 13:13:06 +0200
dose3 (3.1.4) UNRELEASED; urgency=low
* Add new option to deb-buildcheck (--defaultedMAforeign)
* Add Graphml printer to Defaultgraphs
* Apt-cudf: Always print packages that were specified in the request
* Add external solver API (CudfSolver)
* Consider build-indep by default when loading dependencies from debian
source packages
-- Pietro Abate <pietro.abate@pps.jussieu.fr> Fri, 9 Nov 2012 09:00:00 +0200
dose3 (3.1) UNRELEASED; urgency=low
* Speed up compilation
* Add multi-arch support and cross-compilation options to deb-buildcheck
* Add --trim to ceve
* Add multi-arch unit-tests
* Fix Hold and Essential handling in edsp
* Add --latest to deb-buildcheck
* Add --checkonly to deb-buildcheck
-- Pietro Abate <pietro.abate@pps.jussieu.fr> Thu, 4 Oct 2012 09:00:00 +0200
dose3 (3.0.2-hotfix) UNRELEASED; urgency=low
* Fix debian bug #685171 and regression
* Fix candidate selection problem in apt-cudf
* Update manpage for deb-buildcheck
-- Pietro Abate <pietro.abate@pps.jussieu.fr> Thu, 4 Oct 2012 09:00:00 +0200
dose3 (3.0.2) UNRELEASED; urgency=low
* Fix performance regression introduced in version 3.0
-- Pietro Abate <pietro.abate@pps.jussieu.fr> Wed, 25 Jun 2012 09:00:00 +0200
dose3 (3.0) UNRELEASED; urgency=low
* Fix the encoding of debian essential packages
* Fix META file
* Add more tests for all shipped applications
-- Pietro Abate <pietro.abate@pps.jussieu.fr> Wed, 13 Jun 2012 16:55:51 +0200
dose3 (2.9.16) UNRELEASED; urgency=low
* Add CHANGES and CREDITS files
* add distributions specific options (ex : --deb-<option>)
* Change the behaviour of the edos solver to honor "Keep package" annotations
* Change the default behaviour of distcheck to always consider debian essential
packages. The old behaviour can be restored using --deb-ignore-essential
* Add --minimal to distcheck to restrict the installation set of a package $p$
only to packages in the dependency cone of $p$. By default all packages marked
as "Keep" are part of installation set.
* Add Debian multi-arch translation to cudf.
* Add debian specific options to filter dependencies and packages based on the
allowed architectures (APT::Architecture , APT::Architectures::)
* add opencsw format support.
* Numerous bug fixes and performance improvements.
* fix apt-cudf to deal with multi-arch enabled machines
* Graduate strong-deps and dominators
* add conf file for apt-cudf
-- Pietro Abate <pietro.abate@pps.jussieu.fr> Thu, 12 Apr 2012 10:05:18 +0200
v0.1.2 2016-06-29
--------------------------
- oasis changed to _tags + topkg
- prefix added to internal moduled
- few bugfixed in reader
- comments support added
===== 5.0 (2016-01-28) =====
* Add Eliom_shared and server-side Eliom_content.{Html5,Svg}.R modules
* Add PPX syntax extension
* Clean-up form APIs, now available under Eliom_content.Html5.{D,F}.Form
* Patches to significantly reduce the size of request data
* Compatibility with TyXML 3.6, Js_of_ocaml 2.7, and reactiveData 0.2
* Various bugfixes and enhancements
===== 4.2 (2015-07-21) =====
* Add Manip.children, to get the html children of an element.
* Simplify Html5 and Svg signatures using tyxml's signature functors.
* Various logging improvements, in particular in Eliom_client.
* Fix eliomdep's exit code when calling option "-sort".
* Fix #168: call_ocaml_service always sends boolean true.
* Makes server function return types covariant.
* Restore compatibility with ocsigenserver 2.6 and lwt 2.4.7.
* Various bugfixes and wiki updates.
===== 4.1 (2014-10-01) =====
* Compatibility with js_of_ocaml-2.5 and tyxml-3.3.0
* Improvements:
** Simplify typing of services
** Use GADT to encode service parameters (Eliom_parameter)
Eliom need OCaml 4.00 at least.
** bugfixes for service parameters
** Various bugfixes and enhancement
===== 4.0 (2014-05) =====
* Main new features:
** Reactive DOM elements (thanks to a contribution by besport.com)
** PUT and DELETE services for RESTful Eliom Applications
(Contribution by Domoco)
** EXPERIMENTAL: Mobile apps with Eliom. By making it possible to start
the application from client-side.
** Documentation improvements
* Improvements:
** Improvements in typing of services (Contribution by Jacques-Pascal Deplaix)
** Filtering data from Eliom buses
** "caml" in value or type names now replaced by "OCaml" everywhere
** New module {{{Eliom_registration.File_ct}}} to make easier to send files with
their content type
** Now possible to define services in shared sections
** Adding function {{{Eliom_client.change_url}}} to change the URL without doing a request
** Adding function {{{Eliom_service.attach_coservice'}}} to attach a non-attached coservice to an URL
** Improving comet configurations: now possible to stay idle instead of being completely inactive
** Now using defaultprotocol option (from ocsigenserver) to compute URLs
** The default expiration date for cookies on client side is now 10 years
** Now possible to send files in {{{Eliom_client.call_ocaml_service}}}
** Various additions and bugfixes in {{{Manip}}}, {{{Eliom_request_info}}},
{{{Eliom_content.html5}}} (events) (contributions by besport.com)
** eliom-destillery renamed into eliom-distillery
** Templates for eliom-distillery
** New programs: eliomdoc and eliompp
** Ocamlbuild package
** Various bugfixes
And many other things (see git commits)
===== 3.0.0 (2012-12-10) =====
* Language
** Generalized client values in server code
** Injections into client sections
* Tools
** Added eliom-destillery for generating project scaffolds
** Support Eliom interface files (.eliomi) in eliomc, eliomdep
** eliomdep: Generate dependencies between eliom-modules
** eliomc: infer only with option -infer, drop option -noinfer
** eliomc: Basic support for -i on eliom-files
** eliom{c,dep,opt},js_of_eliom: -dump to output the intermediate code
** eliomc,js_of_eliom: always open Eliom_pervasives in eliom files
* API
** Eliom_pervasives.server_function to easily access the from the client
** Get current state of a scope
** Module to access values of Eliom references in external states (Eliom_state.Ext)
** Scope names are now named scope hierarchies
** Iterate the scope hierarchy (group > session > client > request)
** Adding Eliom_parameter.(type_checker, neopt)
** Add functions to insert html5 in atom feeds
** Eliom_tools.{F,D}.html to ease creation of head-tag
** Eliom_tools.wrap_handler as an easy alernative to Eliom_registration.Customize
** Test for initial request of a client on the server
* Changed server behaviour
** Eliom_state.discard_everything now also discards request state
** Don't send nodes as data when they are part of the document
* Changed client behaviour
** Show progress cursor during navigation with change_page
** Improved error messages
** Fail on the client when a [server_function] or call_caml_service fails on the server
* Bugfixes
** Allow % for injections directly after parentheses
* Support dropped for
** Xhtml
** OCamlDuce
** Eliom_compatibility_2_1
* A myriade of bugfixes
===== 2.2.2 (2012-06-11) =====
* Fix (re-disable) generation of API doc for ocamlduce modules
===== 2.2.1 (2012-06-07) =====
Addendum to the great renaming
* Eliom_cookies -> Eliom_cookie
* Eliom_comet.Channels -> Eliom_comet.Channel
===== 2.2 (2012-06-02) =====
The great renaming: Make Eliom's API more coherent
* Dropped Eliom_pervasives, split into
** Eliom_lib (extension of stdlib)
** Eliom_content (content creation)
* Moved all Html5,Xhtml content function to Eliom_content.{Html5,Xhtml}
** {HTML5,SVG,XHTML}.M -> Eliom_content.{Html5,Svg,Xhtml}.F
** {HTML5,SVG,XHTML}.DOM -> Eliom_content.{Html5,Svg,Xhtml}.D
** Eliom_output.{Html5,Xhtml}: form functions to Eliom_content.{Html5,Xhtml}
** Eliom_client.Html5 -> Eliom_content.Html5.To_dom
** Eliom_dom -> Eliom_content.Html5.Manip
** HTML5.of_element -> Eliom_content.Html5.Of_dom.of_element
* Removed default implementations in Eliom_content.{Html5,Svg,Xhtml} (was inclusion of DOM)
* Rename Eliom_output to Eliom_registration
* Rename Eliom_registration.Eliom_appl to Eliom_registration.App
* Conform naming conventions for modules (singular, lower-case)
** XML -> Xml
** SVG -> Svg
** XML_types -> Xml_types
** XHTML_types -> Xhtml_types
** HTML5_types -> Html5_types
** Eliom_services -> Eliom_service
** Eliom_parameters -> Eliom_parameter
** Eliom_references -> Eliom_reference
** Eliom_extensions -> Eliom_extension
* Approximating compatibility module for Eliom 2.1: Eliom_compatibility_2_1
===== 2.1.1 (2012-03-20) =====
* Server: Add Eliom references of scope site
* Server: Add an non-Lwt interface to volatile Eliom references
* Client: Add an option to restrict usage of XHR.
* Bugfixes:
** Client: More robust and portable history handling
** Client: More robust CSS preloading (change_page)
** Client: Better compatibility with Opera
===== 2.1.0 (2012-02-24) =====
* Page loading rewriten.
** We do not traverse the HTML tree anymore for retrieving links
and putting events handlers, it use querySelectorAll instead.
(with a fallback for older browsers)
*** We do not send a sparse tree along the page anymore.
*** It is faster and more resilient to ugly browser plugins
** Add css loading optimisations: It fetch the css included
using @include with XHR before changing page and construct only
one concatenated css. It avoids page blinking when the css change
and is faster (browsers tend to render the page once per css).
** Unwrapping hand rewritten in js.
** And a lot of other optimisations.
* Rework of unique nodes:
** Introduce new lightweight 'unique' node of scope request,
a.k.a. DOM nodes: use it through HTML5.DOM.{div,...} or its alias
HTML5.{div,...}.
** To create unique node of scope application, the function
'HTML5.M.unique ?copy' has been renamed 'HTML5.create_global_elt
?id'
** Abstract id for application node are created with
"HTML.new_global_elt_id"
** Node representation now differs between the client and the
server. They are unwrapped on the client to simplify the XML
representation: "unique" node that have already a "Javascript DOM
representation" only contains a reference to the DOM
representation.
* Server API Changes:
** Add Eliom_state.get_*_session_group_size to know the number of
session in a session group
** Parameters of type any can't be suffixes (semantic problem)
** Add Eliom_comet.wait_timeout to notify when a client isn't active
** Allow services to setup "Cache-policy: max-age" with Text, CssText and
Files modules.
** Eliom_state.discard and discard_data now accept scope request.
* Client API Changes:
** add an Eliom_dom module provinding imperative function on unique HTML5.elt.
(for instance {{{appendChild: ?before:'a elt -> 'b elt -> 'c elt -> unit}}}).
** HTML5.M.a_on{click,...} functions directly expect a
function as parameter (XML.event_handler_of_function isn't
required anymore).
** Eliom_comet: configuration option for time until timeout after the focus is lost
** Handling wrapping of int32 type.
** Onload event handlers on HTML elements are executed when they are converted to
DOM (using Eliom_client.of_ functions). This allows them to be added to nodes not
sent in the page.
** Calls to {{{Eliom_services.onload}}} are taken into account for services sending
caml values. The handlers are executed when the call to
{{{Eliom_client.caml_call_service}}} terminates.
* Eliom syntax:
** Event handlers can now access the current event using the _ev variable
inside {{ ... }} typed according to the attribute.
** Allow modules to be used inside client expr {{ ... }} and client_expr
{{ ... }} to be used inside modules
** Add -ppopt option to eliomc
* And a lot of bugfixes.
===== 2.0.2 (2001-11-30) =====
* Compatibility with js_of_ocaml-1.0.8 and tyxml-2.0.1
* API Changes:
** Eliom_output.Redirection: use 302 as default and introduce
abstract nome for all the 30x HTTP code
** Eliom_output.Customize: remove unrequired Functor parameters.
* Delayed URl computation: this allows relative links to be created
outside of service handler.
* Client: do not ignore "onload" events attached on Dom elements
other than window.
* Bugfixes:
** Client: do not execute change_page_uri when the middle button or
any modifier key is pressed.
** Client: update correctly the location when changing page with
forms.
** Server: displaying better dynlink error messages.
** Syntax extension: avoid infinite loop while parsing first-order
module expression
** Eliom_parameters: fixing wrong parameter names for list of list
** Eliom_parameters: fixing bug causing stack overflow when lists
parameter names were wrong
** Fixing bug with non-localized parameters and service not keeping
non-attached params
** Eliom_comet: stateless channels can be registered multiple times
(close #220)
===== 2.0.1 (2011-09-28) =====
* Bugfixes in eliom appl.:
** Preload css when changing page to avoid a disgraceful "flash" effect
** Use <base href=""> to preserve links in unique node when changing page
** Fragment in URL aren't ignored anymore
** Proper exception handling in eliomc, js_of_eliom, ...
** Display a correct URL after submitting a <form>
===== 2.0 (2011-09-20) =====
* Bugfixes:
** Correct handling of HTTP redirections hidden by XHR
** Fix links from http to https on client application
===== 2.0-rc2 (2011-09-06) =====
* Feature:
** api history: when the api history is available, application URLs are more
readable (no more {{{#!}}})
* Bugfixes:
** fix browser compatibility: it should work with Firefox (>= 3.0), Chrome
(all recent version we tested), Safari 5, Opera (tested 11.51), Internet
explorer (9, ie 8 almost work)
** in forms declared outside of the sp's scope, hrefs were incorrect:
url calculation is now done for each request
** the function {{{Eliom_client.caml_call_service}}} was broken with some kind
of services
** application cookies are now always sent
** fix incorrect sharing of type variables in the syntax extension (thanks to
William Le Ferrand)
** 404 and 403 errors are not dropped by applications anymore (This fix is
partial: when the page content is application content, this still does not
work when an exception handler returns something else)
** Fix problems with url generation for non-attached coservices inside an
application
** tail recursive marshalling and demarshalling: no more limit on the depth of
data sent along the page
** Fix problems with redirection and action with `NoReload exiting the application
** Handle correctly 204 code in application (do nothing with change page, fail
with caml_call_service)
** Fix escape character '>': problem with strings containing "]]>"
===== 2.0-rc1 (2011-07-15) =====
* Eliom_client.change_page type now correctly forbid to call it on
non-eliom application services
* Stateless implementation of comet channels
* Scope and state names parameters of functions are now fused in one
parameter (called scope)
* Change the type of 'send' functions: forbid use of incompatible output
with Eliom_output.Any together.
* Change the format of page loaded by an application: all pages are sent
in HTML5 format. (first answers were in HTML5 subsequent were marshalled
caml tree)
* XML representation is now shared by client and server: conversion to
Dom nodes is made by Eliom_client.Html5.of_ functions
* Remove the need for an application container: application pages are
now classical HTML5 pages.
* Add Eliom_pervasives.{HTML5/XML/SVG}.unique function to declare XML node
handled "by reference"
* Fix ocamldoc generation with Eliom_output
* Eliom_appl are now stateless if no data is stored in session
* Allow dynamic wrapping with values to be sent to client with
caml services and comet channel
* Add Eliom_react.S: server to client React signals
* Add lazy site values: lazy evaluated one time per site
* Option to compile without preemptive threads
* And lots of simplifications and bug fixes
===== 1.91 (2011-04-08) =====
* Split the ocsigen package in three : tyxml, ocsigenserver and eliom
* Rename into eliom
* It's now possible to set a //priority// on services
registered on the same path, to choose in which order Eliom will try them.
* New implementation of internal application forms with formData
when available
* New build system for eliom application
* No type restriction in value sent from the server to the client
===== 1.90 =====
* New module {{{Eliom_client}}}
for client/server Eliom programs using js_of_ocaml.
* Eliom client: calling a service from client side code.
* Eliom: Services taking Caml values as parameters.
* Eliom: services sending Caml values.
* Eliom: new implementation of forms and links to be compatible with
client side programs.
* Eliom: sp parameter has been removed (now using Lwt's thread storage)
* Eliom: {{{Eliom_predefmod}}} renamed {{{Eliom_output}}}
* Eliom: New module {{{Eliom_output.Customize}}} to create your
own register functions from another registration module
* Eliom: Module {{{Eliom_sessions}}} replaced by {{{Eliom_state}}},
{{{Eliom_request_info}}} and {{{Eliom_config}}}.
* Eliom: new implementation of user cookies.
* Eliom: Client process cookies.
Like usual browser cookies but for one client side process.
* Eliom: Client process server side state data.
Like session data but for one client side process.
* Eliom: Client process session services.
* Eliom: Session group data.
Like session data but for all sessions in a session group.
* Eliom: Session group services.
* Eliom: session replaced by a more general concept of "server side state".
States have a scope: client process, session or group of sessions.
* Eliom: session tables and request cache now deprecated,
replaced by //Eliom references//
* Eliom client: Possible to call another service without stopping the
client side program, with bookmark support and back button support.
* New extension Comet to allow server -> client communication.
* Eliom: client/server communication channels.
* Eliom: client/server reactive programming using React.
* Eliom client: syntax extension for separating client and server code.
* Eliom: New module Eliom_output.Eliom_appl for registering pages
that belong to the same Eliom application.
* Eliom client: syntax extension and wrapping/unwrapping mechanism to
access server side values in client side code.
* Eliom client: Relinking the DOM on client side after loading a (portion of)
page. This allows nodes created on server side to be directly used in client
side code.
* Eliom client: XHR redirections for Eliom applications.
* Eliom: safe unmarshaling of caml values sent by client side programs
* Xhtml: Xhtml5 support
* Atom module and Pubsubhubbub
* OpenID support
* SVG module
* Documentation: New tutorial
* Documentation: New Eliom manual
* //and many other things ...//
===== 1.3.4 =====
* Eliom: Now supporting list of lists in service parameters
===== 1.3.3 (2010-06-13) =====
* Eliom: Fix some typos in Eliom's tutorial stylesheet
* Server: Fix usage of {{{accept_n}}} to avoid file descriptor leakage
* XHTML: Adding missing elements and attributes in XHTML.M
* Cleaning Ocsigen_cache
* Eliom: Fixing actions with uploads
===== 1.3.2 (2010-04-30) =====
* Add dummy findlib packages ocsigen.xhtml*, that depend on
ocsigen_xhtml*, for compatibility with previous versions. These
packages might be removed in a future (major) release.
* Port to Lwt 2.1.0
===== 1.3.1 (2010-04-23) =====
* Split out ocsigen_xhtml findlib package
* Configuration file: when no protocol is specified in {{{<port>}}}, listen
on IPv6 (if possible) and IPv4 (always)
===== 1.3.0 (2010-01-22) =====
* Server: Each request now has a polymorphic data table
(called //request cache//), where you can
store the data you want to keep during the whole page generation.
* Eliom: actions now return {{{()}}}.
Use the request cache to send information to fallbacks.
* Eliom: CSRF-safe coservices
* Eliom: the number of sessions without group by IP address is now limited
* Eliom: efficient implementation of limitation of sessions by groups
(or now IP) for large limits
* Eliom: the number of anonymous coservices by session is now limited
* Eliom: the number of anonymous coservices without session
by IP address is now limited
* Eliom: now possible to unregister services
* Eliom: New (very) experimental module {{{Eliom_obrowser}}}
to use Eliom with Obrowser
* Eliom: Now possible to have constant parts in suffixes to allow
URLS like {{{/param1/something/param2}}}
* Eliom: services with optional suffixes
* Eliom: form towards a service with suffix: it is now possible to choose
whether you want the redirection towards the suffix form or not
* Eliom: lists and sets in suffixes
* Eliom: Now possible to create services sending custom HTTP header values
or customizing the content-type
* Eliom: New notion: "Non localized parameters". Can be sent to any service.
* Eliom: changing the order of parameters for user type form widgets
* Eliom: changing the order of parameters for user type form widgets
* Eliom: Eliom_tools.menu and hierarchical_menu now compare the URL strings
(was: compare the service)
* Eliom: textarea now take a string (was pcdata)
* Eliom: The type of the iterator for lists in parameters has changed
* Eliom: New options in configuration file to set session timeouts
* Server: now possible to give the config file name to reload server command
* Server: now possible to do a "graceful shutdown" of the server
using the "shutdown" server command
* Server: now possible to add custom commands for the command pipe
* Server: EXPERIMENTAL now possible to observe HTTP headers before sending
the result
* Xhtmlpp: the parsing now fails if a quotation for an Xhtml element
contains superfluous elements. (This can cause the parsing of previously
incorrect code to fail)
* Staticmod/Eliom: attempting to access a file whose name contains a NULL
character will result in a 403.
* Server: HTTP headers containing newlines are now properly escaped.
* Server: correct missing xmlns in Xhtml DTD
* Server: now send last-modified and etag headers when returning a 403
* Server: Now accepting several requests at a time
(as explained in "Accept()able strategies" by Tim Brecht & all)
* Rewritemod: more rewriting possibilities (still very basic)
* Eliom menus are now more robust when finding which item is active
* Fixed handling of incorrectly-sized multipart requests. Thanks to
Mauricio Fernandez for noticing the bug
* Upload directory and maximum file size can now be configured on a
per-site basis
* Renamed the field of Ocsigen_http_frame.t
* Javascript events support in Xhtml.M ; Thanks to john @ 5070.info
for the patch
===== 1.2.2 (2009-10-17) =====
* Add react and lwt.unix to the list of built-in findlib packages
===== 1.2.1 (2009-09-26) =====
* Lwt 2.0 compatibility:
** Adapt to Lwt.t/Lwt.u splitting
** fix Makefile to deal with lwt.unix findlib package
* Fix ocsipersist-dbm Makefile
* Fix for pcre-ocaml 6.0.0
* Fix typo regarding --stubdir in configure script
===== 1.2.0 (2009-03-25) =====
* Native code version now compiled by default
* Now possible to link extensions and Eliom modules statically, for
example to use a native code server on platforms where native
dynlink is not supported
* Server: Partial requests implemented (Range HTTP header)
* Build C stubs into a shared library so that bytecode executables
may be not linked in custom mode; new {{{--stubdir}}} option in
{{{configure}}} script
* Eliom: non-attached services now called "named non-attached
coservices" and created using {{{Eliom_services.new_coservice'}}}
with the optional {{{name}}} parameter
* Eliom: now possible to create named attached coservices using the
optional {{{name}}} parameter
* Eliom: now possible to write libraries for Eliom sites, loaded
inside {{{<host>}}}, but not generating any page
* Eliom and server: EXPERIMENTAL now possible to make extensions
that can use Eliom's data
* XHTML.M's pretty printer: now possible to set the DOCTYPE manually
* Eliom: now possible to set manually the DOCTYPE when registering
an XHTML.M service
* Redirectmod and Revproxy: now possible to do more complex
rewriting
* Accesscontrol: add support for {{{<port>}}} and {{{<ssl>}}}
conditions
* Config file: {{{aliases}}} attribute now called {{{hostfilter}}}
* Revproxy and Redirectmod: now possible to filter on server, port
and protocol
* New extension extendconfiguration to allow dynamic changes in the
configuration (mimetypes, charsets, followsymnlink, directory
listing, ...)
* Server: new module {{{LocalFiles}}} factoring the common parts
for sending static files (with Eliom and staticmod for example),
while checking that the files can safely be sent.
* Now possible to use XHTML pretty printers without Ocsigen, using
the {{{xhtmlpretty.cma}}} library
* Add {{{Ocsigen_lib.register_exn_printer}}}, better error messages
* Now possible to use the same configuration file in native code and
in bytecode (.cmo/.cma filenames are internally translated to
.cmxs)
* Signature of Ocsigen_extensions.register_extension is now more
complete and more lightweight
* Userconf: the options set in the local .userconf file are kept
in the enclosing {{{<site>}}} tag
* Server: possibility to ignore or to supply an alternative
command-line
* Ocsigen_http_client: timeout when the distant server does not
exists
* OCaml versions < 3.10 are not supported anymore
* Extensions are now much more strict w.r.t. the syntax of
configuration files
* Staticmod: accessing a directory for which indexing is disallowed
returns an error 404 (instead of a 403 previously)
===== 1.1.0 (2008-07-15) =====
* Lwt removed (now distributed separately)
* {{{XHTML.M}}} pretty printer: fixing pretty printing of empty tags
(for browser compatibility)
* Eliom_duce: New pretty printer for XHTML fixing pretty printing of
empty tags
* Eliom: secure sessions, secure services, (absolute) https
links/forms, and using secure cookies
* Eliom: Adding special "void action", without any parameters
* Eliom: {{{Eliom_predefmod.Redirections}}} now called
{{{Eliom_predefmod.String_redirection}}}, and adding new module
{{{Eliom_predefmod.Redirection}}} that use GET services without
parameters as data type.
* Eliom and XHTML.M: Small changes of types in interfaces
* Eliom: New session ID generator
* Eliom: Adding types {{{int32}}} and {{{int64}}} for parameters and
forms
* Eliom: Adding functions {{{lwt_get_form}}} and {{{lwt_post_form}}}
for creating forms using cooperative functions
* Eliom and Staticmod: now possible to give GET parameters to static
pages
* Eliom: Bugfix in Makefiles for native code version
* Eliom forms: Adding missing types in interfaces
* Eliom_tools: current page is now optional in menus
* Userconf and Eliom: there was a bug when loading both Eliom and
Userconf together
* Reverse Proxy: Now sending content length when available
* Web server: The default content-type is now
{{{application/octet-stream}}}
* Creating and installing a cma file for all Ocsigen libraries not
installed elsewhere
* Ocsipersist-dbm: fixing bug when removing data
* Deflatemod: fixing memory leak
* And small bugfixes in XHTML.M, Eliom, ...
===== 1.0.0 (2008-04-01) =====
* Config file: findlib integration
* Eliom and Ocsigen: changing namespace convention for modules
* Access control: simplification of config file syntax
* Eliom: Allowing (module dependent) parameters for registration
functions
* New xhtml output without pretty printing
* Web server: Bugfix in HTTP/1.0 with keep-alive
* Reverse proxy: Bugfix GET parameters were wrong
* Reverse proxy: Bugfix memory consumption when the connection was
closed by client
===== 0.99.5 (2008-01-11) =====
* Revproxy: pipelining of requests
* Access control: simplification, generalization of filters and
syntax changes in config file
* Eliom: EXPERIMENTAL session groups
* Eliom: non-attached services
* Eliomduce: new functor {{{SubXhtml}}} for creating registration
modules
* Eliomduce: new module Eliomducetools with same features as
Eliomtools, but for Eliomduce
* Web server: now possible to split the configuration file into
several files using the {{{<extconf/>}}} option.
* Web server: now possible to have {{{<site>}}} option inside
another {{{<site>}}} in configuration files, and the the first one
is optional
* Web server: EXPERIMENTAL user configuration files, with restricted
possibilities (for security reasons)
* Web server: IPv6 support
* Deflatemod: now possible to filter on file extensions
* Eliom: new option to keep GET non-attached parameters or not when
doing a POST form towards a non-attached coservice.
* Eliom: bugfix path of session cookies
* Eliom: bugfix POST non-attached coservices called from a page with
non-attached GET parameters were not found.
* Lwt: now catching exceptions raised after timeouts
* Cgimod: bufixes in path handling
* Web server: bugfix - some files were not closed
===== 0.99.4 (2007-11-21) =====
* Ocsigen: Changes in the extension mechanism. The extensions are
not tried in the order in which they are loaded any more, but in
the order in which the options are specified for each site in the
configuration file.
* New experimental extension: access control
* A few small enhancements
** Eliom: internal cookie management rewritten (+ bugfix)
** Eliom: Small changes in function names
** Eliom: now retry all extensions after actions (not only Eliom)
** Eliom: cleaning {{{Eliommod}}} interface
** Ocsigen server: Internal changes in server (removing "send"
functions, debug messages lazier)
** Lwt: Adding a few functions in {{{Lwt_chan}}} interface
** Staticmod: Allowing default error pages for HTTP errors to be
customized
** Ocsipersist (dbm and sqlite): better handling of database
errors
** XHTML: New pretty printer for xhtml using streams (up to 15%
speedup on requests)
** XHTML: Allowing any value for {{{<link>}}} rel attribute (for
example {{{shortcut icon}}}).
===== 0.99.3 (2007-11-07) =====
* Ocsigen: New module Deflatemod to compress data before sending to
the browser.
* Ocsigen: EXPERIMENTAL - New module Revproxy (reverse proxy).
* Eliom: New session mechanism, with the ability to name the
sessions and thus have several sessions for the same site.
* Eliom: Now possible to have one site with session inside a
subdirectory of another one.
* Lwt: New module {{{Lwt_timeout}}} to implement timeouts, new
module {{{Lwt_chan}}}, new module {{{Lwt_mutex}}}, new function
{{{Lwt_unix.abort}}} to make all threads waiting on a file
descriptor abort with an exception.
* Ocsigen: New implementation of lots of Web server
internals. Better management of Ocsigen's streams, file
descriptors, exceptions, timeouts ...
* A lot of enhancements and bug fixes:
** Eliom: Single {{{<select>}}} now always return one parameter
({{{`Opt}}} replaced by {{{`One}}}, and the first item is
selected by default to prevent selecting nothing with some
browsers).
** Eliom: More secure cookies.
** Eliom: new version of the tutorial.
** Eliom splitted in several modules.
** Eliom: Nurpawiki example now called Miniwiki.
** Eliom: {{{any_...}}} form widgets now called {{{raw_...}}}
** Eliom: {{{~url}}} parameter (for {{{new_service}}}, etc.) now
called {{{~path}}}.
** Eliom: Bugfix escaping characters in URL was wrong
** Eliom: Adding a new parameter {{{~prefix}}} to
{{{new_external_service}}} for the scheme and server name. Not
encoded.
** Eliom: Eliomboxes now called Eliomtools, with new widget
"hierarchical menu" for sites with sections and subsections.
** Eliom: Adding {{{Eliompredefmod.Streamlist}}}.
** Ocsigen: EXPERIMENTAL - now possible to do HTTP requests.
** Ocsigen: New module Redirectmod to define HTTP redirections in
the config file.
** Ocsigen: Make possible to create new kind of extensions to
filter the output (for ex compression)
** Ocsigen: Bugfix - HEAD requests were broken in 0.99.2
** Ocsigen: Bugfix - HTTP errors were sometimes sending a body in
respond to a HEAD request.
** Ocsigen: Now sending 403 when upload is forbidden
** Ocsigen: HTTP headers {{{If-Match}}}, {{{If-None-Match}}},
{{{If-Unmodified-Since}}} implemented
** Cgimod: Bugfix - HEAD requests were sending an error 500.
** Cgimod: Bugfix - Some file descriptors were not closed.
** Cgimod: Implementing a timeout on CGI scripts.
===== 0.99.2 (2007-08-21) =====
* Eliom: New implementation of forms. All missing cases implemented,
and more possibilities, such as untyped forms.
* Ocsipersist: New implementation of Ocsipersist using SQLite
instead of DBM. (You can still use the old one).
* Cgimod: EXPERIMENTAL - New extension for using CGI scripts with
Ocsigen (including PHP through CGI).
* Staticmod: Allow several static directories for one site.
* Staticmod: Allow listing the content of directories.
* Ocsigen: HTTP Header "Transfer-Encoding: chunked" implemented for
sending or receiving data without knowing the Content-Length
* Ocsigen: Bugfix in preemptive.ml when lots of simultaneous
connections
* Ocsigen: Improvements in the extension mechanism
* Ocsigen: New file extensiontemplate.ml: an example explaining how
to write your own extensions
* Ocsigen: Bugfix - fixing limitation of simultaneous connections
* Eliom: Bugfix - type of {{{all_suffix_string}}} was wrong in
{{{eliom.mli}}}.
* Eliom: GET Services do not answer any more to POST requests
without parameters.
===== 0.99.1 (2007-05-15) =====
* Eliom: Now possible to set an exception handler for the whole site
to personalize error pages (404, 500, etc.)
* Eliom: Now possible to register main services after initialization
* Eliom: Unifying {{{register}}} and {{{register_public}}}. Use the
optional {{{~sp}}} parameter to register during session.
* Eliom: Idem for all functions {{{..._during_init}}} and
{{{..._during_session}}}
* Eliom: Functions to remove data from tables
* Ocsigen: Debug mode: the exception is printed on the error page
* Ocsigen: Bugfix in {{{Preemptive.detach}}} when used with
{{{Lwt_unix.run}}}
* Ocsigen: Bugfix - launching ocsidbm for MacOS
* Eliom: Bugfix - GC of sessions and session data
* Eliom: Bugfix - GET actions were not working properly
===== 0.99.0 (2007-05-05) =====
* EXPERIMENTAL: Native code support. It is now possible to use
Ocsigen in native code. BUT: to use that, you need a modified
version of OCaml, that allows dynlinking of native code modules
(natdynlink branch in OCaml's CVS, by Alain Frisch).
* OCaml 3.10 support (syntax extension with new Camlp4)
* The functor Ocsigen.Make (add new types of pages for Ocsigenmod)
is now divided into two functors, one for "register" functions,
and one for forms and links (if needed).
* New module for dynamic page creation called Eliom. Ocsigenmod is
now deprecated but is still in the distribution. Eliom is based on
Ocsigenmod.
* Eliom: replacing auxiliary services by coservices. Coservices may
have GET or (and) POST state parameter.
* Eliom: adding notion of non-attached coservices. They can take GET
or POST parameters.
* Eliom: Creation of a new module {{{Actions}}}. It is possible to
register actions on main services, coservices (attached or not).
* Eliom: Removing the old actions (use new actions towards
non-attached coservices instead)
* Eliom: New module {{{Unit}}} for actions without reload
* Eliom: New module {{{Redirections}}} to register redirection
pages.
* Eliom: New module {{{Files}}} to register services that send
files.
* Eliom: New module {{{Any}}} to register services that choose what
they send.
* Eliom: New module {{{Blocks to register services that send a box
of type body content.
* Eliom: Module {{{Text}}} replaced by {{{HtmlText}}}, and adding
{{{CssText}}} and {{{Text}}} (for any content type).
* Eliom: Bugfix - Typing errors of parameters are now catched only
if the names of parameters fit exactly.
* Eliom: {{{register_service}}} now called {{{register}}}.
* Eliom: EXPERIMENTAL Fallbacks can now get a "Session expired" from
previous pages and actions may send informations to the page
generated (using exception).
* Eliom: Now possible to pre-apply services (to make links or to be
used as fallbacks for coservices)
* Eliom: services can now set their own cookies
* Eliom: Disposable coservices (coservices that you can use only n
times)
* Eliom: Nurpawiki: example of Wiki written by Janne Hellsten
* Eliom: New handling of URLs with suffixes
* Ocsigen: New module Ocsipersist for persistent data, using its own
DBM server (ocsidbm)
* Eliom: Persistent sessions using Ocsipersist
* Eliom: Timeouts for sessions
* Eliom: Timeouts for coservices
* Ocsigen: It is now possible to give parameters to extensions in
configuration file.
* Ocsigen: Simplifying parsing of configuration file (could be
improved).
* Ocsigen: EXPERIMENTAL It is now possible to reload the modules
without stoping the server.
* Staticmod: Rewriting of URLs using regular expressions.
===== 0.6.0 (2007-03-14) =====
* {{{configure}}} script
* {{{<select>}}} in forms, by Stéphane Dalmas
* EXPERIMENTAL: The Web server is now extensible. It means that you
can add modules (like Apache modules) for generating pages,
filters of requests, extensions of config files. For now there are
two modules, one for static pages, and one for dynamic pages. The
only changes for users is that they need to dynlink staticmod.cmo
and ocsigenmod.cma from the configuration file. The syntax of
config file for modules and staticdir also changed.
* It is now possible to specify the encoding of characters for each
sub-site.
* Now usable with Ocamlnet 2.2 or 1.1.2.
* EXPERIMENTAL: If OCamlDuce is installed on your system, you can
now use it to do the type-checking of your pages (see the
documentation). Warning: This is broken with OCamlDuce 3.09.2
patch level 2. You need at least OCamlDuce 3.09.3 patch level 1.
* Removing Ocsimore from the default distribution. That version of
Ocsimore is not supported anymore. Ocsimore has been rewritten
from scratch by Piero Furiesi.
===== 0.5.1 (2006-12-14) =====
* Bugfix Konqueror: Multipart forms with now work correctly with
Konqueror
* Bugfix Internet Explorer: getting around a bug of Internet
Explorer while displaying page
* Bugfix NetBSD: Makefile
* Bugfix Debian for HPPA, Mips, Alpha: Makefile
* Bugfix: preemptive.cmi was missing in the installation directory
* Adding manpage (S. Mimram)
* Adding logrotate configuration
* Daemon mode: adding setsid and redirect stdout/stderr to
/dev/null. Closing stdin.
===== 0.5.0 (2006-11-23) =====
* HTTP 1.1 improved (HEAD, ETag, keep-alive implemented,
If-Modified-Since, ...)
* HTTPS support
* Pipelining of requests
* Server can listen on several ports
* Multiple servers: you can now define several servers in the config
file.
* Virtual hosts: filtering on hostnames/ports (with wildcards)
* Asynchronous file upload with multipart support
* Large file transfer improved.
* MIME types are now parsed from a file
* Changes in the syntax of config file
* Accessors for server parameters. Use ({{{get_user_agent sp}}})
instead of {{{sp.user_agent}}}.
* Page generation is now using {{{Lwt}}} cooperative threads, to
make it possible the generation of several pages at the same
time. Practically, add {{{Lwt.return}}} before the page you want
to send, and use cooperative input/output functions.
* Typing errors of parameters are now catchable.
* {{{static_dir}}} is now a function
* Most of global references have been removed. You now need to give
sp as parameter to {{{register_for_session}}}, {{{static_dir}}},
{{{close_session}}}, etc.
* Links and forms now take {{{server_params}}} instead of
{{{current_url}}} ({{{sp}}} is shorter than {{{sp.current_url}}})
* EXPERIMENTAL: Use of preemptive threads for non cooperative
libraries ({{{detach}}} function).
* EXPERIMENTAL: The {{{Ocsigen}}} module now contains a functor
{{{Make}}} to allows the use of several ways of generating
XHTML. The default way (using {{{XHTML.M}}} or the syntax
extension) can be used by doing {{{open Ocsigen.Xhtml}}}. There is
also an untyped xhtml generation module called {{{Ocsigen.Text}}}.
* EXPERIMENTAL: extension of forms.
* Reorganisation of the code
* Bugfixes in makefiles
* Bugfix: escaping of strings in xhtml with syntax extension (thanks
to David Mentre)
===== 0.4.0 (2006-06-06) =====
* Full reimplementation of the core using Generalized Algebraic Data
Types,
* {{{_int}}}, {{{_string}}}, etc. are now called {{{int}}},
{{{string}}}, etc.
* The type {{{_http_params}}} is now called {{{server_params}}},
* Services functions now all take 3 parameters, one for server
parameters, one for GET parameters, and one for POST
parameters. Note that {{{**}}} is used to create **pairs** and not
tuples.
* The {{{a}}} and {{{post_form}}} functions now take a fix number of
parameters, correponding to GET parameters.
* //URLs// are now called //services//,
* //state URLs// are now called //auxiliary services//,
* {{{register_post_url}}} does not exist anymore. use
{{{register_service}}} instead (idem for all other
{{{register_post_*}}} functions).
* Changes for prefix URLs
* Small changes for actions
* EXPERIMENTAL: sums, bool and list types for services and forms
* small bugfixes
===== 0.3.27 (2006-04-27) =====
* Change the way to get server parameters
===== 0.3.26 =====
* Load unsafe modules
* Other small changes
===== 0.3.25-2 (2006-02-24) =====
* Small bugfix for 64 bits processors
* bugfix for static files
* {{{action_link}}} is now called {{{action_a}}}
===== 0.3.24 (2006-02-07) =====
* More documentation
* Change types {{{internal_url}}} and {{{external_service}}} to use
polymorphic variants
===== 0.3.23 (2006-02-07) =====
* Better handling of static files and "403 Forbidden" message
## 113.24.00
- Bugfixes and minor API improvements.
## 113.00.00
- Extended and improved Email_message API.
## 112.17.00
Moved from janestreet-alpha
Changes since version 1.1.2
===========================
* use internal buffer pool in Extprot.Msg_buffer in order to avoid allocating
large buffers when serializing. It can be disabled by defining the
EXTPROT_DISABLE_BUFFER_POOL environment variable.
Changes since version 1.1.1
===========================
* conditionally enable -bin-annot for ocaml >= 4.00 (ygrek)
* change in generated pretty-printers for records: print module path only for
first field
* keep relative order of constant and non-constant constructors in generated
OCaml type definition (required for "type_equals").
* OCaml 4.02.0 compatibility
## 113.00.00
- Added `Fields.Direct.set_all_mutable_fields`, a function intended to
guarantee when pooling records that one cannot forget to reinitialize some
fields.
Obviously one could achieve this through something like
`Fields.Direct.iter`, but we want a more efficient version that
doesn't force the call side to create closures.
## 109.19.00
- Made `with fields` generate the same functions in the `Fields` and
`Fields_of_*` modules whether the type is called `t` or not.
## 109.14.00
- Made `with fields` expose first-class fields for private types while
preserving privacy.
There is now an additional phantom type in a first-class field that
prevents building or modifying elements of a private type.
One consequence of this change is that the `Field.t` type is now an
abstract type -- it used to be exposed as a record type. So, one
must, e.g., change `field.Field.name` to `Field.name field`.
## 109.12.00
- Added back `Fields.fold` to `with fields` for `private` types.
We had removed `Fields.fold` for `private` types, but this caused
some pain. So we're putting it back. At some point, we'll patch
`with fields` to prevent setting mutable fields on private types via
the fields provided by `fold`.
## 109.11.00
- `with fields`, for a type `u` that isn't named `t`, creates module
`Fields_of_u` rather than module `Fields`. This allows one to us
`with fields` on several types in the same structure.
## 109.10.00
- Changed `with fields` on `private` types to not expose mutators or
creators.
v0.7.1 2016-07-12 Cambridge (UK)
--------------------------------
- Add `Fpath.mem_ext`.
- Documentation fixes.
v0.7.0 2016-05-23 La Forclaz (VS)
---------------------------------
First release. Many thanks to David Sheets for his review of the API.
This file has been truncated, but you can view the full file.
###############################################################################
# Preliminary notes: #
# ------------------ #
# Mark "-": change with an impact for users (and possibly developers). #
# Mark "o": change with an impact for developers only. #
# Mark "+": change for Frama-C-commits audience (not in html version). #
# Mark "*": bug fixed. #
# Mark "!": change that can break compatibility with existing development. #
# '#nnn' : BTS entry #nnn #
# '#!nnn' : BTS private entry #nnn #
# '#@nnn' : Gitlab frama-c/frama-c issue #
# For compatibility with old change log formats: #
# '#?nnn' : OLD-BTS entry #nnn #
###############################################################################
######################################
Open Source Release Aluminium-20160501
######################################
- Value [2016/04/19] Support for evaluation of predicate
\valid_read_string on constant strings.
-* Sparecode [2016/04/11] Fix crash when an entire function becomes spare.
(issue #@157).
- Eva [2016/03/30] New experimental domain that improves precision on
bitwise operations, for example on pointers. Activated by option
-eva-bitwise-domain.
o! Value [2016/03/30] API change in functor Lmap.Make.
- LoopAnalysis [2016/03/29] New plug-in 'LoopAnalysis' which estimates loop
bounds and -slevel-function parameters. Invoked using option
-loop.
-* ACSL [2016/03/30] Fixes precedence uncompliance within ACSL Manual of
some bitwise operators and more agressive checks of consistent
relation chains.
-* Metrics [2016/03/24] Fix list of undefined functions; functions that
are never called were not reported.
-* Metrics [2016/03/24] Fix option -metrics-value-cover when option
-metrics-libc is not set.
-! Metrics [2016/03/24] Global variables defined in Frama-C standard library
are no longer counted when option -metrics-libc is not set.
- Variadic [2016/03/17] New plug-in 'Variadic' which translates variadic
functions, calls and macros to allow analyses to handle them more
easily. Invoked using the -va option.
- Nonterm [2016/03/09] New plug-in 'nonterm' for detection of definite
non-termination based on Value.
!o Kernel [2016/02/29] Do not raise Invalid_arg and Failure exn but use
custom exceptions instead. Prevents warning 52 in OCaml 4.03.0
Functions raising new exceptions are:
- Db.From.find_deps_term_no_transitivity_state
- Db.Interp.*
- Kernel [2016/02/24] New option -<plugin>-log to copy the output of
plug-ins into one or several text files
(described in the User Manual).
-* ACSL [2016/02/23] Fixes implicit logic label generation on recursive
definitions. Fixes bug #2158.
- Eva [2016/02/22] Experimental domain dedicated to storing and
learning information from syntactic equalities
(option -eva-equality-domain).
- Eva [2016/02/22] Improvements to backward propagation, on memory
accsses and bitwise operations.
-* Value [2016/02/17] Fix handling of functions without a body that
return a pointer. The pointer was aligned on an incorrect
frontier.
-* Value [2016/02/17] Fix crashes when analysing a function (without a
body) that returns an empty struct, or a pointer to an empty
struct. Bugs reported by TrustInSoft.
- Kernel [2016/02/10] Registering twice the same machdep is now accepted.
- Cil [2016/02/10] Add proper support for empty aggregate initializers
in GCC mode.
- Cil [2016/02/08] Operator ! applied to constant expression is no
longer simplified when not required.
- Value [2016/02/05] Informative messages about inactive behaviors are
now emitted only at verbosity level 2.
- Value [2016/02/05] Messages on ACSL predicates with Unknown/Invalid
status are now emitted with a 'warning' severity, consistently
with the emission of alarms. 'True' statuses are hidden if option
-val-show-progress is unset.
- From [2016/02/03] Option -from-verify-assigns takes into account
direct and indirect dependencies.
- Value [2016/02/03] Distinguish direct and indirect dependencies in
'from' clauses to compute the effecst of an 'assigns/from' clause.
See section 7.2 of the manual.
-* Libc [2016/02/02] Fix specifications of memchr and strncpy.
-* ACSL [2016/01/27] Fixes example of logic label use. Fixes bug #2203.
-* Logic [2016/01/17] Meaningless assigns clauses are now rejected more
agressively. Fixes bug #1790.
o Kernel [2016/01/08] Several incompatible changes in module Property.
- Kernel [2016/01/08] Automatic generation of assigns from GCC's extended
asm.
-* Value [2016/01/06] Evaluation of ACSL ranges takes into account option
-safe-arrays. In particular t[..] remains within the bounds
of t. Fixes bug #!1639.
-* Value [2016/01/05] Take into account 'volatile' qualifiers on struct
typedefs, which were previously ignored. Fixes issue #@102.
- Value [2016/01/03] Support for \valid_function predicate during
evaluation.
- ACSL [2016/01/03] New predicate \valid_function, requiring the
compatibility between the type of the pointer and the function
being pointed.
-* Eva [2016/01/01] Fixed some bugs related to 0. vs. -0. in conditions.
- Eva [2016/01/01] More agressive reductions in complex conditions
such as if(a+3 < 10).
-*! Value [2016/01/01] Reimplementation of all the upper layers of the
plugin. Compatibility with the legacy version is almost complete,
save for some text messages and a few functions of the API.
Use option -no-eva to switch back to the legacy version.
Changelog entries labelled 'Eva' refer to this new version.
Entries labelled 'Value' apply to both versions.
o! Value [2015/12/02] Base.base_max_offset has been removed. Part of its
functionality is still available via Base.valid_range, whose
return type is now more expressive.
-* RTE [2015/12/09] Fix unsoundness for overflows on binary operations
when one or two operands were constant.
-* RTE [2015/12/09] Fix unsoundness on unary minus expressions when
option -rte-trivial-annotations is active.
-! Cil [2015/12/02] Changes in the handling of incomplete structs and
zero-length arrays. Initialization of incomplete (completely
undefined) structs is now duly rejected. Several compiler
extensions to the C99 standard (empty initializers,
zero-length arrays, etc.) now require a GCC or MSVC machdep
(e.g. -machdep gcc_x86_32).
-! Cil [2015/12/02] Better handling of C99 flexible array members (FAMs).
Static initialization of FAMs (a GCC extension) is no longer
supported.
o! Gui [2015/12/01] Refactor GUI Helpers.
(Toolbox and (partially) Gtk_helper moved
to Wutil,Widget, Wform, Wtext and Wtable).
-! Value [2015/11/26] Widening hints now includes signed and unsigned
limits for the bitsize of the value being widened, but does not
include arbitrary limits anymore. The convergence is generally
faster but results may be more or less precises depending on
the case.
-! Value [2015/11/26] Better propagation strategy for nested loops.
Results are usually much more predictable (and often more
precise) when the loops are not fully unrolled by slevel.
-! Makefile [2015/11/26] Target 'make rebuild' has been renamed into
'make clean-rebuild'.
-* Value [2015/11/24] The preconditions of functions overriden by builtins
no longer receive an 'Unreachable status for calls within dead
code: the specification is ignored everywhere. Fixes bug #!1956.
-! Cil [2015/11/23] Incorrect return statements (return void on non-void
functions and vice-versa) now generate errors instead of warnings.
- Value [2015/11/23] New option -val-warn-undefined-pointer-comparison.
- ACSL [2015/11/23] Add built-in operators for lists.
- ACSL [2015/11/23] Add notation '{ x, y, z }' for defining sets.
o Makefile [2015/11/19] New option PLUGIN_EXTRA_DIRS for multi-dir plugins.
-* Kernel [2015/11/18] do not crash when loading statuses depending from
non existing parameter. Fixes issue #!2181.
o! Makefile [2015/11/12] Get rid of FRAMAC_MAKE variable. Use FRAMAC_INTERNAL
instead for distinguishing internal and external mode.
- Kernel [2015/10/28] Option -collect-messages is obsolete and will be
removed in a future version; messages are now always collected.
o! Kernel [2015/10/19] Removed function State_selection.list_state_union.
Use State_selection.of_list or State_selection.list_union instead.
-* Kernel [2015/10/15] Avoid comment duplications on generated code.
-* Kernel [2015/10/15] Comments are preserved even when loops are unrolled.
Fixes issue #!2176.
-! Kernel [2015/10/15] Option -warn-undeclared-callee changed to
-implicit-function-declaration, which receives an argument
(ignore, warn or error) specifying what to do when an undeclared
function is called.
-! GUI [2015/10/15] Signature change for function
Design.register_source_highlighter; the first argument of the
callback has now type Design.reactive_buffer, which can be coerced
back to a GSourceView2.source_buffer using method buffer.
- Value [2015/10/13] During the evaluation of ACSL 'assert', intermediate
statuses (e.g. True, then Unknown, then True) are now reported
in the console.
o! Kernel [2015/12/09] API change for function Alarms.register. See .mli
for details.
- Cil [2015/10/09] Add support for parsing digraphs.
o! Cil [2015/10/09] Buggy record Cil.miscState has been removed.
Customization must be done directly in Cil_printer.state.
- Value [2015/09/30] Better precision for calls through function pointers
when multiple functions are possible. The abstract state now
contains the information of which function was called.
o! Value [2015/09/20] Functions filter_le_ge_lt_gt_* have been renamed
into backward_comp_*. Evaluation and reduction functions
for comparisons now use and return dedicated types, in
Abstract_interp.Comp.
- Cil [2015/09/20] Double pointer casts on the NULL pointer are now
simplified.
-! Cil [2015/09/20] Typing within comparisons is now more strict,
or made more explicit through casts.
- Kernel [2015/09/20] The untyped AST is no longer removed by basic program
transformations such as loop unrolling.
o Ptests [2015/07/29] New EXEC: directive.
- Kernel [2015/07/01] New options -then-last and -then-replace.
- Kernel [2015/07/01] New option -remove-projects.
- Kernel [2015/06/30] New option -set-project-as-default.
######################################
Open Source Release Magnesium-20151002
######################################
o! Kernel [2016/01/03] Modules Dataflow is deprecated, and will be removed
in Aluminium. Module Dataflow2 offers a very similar but simpler
API.
- Doc [2015/11/16] Fixed typo in the manual (Thx Mihaela Sighireanu).
-* Kernel [2015/10/12] Fix clearing of old statuses and hypotheses when a
new status is emitted or an annotation is removed.
-* Libc [2015/09/29] Removed obsolete file machine.h (along with other
similar files) from the Frama-C share folder. Fixes bug #2171
-! Kernel [2015/09/07] Removed support for OCaml 3.12.1
- Value [2015/09/03] Assertions containing \at(P, L), where L is a C
label, can now be evaluated. Evaluation is done once Value has
run; thus, it ignores option -slevel.
-* Value [2015/09/03] pointer_comparable alarms are now emitted with
arguments properly cast to void* or void (*)().
- Value [2015/08/10] The alarms raised when evaluating a global
initializer that leads to an undefined behavior are now marked
with an "Invalid" status.
- Report [2015/08/10] Reports in csv format now honor option
-report-specialized (previously, preconditions at a
callsite were always skipped).
-* Libc [2015/08/26] Fix bug in the specifications of readir, opendir,
closedir and fopen functions, that would cause incorrect analysis
in -lib-entry-mode.
- Gui [2015/08/14] When a call statement is selected, the statuses of
the preconditions of the called functions are displayed in the
'information' panel.
o! Gui [2015/08/14] Minor API changes regarding Design.reactive_buffer.
Some values that used to have an option type are now guaranteed
to be present.
- Gui [2015/08/12] Internal ids (for statements, code annotations, etc.)
are now hidden by default. Start the GUI in debug mode if you want
to see them.
-* Gui [2015/08/10] Filenames in the GUI file tree (top-left panel)
are now sorted correctly. Fixes bug #2173.
-! Value [2015/08/03] WIDEN_HINTS directive are now cumulative with
automatically inferred bounds. Fixes bug #876.
-* Cil [2015/08/03] Fix bug #1553, related to nested initialisations
of structures containing pointers.
-! Value [2015/08/03] All plugins that depend on Value, plus Value itself
are now dynamic. Custom plugins must specify in their Makefile the
plugins they depend on (e.g. PLUGIN_DEPENDENCIES:=Inout Value).
-* Cil [2015/07/29] Cil transformation can introduce assertion to ensure
that size expressions in an array declarations evaluated at
program execution time are positive and do not overflow.
o Ptests [2015/07/29] New LOG: directive.
- Value [2015/07/19] Garbled mix origins now include at most one source
location.
- Report [2015/07/19] New option -report-proven to control the display
of proven properties.
- Report [2015/07/19] New export format (.csv), through option -report-csv.
o! Callgraph [2015/07/16] Remove Cil.Callgraph, Db.Syntactic_callgraph and
Db.Semantic_callgraph which are all replaced by the single
plug-in Callgraph. See Changelog_detailled.md for further detail
about this change.
-! Callgraph [2015/07/16] New plug-in callgraph which merges the old
Syntactic_callgraph and Semantic_callgraph plug-ins (now
removed). Either this plug-in uses Value if already computed, or
computes the syntactic callgraph otherwise. This new plug-in
unifies the behavior of its two ancestors. In particular,
the edges of callgraph computed with the help of Value are
now directed in the same way as the syntactic callgraph (was
reversed before) and so the computed services are now
equivalent. Also, the uncalled functions are now displayed
by default. For plug-in developers, the callgraph is easily
accessible via an API (bts #755).
-! Value [2015/07/14] Float operations that are guaranteed to lead
to +/-infty (e.g. x = FLT_MAX*10.) now stop propagation.
Previous behavior was to continue with an imprecise value for x.
- Kernel [2015-07-09] New option -custom-char-annot for changing the
character introducing ACSL annotations (instead of '@').
- Value [2015/07/09] Do not emit pointer_comparable alarms on valid
pointer comparisons involving objects of size 0.
- Value [2015/07/07] The semantics of copying a lvalue has been changed
when a type mismatch occurs between the destination and the copied
value. A bitwise reinterpretation of the value to the destination
type is now performed during the copy.
o! Kernel [2015/07/01] Ival.Float_abstract renamed to Fval.
Fval.inject_r now may raise Fval.Non_finite instead of the old
Float_abstract.Bottom.
- Value [2015/06/29] Option -val-split-return-auto now always split
between NULL/non-NULL pointers.
-* Value [2015/06/26] Check the validity of the operands of the ACSL
operators /, %, << and >> when evaluating a predicate.
o! Value [2015/06/25] Remove duplicate values Ival.singleton_zero and
Ival.singleton_one. Use script sodium2magnesium.sh for automatic
migration.
-* Parsing [2015/06/22] Black-list gcc's builtin macros for logic
pre-processing to avoid warnings for duplication. Fixes bug #2161.
-* Logic [2015/06/15] Fix typing bug when converting into a term an
expression containing a pointer substraction.
-* Value [2015/06/09] Pointer comparisons using relational operators (<,
>=, etc) between a pointer and NULL is now flagged as undefined.
o! Kernel [2015/06/09] Remove support of plug-ins without .mli.
Fixes bug #!1825.
-* Cil [2015/05/29] Better typing of '?' operator. Fixes bug #2117.
o! Kernel [2015/05/29] Remove long-obsoleted functions Cfg.computeCFGInfo
Cfg.printCfgFilename, and Cfg.printCfgChannel.
- Value [2015/05/28] Functions call using a function pointer are now
treated more leniently when too many arguments are supplied. An
alarm is emitted, but execution continues with the right number
of arguments.
- Value [2015/05/12] Improved reduction by predicate \initialized when
the left argument is a range of locations.
- Impact [2015/05/12] Removed function Db.Impact.slice, that was actually
unrelated to Impact. You can use the functions contained in
Db.Slicing.Select, in particular Db.Slicing.Select.select_stmt,
to obtain the same result.
- Makefile [2015/05/06] Dynamic plug-ins are now declared as Findlib
packages. Use variables PLUGIN_REQUIRES and PLUGIN_DEPENDENCIES.
Loading a plug-in automatically loads all necessary dependencies.
Plugin "MyPlugin" is register under "frama-c-myplugin" package.
-! Kernel [2015/05/06] Dynamic now rely on Findlib. Small changes in API.
Option -load-module can now load any Findlib package and its
dependencies as well.
- Kernel [2015/05/06] Reformulated help messages.
Option -help is more concise.
Option -version only prints version number.
Options -print-xxx uniformized.
New options -plugins, -print-config.
- Value [2015/05/29] Added built-ins for mathematical functions: atan2,
fmod, pow, expf, logf, log10f, powf, sqrtf, floor, floorf,
ceil, ceilf, round, roundf, trunc, truncf.
-* Value [2015/05/03] In -lib-entry mode, allow the generation of initial
states with 0-sized bitfields.
-* Metrics [2015/05/05] Fix computation of global cyclomatic complexity.
Fixes bug #!2089.
-* Libc [2015/04/29] Added ACSL specifications to some standard library
functions, including read, write and realloc. Fixes bug #1939.
- Scope [2015/04/22] Assertions previously removed by
-remove-redundant-alarms are now marked as proven, but remain in
the AST.
- Value [2015/04/22] New GUI panel 'Values', that displays nearly all the
information previously available under the 'Information' panel.
-* Logic [2015/04/14] Correct handling of string and char constant in
logic pre-processing. Fixes bug #2101.
-* Logic [2015/04/14] Better overloading resolution.
Fixes bug #2098.
o! Logic [2015/04/08] Functions Db.Properties.Interp.lval and
Db.Properties.Interp.expr have been renamed (into term_lval
and term, respectively), and have a new signature.
-* Cil [2015/04/19] Fix parsing of packing directives of the form
'#pragma pack(push, N)'.
-! Value [2015/04/13] In -lib-entry mode, functions pointers no longer
force the generation of dummy functions. Instead, they are
initialized to NULL. Fixes bug #!2104.
- Kernel [2015/04/01] New API for backward dataflow propagation in file
Dataflows.
- Metrics [2015/03/25] New category 'Extern global variables', that can
be used to check whether some files are missing.
- Metrics [2015/03/24] Functions from Frama-C standard library are now
hidden by default.
-* Cil [2015/03/26] Switch statements in which some cases are not
constant expressions are now completely disallowed, as per the
C standard.
-* Cil [2015/03/21] Disallow all incomplete types for struct fields
Fixes bug #!1672.
-! Cil [2015/03/21] Parsing no longer accepts structures containing
incomplete types. Fixes bug #!2091.
- Kernel [2015/03/24] Special functions CEA_ have been removed.
-! Libc [2015/03/19] Most .c and .h files under /share have been merged
into /share/libc. Inclusions of builtin.h should be replaced by
__fc_builtin.h.
- Kernel [2015/03/18] New ACSL predicate \valid_read_string in
share/libc/__fc_string_axiomatic.h.
-! Value [2015/03/12] Terms involving l-values that are bit-fields are now
correctly handled.
- Cil [2015/03/19] Fix incorrect simplifications of '!E' to 0 when
E is either an enum with value 0 (bug #2090), or an expression
whose value wraps.
- Kernel [2015/03/10] macro __FRAMAC__ is defined when pre-processing
C files in Frama-C.
o! Kernel [2015/03/10] AST change: split GVarDecl into GVarDecl and GFunDecl
o! GUI [2015/04/04] Constructor Pretty_source.PTermLval now has an
additional argument, the property in which the term appears.
- Defs [2015/04/04] L-values for which defs are queried are now evaluated
only for the callstacks that are currently active, resulting
in possibly less locations.
-! Value [2015/03/08] Fix bug in -memexec-all option in presence of
instructions where evaluation was guaranteed to fail.
-! Inout [2015/03/08] The inputs of an instruction whose evaluation always
fail include the sub-expressions for which evaluation succeeds.
- Kernel [2015/02/26] Added -no-tty option to disable terminal capabilities
- Value [2015/02/23] Faster treatment of imprecise struct copying and
left shifts in the logic.
o! Kernel [2015/02/22] Function Integer.two_power now raises an exception
for overly big arguments.
- Kernel [2015/02/20] Add new suffix '.ci' for pre-processed files
containing ACSL annotations to be pre-processed.
-! Value [2015/02/18] In synthetic results, for local variables that are
not those of the current function, the approximated values
encompass only the callstacks for which the variables were
in scope in one of the callers.
- Value [2015/02/18] Local variables that are in scope but not yet
initialized are now present in the environment.
-! Value [2015/02/15] Option -subdivide-float-var has been renamed into
-val-subdivide-non-linear, and has now an effect on non-linear
integer expressions.
o! Value [2015/02/15] Removed function Cvalue.V.min_and_max_float. Use
Cvalue.V.project_ival and Ival.min_and_max_float.
- Cil [2015/02/11] Function Printer.change_printer now allows composing
printers, and is called Printer.update_printer.
- GUI [2015/02/11] Variables are now left- and right- clickable in
the 'information' panel.
- Value [2015/01/31] Improved reduction by assertions of the form
\initialized(&t[0..N]) when N is above -plevel.
o! Kernel [2015/30/01] Fixed bug #!2012 about combining
Ast.is_last_decl and Kernel_function.get_global.
- Value [2015/01/26] New option -val-initialization-padding-globals to
specify how padding bits should be initialized. Option
-initialized-padding-globals is deprecated.
-* Value [2015/01/26] Fix initial state in which some volatile qualifiers
for nested types were ignored.
-* Value [2015/01/26] Fix incorrect initialization of padding bits.
Option -initialized-padding was ignored in some cases.
-* Cil [2014/01/26] Fix iterators on C99 designated initializers.
- Value [2015/01/26] Improvements to option -subdivide-float-var, when
subdividing may avoid the emission of an alarm.
- Value [2015/01/21] Support for \subset predicate.
###################################
Open Source Release Sodium-20150201
###################################
- Kernel [2015/02/01] Tests are added to the distrib (make tests).
-* Logic [2015/02/09] The ACSL parser accepts qualifiers in logic C types.
- Value [2015/01/07] Special functions CEA_ are deprecated. Use
Frama_C_show_each or Frama_C_dump_each instead.
- Kernel [2014/12/28] Improve pretty-printing of some loops.
-* Kernel [2014/12/16] -load-module M now works fine if M uses the API
of another plug-in (bts #!1824).
-! Cil [2014/12/09] Default preprocessing command now includes Frama-C's
standard library, and when possible sets option '-nostdinc'.
See options -frama-c-stdlib and -cpp-gnu-like.
*! Cil [2014/12/09] Variables __FC_MACHDEP_FOO_BAR are now automatically
positioned when setting a non-standard machdep and using Frama-C's
standard library.
- Cil [2014/12/09] Option -pp-annot should be much faster when parsing
files with many ACSL annotations.
- Logic [2014/11/28] The ACSL parser now ignores /*@{ and /*@} comments,
to avoid conflicting with Doxygen.
- Value [2014/11/10] Accesses to locations that contain garbled mix now
cause the garbled mix to be reduced to the set of valid locations.
- Value [2014/11/07] Accesses to '*(foo *)p' may now reduce p according
to the validity of the access, when useful.
- Value [2014/11/07] Removed message "assigning non-deterministic
value from the first time".
- Value [2014/10/28] Option -slevel-merge-after-loop renamed to
-val-slevel-merge-after-loop. Now takes a set of kernel functions
as an argument.
- Value [2014/10/24] Per-callstack results are now always computed.
Option -val-callstack-results is deprecated.
- From [2014/10/24] New option -from-verify-assigns to give assigns/from
clauses of function with bodies a validity status.
-! Value [2014/10/24] Logic ranges are now evaluated using a dedicated
lattice. Results are almost always more precise, and the analysis
faster.
-* Kernel [2014/10/23] allow dynamically loaded module to start with a
lower-case letter. Fixes #1276.
-* Value [2014/10/15] Improved precision for variables that are reduced
(but not written) during a call memorized by option -memexec-all
- Value [2014/10/15] Indeterminate bits copied when option
-val-warn-copy-indeterminate is active now cause a reduction in
the source location.
- Value [2014/10/15] Arguments of functions that give rise to an alarm
are now reduced when possible.
- Value [2014/09/26] Reduce arguments of a function according to the
possible values of the formal at the end of the call.
- Value [2014/09/26] Better precision when a scalar value is written
through a garbled mix.
o! Value [2014/09/26] Remove experimental support for periodic bases.
-* Value [2014/09/25] Fix bug when writing precise values at too many
locations in packed arrays.
-* Value [2014/09/19] When for missing '\from' clause for '\result' when
result is used in a postcondition. Fixes bug #1908.
o! Value [2014/08/29] Garbled mix (constructor Top in modules
Location_Bits/Bytes) now explicitly mention the NULL base.
- Kernel [2014/08/15] New option '-then-last', which behaves like
'-then-on' on the last project created by a program transformer.
-* Value [2014/07/27] Text-only alarms that used the '\defined' predicate
(to warn about dereferencing pointers to out-of-scope variables)
are now emitted with the '\dangling_contents predicate.
- Logic [2014/07/27] The ACSL predicate '\specified', which has been
renamed to '!\dangling_contents' is now supported.
o! Value [2014/07/22] Value 'empty' is no longer exported in module
Offsetmap. The API should prevent any accidental creation.
- Inout [2014/07/22] Remove undocumented option -access-path
o! Value [2014/07/22] Most iterators of module Lmap and Cvalue.Model
now accept only the non-bottom and non-top cases.
o! Value [2014/07/22] API of module Cvalue.V_Or_Uninitialized is now
type-safe. Replace all occurrences of 'get_flags v' by 'v'.
o! Value [2014/07/22] Improve and clarify the return conventions of modules
Offsetmap, Lmap, Cvalue.V_Offsetmap and Cvalue.Model, by returning
three cases: `Bottom, `Top and `Map. The latter case indicates
the operation succeeded precisely'.
o! Value [2014/07/22] Functions find_base and find_base_or_default in
modules Lmap and Cvalue.Model now return an optional type, to
account for invalid bases (that may not be present in the map).
o! Value [2014/07/22] Some functions of modules Offsetmap, Lmap,
Cvalue.V_Offsetmap and Cvalue.Model now require a separate
Locations.Location_Bits.t and (integer) size, instead of a
Locations.location. This avoids errors when the case was
Int_Base.Top.
o Value [2014/07/22] Argument ~conflate_bottom to Cvalue.Model.find is now
optional. The documentation has been updated to better explain its
meaning.
- Value [2014/07/22] Message 'extracting bits of a pointer' is no longer
emitted, as it was redundant with the warnings about garbled mix.
-* Value [2014/07/22] Fix evaluation of '/' in the logic, that silently
ignored the presence of the value 0 in the divisor.
- Value [2014/07/22] The arguments of an invalid shift operation are now
reduced so that they belong to the proper range.
o! Value [2014/07/22] Multiple low-level functions have been removed from
modules Cvalue.V and Cvalue.Model, and are no longer available.
o! Value [2014/07/22] Function Cvalue.Model.find does *not* signal its
result is indeterminate anymore. Use function
Cvalue.Model.find_unspecified instead.
o! Value [2014/07/22] Major API change in directories src/ai and
src/memory_state. Functions no longer take ~with_alarms arguments.
Instead, they return booleans, that indicate an alarm occurred.
- Value [2014/07/22] More systematic emission of message 'operation [...]
incurs a loss of precision', signaling an arithmetic operation
on a pointer address. This message is now emitted by Value itself.
-! Kernel [2014/07/09] New way to handle command line options which
accepts sets of values. Values may be prefixed by '+' or
'-' to add/remove them and categories of values prefixed by
'@' are available as well (for instance @all).
o! Kernel [2014/07/09] A new bunch of functors are available to
define command line collections.
o! Cil [2014/07/03] Field 'vgenerated' of type Cil_types.varinfo has
been replaced by the field 'vtemp' to emphasize the fact that
it should only be set to true for temp variables generated
during elaboration.
o Cil [2014/06/27] Variables are created with a field 'vgenerated' set
to 'false' by default. Only Cil should position this field to
'true'.
o! Cil [2014/06/27] The field 'vlogic' of type Cil_types.varinfo has
been replaced by the field 'vsource', to avoid confusion with
logic variables. The value of the new field is the negation of
the previous one.
-! Cil [2014/06/17] Frama-C's x86 default machdeps no longer assume that
the compiler is GCC. Some typing extensions and builtin are thus
deactivated. If you want a GCC-centric analysis, use the
gcc-prefixed machdeps.
o! Cil [2014/06/17] Modifications in some fields of type Cil_types.mach.
Function File.new_machdep has a simpler type.
- Value [2014/06/17] Option -val-split-return can now be used to split
between NULL / non-NULL pointers
- Kernel [2014/06/16] New option -const-readonly (set by default), that
asserts that 'const' variables must never be written.
- Logic [2014/06/16] New logic label "Init", that refers to the state
just after the initialization of globals.
- Cil [2014/06/16] Values extracted from initializers of const variables
are now accepted as arguments of directives pragma loop UNROLL.
- Logic [2014/06/16] New builtin functions \min and \max of type
Set(Integer) -> Int
- Semantic Constant Folding [2014/06/12] Reducing the number of introduced
casts; feature #!1787.
- Value [2014/06/07] Improve conversion of float values that have been
written as integers (through low-level memory accesses)
- Value [2014/06/06] Improved pretty-printing of variables containing
pointers.
-* Makefile [2014/06/05] Do not install ZArith with Frama-C anymore.
o* Makefile [2014/06/05] Fixed compilation bug for plug-ins with both a
GUI and a non-empty API (bug #!1798).
- Value [2014/06/01] Improved widening on variables that are used to
access an array
- Value [2014/05/27] The GUI now showns the value of logic l-values
inside function specifications. They are evaluated in the
pre-state of the function, before the evaluation of preconditions.
o Gui [2014/05/27] Logic l-values inside function specifications can
now be selected
* Slicing [2014/05/23] Fix issues about slicing calls to the main function
and journalization (bug #!1684).
- Kernel [2014/05/22] Nicer error message in case of code
incompatibility when loading a plug-in.
-* Kernel [2014/05/15] Fix bug #1765 (spelling errors).
-* Slicing [2014/05/14] Fix crashes about multiple slicing pragma inside a
function (bug #1768).
- Report [2014/04/07] New option -report-callsite-preconditions.
- Report [2014/04/07] More consistent behavior when option -report-untried
is not set.
- Report [2014/04/07] Better reporting of reachability statuses; do not
coalesce unproven reachability assertions with other alarms.
- Value [2014/04/05] When option -val-callstack-results is set, the GUI
now displays a callstacks-wide consolidation of the possibles
values for expressions and terms. Previously, the potentially
less precise summary state was used.
- From [2014/04/05] Major performance improvements on big analyses.
-! Value [2014/04/05] Complete rewrite of the modules Int_Intervals and
Offsetmap_bitwise; both are now implemented with the same
datastructure as Offsetmap. Many performance improvements.
Many changes in the API of module Offsetmap_bitwise. Few changes
in Int_Intervals, but the englobing module Lattice_Interval_Set
has been removed.
- Gui [2014/03/27] New option -gui-project to run the GUI in a
given project.
- Semantic Constant Folding [2014/03/25] Reducing the number of introduced
casts; feature issue #!1697.
- Semantic Constant Folding [2014/03/25] New option -scf-project-name.
o! Cil [2014/03/24] The ikind for Cil.kinteger64 is now optional.
- Value [2014/03/20] File-scope and formal const variables are read-only.
Any possibility of writing there is treated as alarm.
-! Gui [2014/03/14] C expressions can now be selected through the source
panel.
-* Cil [2014/03/13] Fix erroneous integral promotion of type 'char' on
architectures where 'char' is unsigned.
- Semantic Constant Folding [2014/03/13] Generate nicer constants for integers
and pointers
- Semantic Constant Folding [2014/03/13] Floating-point constants can now
be propagated.
-* Semantic Constant Folding [2014/03/13] Fix crashes and/or multiple declations
when a global was referenced in the constant-folded project
earlier than in the original one.
- Value [2014/03/12] Improve precision of &.
o Logic [2014/03/04] Annotations.{iter,fold}_all_code_annot are now
by default sorted. Use ~sorted:false in case of efficiency issues.
-* Value [2014/03/02] Dividing an integer value by a memory address
requires the address to be comparable to NULL.
- Value [2014/03/02] Alarms are now re-evaluated at the end of the
analysis. If their truth value is 'Valid' or 'Invalid', this more
precise status is used, instead of the previous 'Unknown' one.
- Value [2014/03/01] Preconditions of functions that are never called are
now also marked as dead at each call-site.
- Rte [2014/03/01] Very big floating-point constants that are converted
to an integer are now reported as overflowing in only one
direction
- Value [2014/03/01] Alarms when converting integers to floating-point
are now reported only for the range that overflows
- Value [2014/03/01] Instructions whose execution is guaranteed to fail
are now displayed in the GUI
- Value [2014/03/01] Option -val-after-results is now always active by
default, and can no longer be unset
-! Kernel [2014/05/12] require ocamlgraph version 1.8.5
- Kernel [2014/08/07] add instructions for downloading the manuals
-* Configure [2014/03/17] use the gcc from the configure for compiling c files
-* Configure [2014/03/10] fix for autoconf < 2.67 when checking ability
of default pre-processor to keep comments
#################################
Open Source Release Neon-20140301
#################################
-* Value [2014/03/04] Fix bug when writing imprecisely in a struct
containing a 1-bit wide bitfield (bug #!1671)
-* Kernel [2014/02/18] Fix -machdep help in presence of other actions
(bts #1643).
+* Logic [2014/02/05] Better handling of sets. Use Tlogic_coerce to
explicitly mark conversion from singleton to set.
- Kernel [2014/02/04] Assigns clauses generated by the kernel for functions
with neither a specification nor a body receive an 'Unknown'
status.
- Value [2014/02/05] For functions for which only the specification is
available, non-invalid statuses are no longer reported when
evaluating a postcondition. Invalid statuses are reported, and
usually indicate a specification error.
-* Kernel [2014/02/05] Fix typing of variadic arguments.
- Configure [2014/02/05] New option --disable-local-ocamlgraph to
disable the use of the OcamlGraph version provided by
Frama-C.
-* Value [2014/02/04] Fix potential unsoundness in the operation testing
the inclusion of two memory states (never observed in practice)
o! Kernel [2014/02/03] The module Parameter_state now contains the
functions to select group of parameters (was in module Plugin).
o! Kernel [2014/02/03] The module Parameter_customize now contains the
functions to customize command line options (was in module
Plugin).
o! Kernel [2014/02/03] Parameter is now called Typed_parameter.
o! Kernel [2014/02/03] The module Parameter_sig now contains the
signatures of command line options (was in module Plugin).
- Kernel [2014/02/03] FRAMAC_PLUGIN may now specify a list of
comma-separated directories instead of a single one.
o* Logic [2014/01/30] Better specification and more checks on
Annotations.{add,remove}_* functions (fixes bug #!1635).
o! Kernel [2014/01/29] Changes to the signatures in lattice_type: top and
bottom are now optional, a join_and_is_included function is
required, and Upper_Semi_Lattice was renamed to Join_Semi_Lattice.
-* Value [2014/01/25] Remove support for ACSL \inter operator, which could
lead to unsoundness with predicates involving the empty set
(fixes bug #!1624)
- Value [2014/01/25] Fix spurious messages about integer overflow when an
arithmetic operation is guaranteed to result in an undefined
behavior.
o! Kernel [2014/01/21] Removed Db.Dominators. Use the Dominators kernel
module instead.
-* Value [2014/01/18] Fixed spurious warning about floating-point values
containing addresses.
-* Kernel [2014/01/18] Fixed parsing bug with decimal single-precision
floating-point literals representing numbers above MAX_FLOAT.
-! Value [2014/01/16] Replace mostly-inoperant option -memory-footprint
by an environment variable FRAMA_C_MEMORY_FOOTPRINT
o Ptests [2014/01/16] Use ptests.opt whenever possible.
o! Kernel [2014/01/14] For building a datatype, you now need to use
smart constructors provided in Structural_descr.
-* From [2014/01/11] Fix incorrect dependencies with code of the form
'f(); x = 1; f();' when f assigns a value with a right-hand side
that depends on x.
-* Value [2014/01/11] Fix missing read/written zones and dependencies when
accessing a completely imprecise pointer (garbled mix) and using
option -absolute-valid-range. Impacts the results of plugins
Inout, From, Pdg, Impact and Slicing.
o! Value [2014/01/08] Harmonisation and simplifications of functions
related to memory states in Cvalue.Model. Different functions
are now available for updating, refining and creating a state
-* Value [2014/01/07] Fix crash on analyses involving very imprecise
pointers and a partially valid absolute memory range
-* Cil [2014/01/06] Fixes issue #1589 (do not drop access to volatile
lvals in pure expressions).
- From [2014/01/01] Fix possibly invalid dependencies for functions
that return partially-written structs.
o Kernel [2013/12/23] Plug-ins may now have a non-empty .mli interface.
It deprecates the old way to register them through module Db
or Dynamic (this last one may remain useful for mutually
recursive plug-ins).
-* Value [2013/12/23] Fix possible unsoundness in presence of &.
(unsoundness never observed in practice)
- Value [2013/12/23] Improve precision of treatment of x = e1 & e2;
- Value [2013/12/23] Improve precision of treatment of:
if ((int)floatvar == intexpr)
- Value [2013/12/13] Ensure convergence in presence of some non-natural
loops
-* Cil [2013/12/12] Do not pretty-print while(1) into while(c) when
the 'break' branch is not reduced to a single break, or contains
an annotation
-! Syntactic_callgraph [2013/12/10] Remove option -cg-services-only which
was unused since a while.
-* Value [2013/12/09] Fix rare crash during widening operation in
C union intensive code
-* Value [2013/12/03] Fix potentially invalid source line number in origin
of Merge garbled mix values.
- Value [2013/12/03] Display information about temporaries when emitting
an alarm
- Kernel [2013/12/03] "-machdep help" now specifies the default
machdep (bts #!1558).
- Obfuscator [2013/12/03] New option -obfuscator-string-dictionary to generate
the dictionary of literal strings into a separated file.
- Obfuscator [2013/12/03] New option -obfuscator-dictionary to generate
the dictionary into a file.
-* Kernel [2013/12/03] Fix bug which may occur when pretty printing
range of terms.
- Obfuscator [2013/12/03] Warn about unobfuscated symbols.
- Obfuscator [2013/12/03] Handle literal strings in a separate dictionary
(bts #!1564).
-* Obfuscator [2013/12/03] Now properly handle option -ocode.
- Obfuscator [2013/12/02] Obfuscate (most of) logical constructs (bts #1563).
- Obfuscator [2013/12/02] Obfuscate labels (bts #1562).
- Obfuscator [2013/12/02] Print the category which each symbol belongs to
(bts #!1566).
-! Value [2013/12/01] Volatile pointers are now modeled as the base
addresses that are stored into the pointer, shifted by an
unspecified offset.
o! Value [2013/11/28] Functions previously required by some functors in
directories src/ai and src/memory_state are no longer needed.
Use script bin/fluorine2seon.sh for partially automatic migration.
- Scope [2013/11/27] Option -inout-callwise can be used to improve
the precision of computations, including the effects of option
-remove-redundant-alarms. Option -calldeps is no longer necessary
- Value [2013/11/27] Experimental option -slevel-merge-after-loop
- Value [2013/11/25] Improve precision of bitwise conversion from
floating-point value to integers
-* Value [2013/11/22] Ensures that sqrt(-0.) is -0., even with buggy
MSVC runtime. Fixes bug #!1396
- Kernel [2013/11/20] Support for binary literal constants in C and
in logic denoted by '0[bB][01]+' (common ISO/C extension).
- Value [2013/11/14] Copies of non-struct left-values that contain
indeterminate bits can now be reported using option
-val-warn-copy-indeterminate.
-! Value [2013/11/14] Passing a struct containing uninitialized fields
or padding bits to a function without a body no longer raises
an alarm.
- Value [2013/11/14] The option -val-left-shift-negative-alarms has been
renamed into -val-warn-left-shift-negative
-! Value [2013/11/14] Pointer subtraction now requires that the pointers
refer to the same allocated block, and returns the pointwise
difference between the corresponding offsets. Use
-no-val-warn-pointer-subtraction to obtain the previous behavior.
-! Value [2013/11/13] No alarms are emitted for overflowing unsigned
left shift operations.
-* Rte [2013/11/13] No assertions are generated for unsigned left-shift
that may overflow, regardless of whether -warn-unsigned-overflow
is set. Fixes issue #!1555.
-* Value [2013/11/13] Prevent GUI crashes when options -no-results or
-obviously-terminates are set and some functions have
ACSL preconditions
-* Value [2013/11/12] Fixed bug involving the conversion to
float of a double expression e s.t. 0 < fabs(e) <= 0x1.0p-150.
-* Kernel [2013/11/12] The parsed value could be wrong and the warning
for inexact decimal floating-point constants be wrongly omitted
for constants smaller than the smallest subnormal.
-* Logic [2013/11/08] Support for _Bool in ACSL formulas
-! From [2013/11/08] Separately compute data dependencies and indirect
(address, control) dependencies with option -show-indirect-deps
o Kernel [2013/11/08] parameters can be preserved across project creation
through copy visitor (do_not_reset_on_copy function). fixes
do_not_projectify and do_not_reset_on_copy status of
Kernel's options.
-* Logic [2013/11/06] do not cast an enum value toward its associated
integral type when comparing to an enum constant. Fixes #!1546
-* Kernel [2013/11/06] Fixes loop unrolling having in their body 'switch'
with 'continue' stmts.
- Report [2013/11/05] New option -report-untried
-*! Logic [2013/10/29] -check checks that C and associated logic variable
agree on their type. transfer completion of type up to
associated logic var and term when needed. Fixes #1538
-* Logic [2013/10/29] Do not remove labels out of scope of annotations
too quickly. Fixes #1536
-* Kernel [2013/10/29] Do not fail on nested ternary operators whose
value is dropped, as in #1503
-* Logic [2013/10/29] Accept struct with same name as typedef in specs.
Fixes #1518
-* Kernel [2013/10/29] Do not consider array variable as read lval in
unspecified sequence. It can't be written anyway. Fixes #!1519
o* Value [2013/10/27] Type Base.string_id is now concrete. No more need
for function Base.cstring_of_string_id
-* RTE [2013/10/28] Better normalization when using -rte-precond.
- Kernel [2013/10/27] Generate more agressive assigns clauses for
unspecified library functions that arguments with type pointer
to void or char
-* Kernel [2013/10/26] Do not generate invalid assigns clauses when some
formals are pointers to arrays
- Kernel [2013/10/22] Support for static evaluation of the
__builtin_compatible_p GCC specific function.
- Kernel [2013/10/22] Add -agressive-merging option to merge two
inline functions if they are equal modulo alpha conversion.
-* Kernel [2013/10/17] Correctly distinguish typenames and declared
identifiers in declarations. Fixes #1500
-* Kernel [2013/10/17] Statements with a label attached to them are
never erased during elaboration. Fixes #1502.
-* Slicing [2013/10/17] Slicing is now compatible with option -val-use-spec
- From [2013/10/15] Better precision when querying information about
a zone that has the same dependencies as its neighbors.
o! Value [2013/10/15] Function Map_Lattice.Make requires a new argument
- Value [2013/10/14] Evaluation of left-values such as t[i][j] or
p->arr[i] is now more precise when the total number of locations
to read or write is less than the value of -plevel option
- Value [2013/10/13] Syntactic loops (ie. 'for', 'while' and
'do ... while') are now always used to perform widening,
regardless of whether they are reducible
-! Impact [2013/10/11] More generic dynamic function impact_statement_gui.
The set of nodes impacted can now be filtered by a memory zone.
-! Journal [2013/10/09] By default, the journal is now generated into
the Frama-C session directory.
o*! Makefile [2013/10/03] Split Makefile.common in two parts in order to
include generic rules (new Makefile.generic file) at the end
of main Makefile, so specialized patterns will be considered
first in make < v3.82
-*! Logic [2013/10/02] Disallow cyclic logic type definitions
-! Gui [2013/10/01] the configuration file .frama-c-gui.config is
now put in the GUI config directory and named frama-c-gui.config.
o Kernel [2013/10/01] Plug-ins may now have their own configuration
directory in which they can generate configuration files
during a Frama-C session.
o Kernel [2013/09/30] Plug-ins may now have their own session
directory in which they can generate project-dependent files
during a Frama-C session.
o* Doc [2013/09/27] Fix ugly display of documentation of dynamic
plug-ins API (bts #!1394).
-* Value [2013/09/26] Fix crash when evaluating \valid(p->off) when
p is NULL or a valid pointer, and p->off is itself only partially
valid (bug #1486).
-* Kernel [2013/09/26] Reject identifiers in the same namespace and same
scope, according to C standard's rules. fixes bug #1330.
o! Kernel [2013/09/26] Alpha.{new,register}AlphaName: transform labelled
argument 'undolist' with option type into optional argument.
-* Kernel [2013/09/26] Fixes issue #1451 about -unicode which was not
taken into account by -load-script.
-* Kernel [2013/09/24] Fixes binding of formals when linking static
prototypes. Fixes issue #1475
o* Scope [2013/09/21] Functions registered in Db now return Stmt.Hptset
values instead of Stmt.Set
o* Value [2013/09/21] Minor signature change for widening functions
- Metrics [2013/09/19] More precise information about coverage
-o Value [2013/09/18] Fix bug in which two distinct memory states could be
erroneously made equal
-* Slicing [2013/09/12] Slicing on a composite statement containing dead
code now works properly
o* PDG [2013/09/12] Function Db.Pdg.find_stmt_and_blocks_nodes
returns a correct result on partially dead composite statements
- Slicing [2013/09/12] -slice-calls main only selects the calls to the
main function, nothing more.
o* Kernel [2013/09/11] Fixed buggy function Property.location.
- Logic [2013/09/10] Improve localisation of error messages during
logic typing.
- Value [2013/09/07] Degeneration points are now shown in the GUI
- Value [2013/09/07] Value analysis can now be aborted while keeping
intermediate results, by sending SIGUSR1 to Frama-C
- Value [2013/09/06] More agressive evaluation of \initialized(p)
when p points to a memory zone containing both bottom and
non-bottom values
o! Value [2013/09/06] Function Cvalue.Model.find_unspecified now requires
one additional argument ~conflate_bottom
- Value [2013/09/06] Warn for missing '\from' or 'assigns \result \from'
clauses. Fixes wish #1448
-* Logic [2013/09/02] Conversion from C array to pointers do not lose
cast on pointed types. Fixes issue #1469
o* Cil [2013/08/30] Terms containing ACSL keywords are now properly
parsed by function Logic_lexer.lexpr
o* Cil [2013/08/26] Statements containing calls to va_start can now be
printed outside of a function
-* Pdg [2013/08/26] Fix possible non-termination during the computation
of the control dependencies (bug #1436)
- Metrics [2013/07/29] ACSL statistics
-! Value [2013/07/24] Fewer and better widening bounds for pointer
addresses: try the frontier of the block
-! Value [2013/07/24] Better widening bound for signed 32 bits integers
-* Kernel [2013/07/18] More clever merge of function contracts.
Fixes issue #1455
o Lib [2013/07/18] Filepath.normalize can replace paths by a symbolic
name.
o Ptests [2013/07/16] add the possibility to define macros in
configurations. See developer documentation.
-* Kernel [2013/07/11] designated initializers are correctly pretty-printed.
Fixes issue #1457
-* Semantic Constant Folding [2013/07/10] Fixes error when folding fct pointer
resulting in two distinct kf for the same function.
o* Kernel [2013/07/08] Cil.mkEmptyStmt gets a valid_sid argument in
order to generate valid statements.
-* Kernel [2013/07/05] Tmp vars created during typecheck all have a
description. Fixes bug #!1387
-* Kernel [2013/07/04] more informative error message. Fixes bug #1352
-* Kernel [2013/07/04] implicit annotation status is not lost through
code transformations anymore. Fixes bug #!1442
o Kernel [2013/07/04] Added hooks when registering/removing a property
o Kernel [2013/07/03] Added StringList.append_{before,after} for
manipulating options (both static and dynamic API)
- Kernel [2013/06/27] An 'unknown' local status is set on assigns generated
from the C prototype of leaf functions
o Kernel [2013/06/25] Add hooks to register transformation to be performed
on a freshly computed AST. See src/kernel/file.mli
o Kernel [2013/06/25] Add hook builders for hooks that can have
dependencies. See src/lib/hook.mli
o Kernel [2013/06/21] adding a category do not set debugging level to 1.
Conversely debug ~dkey "..." (without ~level) will output "..."
if dkey is requested by the user, even if debugging level is 0.
-* From [2013/06/21] Position the 'and SELF' flag when an assigns clause
z1 and z2 overlap in an assigns clause z1 \from z2 .
- Value [2013/06/21] Better documentation of module Hptmap. Some
incompatible API changes.
- From [2013/06/20] Slowndowns in the analyses can be mitigated using
higher values for option -memory-footprint
- Value [2013/06/20] Option -memory-footprint now accepts much bigger
arguments. The size allocated to each cache is multiplied
by 2 between each increment.
-! Kernel [2013/06/20] Renamed argument ~cache of functions cached_fold
into ~cache_name. The previous integer is no longer used.
-* Kernel [2013/06/20] Fix consolidation algorithm of property statuses
which possibly occurs on cycles involving an unproved property
(bts #1443).
-* Kernel [2013/06/20] Fix incorrect dot output of consolidation graph
of property statuses.
-* Kernel [2013/06/19] Fix pretty-printing of comments in ghost code
(bts #1378 and #1404).
- RTE [2013/06/18] Remove limitation about alarms which do not fit
into 64 bits (bts #1391).
- Kernel [2013/06/18] Better strategy when -save is set and Frama-C
crashes (bts #1388).
-* Project [2013/06/17] Fix messages about projects.
-* Slicing [2013/06/17] Fix crash in presence of assertions involving
sizeof(t), where t is an array. Fixes similar bug with option
-remove-redudant-alarms
-! Inout [2013/06/13] Inputs of an instruction whose evaluation fails
now include the sub-expressions for which evaluation succeeds
-* Value [2013/06/12] Fix crash when the creation of the initial state
encounters a completely invalid compound initializer.
- Value [2013/06/11] The name of an evaluated property is now displayed
in the log message. Fixes wish #1415.
- Value [2013/06/11] Assertions on dead code now get a "true because
unreachable" status.
- Kernel [2013/06/23] The annotation 'loop pragma UNROLL "done", n;'
disables the unrolling of the annoted loop. Option -ulevel-force
has to to used for enabling the transformation of such a loop.
This pragma is introduced by the unrolling process in order to
prevent unrolling on source code obtained by a previous frama-C
run.
- Value [2013/06/05] Preliminary support on \forall and \exists
quantification when the introduced variables have a C type.
o! Value [2013/06/05] API change in module Base. Use script
bin/fluorine2seon.sh for automatic migration.
- Value [2013/05/26] Evaluation of \base_addr, \offset and \block_length
logic predicates.
o! Cil [2013/05/26] Rename function sizeOf_int into bytesSizeOf.
- Value [2013/05/26] Basic support for \inter logical predicate (treated
as an union).
- Value [2013/05/25] Distinguish unreachable state and invalid location
when printing the value of a l-value in the GUI
- Value [2013/05/25] Frama_C_show_foo functions now display struct
arguments in extenso.
-* Value [2013/05/24] Failure during a memory zone copy is now properly
notified. Alarms were emitted, but a non-bottom result was
simultaneously returned.
- Slicing [2013/05/24] Better slicing of complex logical assertions
(bug #690).
o! Value [2013/05/23] Do not crash when printing arrays or structs
containing abstract structs (bug #1416).
-! Kernel [2013/05/20] Support parsing and printing "asm goto" from gcc 4.6.
Added a component to Cil_types.Asm constructor.
- Pdg [2013/05/03] Shorter output when outputting results
o! Pdg [2013/05/03] Results of Pdg cannot be intercepted by
Log.add_listener anymore. Use Db.Pdg.get and Db.Pdg.pretty
instead.
o! From [2013/05/03] Results of From cannot be intercepted by
Log.add_listener anymore. Use Db.From.{pretty,display} to print
them.
o! Value [2013/05/03] Results of Value cannot be intercepted by
Log.add_listener anymore. Use Db.Value.display to print them
o! Value [2013/05/03] Remove functions Cvalue.Model.pretty_without_null and
Db.Value.display_globals. Function Db.Value.display is now a
reference to the real function. Removed last argument of
Cvalue.Model.pretty_filter.
#####################################
Open Source Release Fluorine-20130601
#####################################
-* Value [2013/06/11] Add missing C library files.
#####################################
Open Source Release Fluorine-20130501
#####################################
- Value [2013/05/22] Better precision for ^ (bitwise xor) operator
when applied on intervals of positive integers
-* RTE [2013/05/22] Fix off-by-one error in alarms on overflowing
unsigned unary minuses.
-* Value [2013/05/21] Catch evaluation errors when selecting a logic
l-value in the GUI.
o* Kernel [2013/05/06] Fixed Type.pp_ml_name for polymorphic types
with 3 and 4 type variables (bug #1127).
-* Makefile [2013/05/06] Fixed installation directory of the doc in
plug-in's Makefile (bug #1278).
#####################################
Open Source Release Fluorine-20130401
#####################################
o! Cil [2013/04/11] Remove Cil pretty-printer. Use module Printer
instead. The script bin/oxygen2fluorine.sh may be used to
automatically convert your code.
- Cil [2013/04/09] Handles interpretation of linemarker ending by //
and cleanup file paths.
- Value [2013/03/26] Highlight non-terminating calls.
- Value [2013/03/26] The location in which the result of a call is stored
is now evaluated before the call. A warning is emitted if this
location has changed after the call.
- Logic [2013/03/26] Improved merge strategy for assigns, and report
the presence of different assigns clauses between two files.
- Value [2013/03/23] Better precision for postconditions in functions
with multiple return analyzed without slevel.
-* Value [2013/03/20] Fix incorrect interpretation of \valid{L}(P) when
L is not Here label.
-! Value [2013/03/20] The first element of a -lib-entry allocated array,
or of an array passed as an argument to main, is now valid
regardless of option -valid-context-pointers.
-* Slicing [2013/03/18] Fix incorrectness in presence of assertions involving
\initialized predicate. User predicates are no longer treated.
-* Value [2013/03/15] Fix incorrectness of option -remove-redundant-alarms
in presence of '\initialized(...)' alarms.
- Value [2013/03/15] Optionally warn against unsigned overflows according
to option -warn-unsigned-overflow.
- Cil [2013/03/14] The type of fields that are bit-fields now carry an
informative attribute FRAMA_C_BITFIELD_SIZE.
-* Value [2013/03/09] Fixed misleading "after statement" state on
statements followed by an assertion.
-* Value [2013/03/09] Option -memexec is now correct in presence of RTE
alarms.
-! Value [2013/03/09] Consolidated states are now stored before 'assert'
clauses are evaluatued.
-* Slicing [2013/03/03] Fix options -slice-assert and -slice-threat
(-threat did nothing, -assert selected all alarms).
-! Sparecode [2013/03/03] Alarms are now ignored during the analysis.
-* Value [2013/03/03] Fix incorrect reduction in integers containing
pointers address when option -warn-signed-overflow is set.
-! Value [2013/03/03] Signed overflows now cause an alarm. Option
-no-warn-signed-overflow can be used to get 2's complement.
-! Kernel [2013/03/03] Signed overflow alarms are now emitted by default.
-! Kernel [2013/03/03] Signed downcast alarms are no longer emitted by
default. Use option -warn-signed-downcast to activate them.
- Kernel [2013/03/02] Print signed downcast alarms as 'signed_downcast'
-! Value [2013/03/02] Removed option -val-signed-overflow-alarms.
Use -warn-signed-overflow instead.
-! Rte [2013/03/02] Removed options -rte-signed, rte-unsigned-ov,
-rte-downcast and -rte-unsigned-downcast. They are replaced
by -warn-signed-overflow, -warn-unsigned-overflow,
-warn-signed-downcast and -warn-unsigned-downcast respectively.
-* Rte [2013/03/02] Added missing alarm for casts from overly large
floating-point numbers to integer. Fixes #!1318.
-* Value [2013/02/28] Initial state of Value does not depend on -main
option, but depends on -context-<...>.
- Value [2013/02/27] Emit proper alarms for completely imprecise
floating-point values, and for casts from float to int.
-* Impact [2013/02/23] Prevent crash when a caller or callee function has
been imprecisely analyzed.
- Pdg [2013/02/23] Ignore inline asm statements (previous behavior was
to generate Top Pdgs).
-* Value [2013/02/23] In -lib-entry mode, void* fields or pointers now
point to something potentially valid.
- Value [2013/02/22] Option -val-ignore-recursive-calls now uses the
assigns clauses of the recursive function to treat the call.
- Value [2013/02/17] Improved support for va_arg variadic macro.
-! Value [2013/02/17] Renamed options -initialized-padding-globals
and -no-no-results into -uninitialized-padding-globals and
-val-store-results respectively.
-* Value [2013/02/17] Improved again support for abstract structs.
o! Value [2013/02/15] Generic types of Value are now in Value_types
(previously Value_aux). Implies a signature change for
Db.Value.register_builtin. Value_aux.accept_base is now in
Db.Semantic_Callgraph.
- Value [2013/02/13] Offsets in misaligned values that repeat themselves
are now always printed relatively to the beginning of the binding.
- Value [2013/02/12] Suppress superfluous warning when passing as
argument a struct that contains pointers.
-* Metrics [2013/02/12] Global variables both declared and defined were
counted twice.
-* Metrics [2013/02/11] Option -value-metrics now report a correct location
for function referenced by an initializer. Fixes #!1361.
o! Value [2013/02/08] Renamed Locations.valid_enumerate_bits into
Locations.enumerate_valid_bits.
o*! Kernel [2013/02/08] Must register keywords introducing new clauses of
ACSL contracts. Fixes issue #!1358.
o! Kernel [2013/02/08] redesign of message categories.
See detailed changelog for more information.
o! Cil [2013/02/07] Clean up registering of new machdeps. Some machdep
options have been integrated into Cil_types.mach, or removed from
Cil.theMachine (as they were already in Cil_types.mach).
- Value [2013/02/06] Improve reduction by conditions that involve '&'
and '|' operators.
-* Value [2013/02/06] Fix validities of degenerate variables, which were
too big considering the size of the memory.
-* Impact [2013/02/06] Prevent crash when considering a function with an
unreachable first statement.
o! Logic [2013/02/04] Change Property_status.Consolidation_graph.dump
now takes a formatter instead of a file name.
- Value [2013/02/02] Improved support for abstract structs.
o! Value [2013/02/02] Removed Base.All validity. Use big validities
with unknown flag instead. Improved signature of Base.Unknown.
o! Cil [2013/02/02] Renamed function Cil.alignOf_int into bytesAlignOf.
o! Cil [2013/02/02] Remove unused 'alignof_char_array' machdep field.
-* Value [2013/02/01] Fix erroneous casting operating when interpreting
logic casts.
-* Kernel [2013/02/01] Ghost status is appropriately propagated in
statements (instead of only instructions) and pretty-printed
accordingly. Fixes issue #1328.
- Value [2013/02/01] Value more agressive evaluation of construct
'//@ for b: assert p' when b is guaranteed to be active.
Harmonize behaviors-related messages.
- Kernel [2013/01/29] The level of verbose is at least the level of debug.
-* Value [2013/01/28] Ignore 'const' qualifier on extern globals in
lib-entry mode. Previously, those globals were initialized to 0.
- Obfuscator [2013/01/28] Hide variables that do not appear in the output
from the dictionary.
-* From [2013/01/28] Fix rare bug in presence of involved control-flow
graphs and non-terminating calls.
o! Slicing [2013/01/21] Remove no longer used ~ai argument.
-!*Value [2013/01/21] Various changes in the way undefined functions
returning pointers are handled.
- Value [2013/01/20] Alarms emitted by Value are no longer evaluated
during analysis (unlike user assertions).
- Value [2013/01/20] More aggressive reduction in presence of write
through partially invalid pointers. Warn if the pointer is
completely invalid.
-* Value [2013/01/20] Option -absolute-valid-range can now be changed
between two executions of Value.
-! Slicing [2013/01/19] Alarms are now removed in the generated project
(regardless of option -slicing-keep-annotations).
-! Sparecode [2013/01/19] RTE or Value-generated alarms are now removed
in the generated project.
o! Value [2013/01/17] Builtins must now warn if their results should not
be cached (signature change in Db.Value.builtin_result).
o* Kernel [2013/01/16] Visitor no longer crashes when a non-function global
is replaced by a list containing at least one function or
prototype (fixes bug #!1349).
!* Kernel [2013/01/10] Add lv_kind field to trace origin of logic variables.
Cil_const.make_logic_var is deprecated in favor of specialized.
-* Kernel [2013/01/10] Fixed bug #!1347 about accessing to a consolidated
status of a property which depends on removed hypotheses.
o! Kernel [2013/01/10] Remove method is_annot_before from visitors
(it return only 'true').
-* Makefile [2013/01/08] Compile OcamlGraph less often: fixes issue #1343.
- Value [2013/01/08] More agressive analysis of statements with improperly
sequenced accesses when option -unspecified-access is used.
o Kernel [2013/01/04] New methods videntified_term and
videntified_predicate for the visitor.
-* Kernel [2013/01/04] Fixed discrepancy between compare_type and hash_type.
Added new datatype TypNoUnroll.
o Kernel [2013/01/03] Added pp_field and pp_model_field in Printer_api.
o Kernel [2013/01/03] Added type modules
Cil_datatype.Wide_string and Datatype.List_with_collections.
-* Logic [2013/01/03] Fixes various type-checking issues in presence of
polymorphism and implicit conversions (including #1146).
o! Kernel [2012/12/21] Module Cilutil has been removed. Previously used
list functions can now be found in Extlib (use script
oxygen2fluorine.sh for migration). Functions related to
configuration files are now Cilconfig.
o! Impact [2012/12/21] Function Db.Impact.compute_pragmas now returns
a list of statements.
-* From [2012/12/21] Fix absence of effect of option -calldeps after
a save/load cycle.
-* Inout [2012/12/21] Fix absence of effect option -inout-callwise after
a save/load cycle.
o! Kernel [2012/12/13] Reorganize AST's pretty-printers. You must now use
module Printer. Use the script oxygen2fluorine.sh to upgrade
your plug-in.
o! Kernel [2012/12/13] Remove Cilutil's pretty printing helpers. Use
Pretty_utils' ones instead.
- Inout [2012/12/12] Indirect reads (for example 'p' for '*p') are now
automatically added to inputs when evaluating assigns.
- Value [2012/12/12] Evaluation of assigns now include indirect reads
(ie 'assigns *p' depends on p) automatically.
- Value [2012/12/07] Improve handling of conditionals when option
-val-ilevel is used.
- Pdg [2012/11/28] InCtrl nodes are no longer displayed in Dot graphs.
o! Kernel [2012/11/24] Various types whose names started by t_ in
PDG/slicing related modules are now unprefixed.
o Rte [2012/11/23] Export function "exp_annotations" to get RTEs of a C
expression as annotations.
o*!Kernel [2012/11/23] Added TLogic_coerce constructor to mark
explicitely a conversion from a C type to a logical one
(in particular floating point -> real and integral -> integer).
Fixes issue #1309.
o! Kernel [2012/11/22] Remove unintuitive ?prj argument from Cil visitors,
and first argument of Visitor.generic_frama_c_visitor. Information
is now stored inside the type Cil.visitor_behavior.
-* Value [2012/11/20] Fix evaluation of logic constant characters
above 127.
-* Value [2012/11/20] Fix soundness bugs for comparisons with logic
constants that are not representable as 64 bits double.
o! Kernel [2012/11/20] Signature change for constructor LReal.
- Rte [2012/11/16] Generate Value-compatible alarms and annotations.
- Kernel [2012/11/16] Syntactic constant folding is done once by AST
(fixed bug #!1306).
- Value [2012/11/13] More precise line numbers for statuses of assertions
and loop invariants.
- Value [2012/11/09] New option -val-callstack-results to record and
display in GUI the results split by callstacks.
o Kernel [2012/11/08] New function Annotations.model_fields.
-! Rte [2012/11/06] Remove option -rte-print. Use -print instead.
-* Kernel [2012/11/06] Do not print help of negative options when the
positive one is invisible (fixed #1295).
o! Kernel [2012/11/05] Get rid of useless rooted_code_annotation datatype.
-* Aorai [2012/10/31] Adds locations modified by Aorai to existing
loop assigns (fixes issue #1290).
o Kernel [2012/10/31] Renamed Kernel_function.self to
Kernel_function.auxiliary_kf_stmt_state to avoid confusion.
o Kernel [2012/10/31] New function 'get' for projectified counters.
- Kernel [2012/10/29] Better frama-c.top (fixed issue #1287).
-* Kernel [2012/10/26] Do not attempt to merge unrelated anonymous enum
that have been given the same name by Cil (fixes #1283).
- Logic [2012/10/26] Extended syntax for naming terms and predicates
("string":pred and "string":term are now allowed).
o! Kernel [2012/10/18] New API for module Alarms.
- Kernel [2012/10/18] When printing the AST, display the emitter name
of generated annotations and also the origin of
annotations corresponding to an alarm.
o* Kernel [2012/10/18] Fixes incorrect visitor behavior with JustCopy
(issue #1282).
- Value [2012/10/16] Reduce more agressively on accesses *p where p is
imprecise but contains only one valid value.
-* Value [2012/10/16] Correct potentially incorrect reduction on l-values
of the form *(p+off) or *(p-off).
-* Kernel [2012/10/16] Fixed bug with Type.pp_ml_name for pairs,
triples and quadruples which can lead to incorrect journal
generation (new occurrence of bts #1127).
o Kernel [2012/10/12] Optional argument 'reorder' to File.* functions
creating an AST in a new project from a visitor.
-* Value [2012/10/12] A bug causing the number of superposed states to be
slightly underestimated has been fixed. As a result, it may be
necessary to up the -slevel argument a little bit for existing
proof scripts.
- Kernel [2012/10/11] Option -enums for choosing representation of enums.
-* Scope [2012/10/10] Prevent crash in defs computation when a lvalue is
a formal.
o* Makefile [2012/10/01] Fix installation directory of API documentation
(fixed bts #1278).
- Kernel [2012/10/01] Assumptions and axioms now get consolidated status
"Considered valid" instead of "Valid".
-* Value [2012/10/01] Fix "Semantic level unrolling superposing up to"
messages. The number displayed was sometimes lower than
the actual number of superposed states.
-* Gui [2012/10/01] In some cases, after a crash of an analyzer,
the GUI was not fully restored, became inconsistent and could
crash.
o! Value [2012/09/30] Remove various instances of Top_Param, which were
all equal to Base.SetLattice.
o Pdg [2012/09/30] Fix display for control dependencies in PDG graphs.
o Kernel [2012/09/20] Provide Datatype.triple and Datatype.quadruple
(bts wish #1277).
o* Kernel [2012/09/20] Fixed consistency check of descriptor when
building polymorphic datatypes (fixed bts #1277).
###################################
Open Source Release Oxygen-20120901
###################################
-! Kernel [2012/09/17] Remove useless negative options -no-help,
-no-version, -no-print-share-path, -no-print-lib-path and
-no-print-plugin-path.
- Kernel [2012/09/13] All globals with attribute FC_BUILTIN are preserved
even if unused.
- Value [2012/09/13] Print misaligned values in a simpler way. Fixes
wish #!1271.
o!* Cil [2012/09/12] Split constants of logic and C (fixes bts #745).
o! Cil [2012/09/12] Remove type Cil_type.typeSig. Use the functions in
Cil_datatype.Typ and Cil_datatype.Logic_typ to compare types.
-* Kernel [2012/09/07] Identical messages emitted in two different projects
will now be visible in both projects. Fix bug #1104.
o Kernel [2012/09/07] Improve signature of State_builder.Set_ref.
o* Kernel [2012/09/07] Correct hash function for Sets created by
Datatype.Make_with_collections or Datatype.With_collections.
o* Kernel [2012/09/06] Datatype with structural comparison
for exp and lval fixes bts #1263.
-* Kernel [2012/09/06] Fine tuning AST dependencies. See developer guide.
-* Kernel [2012/09/05] Fixed missing undefined behavior
for multiple write accesses (fixes bts #1059).
-* Metrics [2012/09/05] Fixes count of pointer accesses.
- Value [2012/09/05] Clarified message about completely indeterminate
memory.
-* Kernel [2012/09/03] Do not accept spurious '}'. Fixes bts #1273.
o! Kernel [2012/09/03] Remove obsolete constructors Cabs.TRANSFORMER and
Cabs.EXPRTRANSFORMER and related parsing rules.
- Value [2012/09/02] Warn when 'assigns *p' points to a completely
invalid location.
- Value [2012/09/01] Assertions such as \valid(p) now evaluate to Invalid
when p is not initialized or an escaping address.
-* Value [2012/08/30] Fix crash when evaluating *((int*)0+x)=v when the
NULL base is invalid.
-* Kernel [2012/08/29] Fixed #!1267 (adds explicit casts for default
argument promotions).
o! Value [2012/08/29] Signature change for function
Db.Value.register_builtin: builtins can now return multiple
states.
o! Value [2012/08/20] Rename Db.Value.assigns_to_zone_inputs_state to
Db.Value.assigns_inputs_to_zone. Add new functions
Db.Value.assigns_outputs_to_zone and
Db.Value.assigns_inputs_to_locations.
-* Kernel [2012/08/21] Fixed bug with save/load: loading a file <f>, then
quitting Frama-C can no longer modify <f> (bts #!1269).
+* Logic [2012/08/08] Fixed bts #!1262 about logic preprocessing
and string escapes.
- Value [2012/08/02] Statutes 'Invalid' are now positioned on 'for behav:'
assertions even when 'behav' is not the only active behavior.
o* Cil [2012/08/02] Fixed bts #1254: incorrect documentation of
Cil.d_plaininit.
-* Logic [2012/08/01] Fixed bts #!1253: IndexPI and PlusPI are equivalent.
o* Kernel [2012/08/01] Fixed bts #!1250: setting formals of visited
function is not delayed until fill_global_tables anymore.
+* Slicing [2012/07/31] Fixed bts #!1248 about empty slicing request.
-* Journal [2012/07/31] Fixed bts #932 about journalization of dynamic
plug-ins in some corner cases.
o!* Kernel [2012/07/31] Operations that silently mutate AST should now call
Ast.mark_as_changed to clear states depending on it
(fixes #!1244).
o Kernel [2012/07/30] API of dynamic plug-ins is now documented as
well as static plug-ins (fixed bts #!171).
- Slicing [2012/07/30] No more blank between -slicing-project-name and
-slicing-exported-project-postfix (from #!1249 entry).
- Gui [2012/07/27] Fixed bugs when the consolidation graph cannot
be displayed (fixed bts #1122).
- Kernel [2012/07/24] The annotation 'loop pragma UNROLL "completly", n;'
unroll 'n' times the annoted loop and then add it a clause
'loop invariant \false;'. The remaining loop should be death code.
o Kernel [2012/07/24] Changes in interface of StringHashtbl options.
-! Inout [2012/07/22] Option -inout-callwise restarts Value when it is
newly set
- Impact [2012/07/19] Complete rewrite. Improved precision and computation
time. Fixes wishes #!5 and #!6.
-* Logic [2012/07/18] Fixes sizeof("string_literal") in logic.
- Logic [2012/07/18] Better error messages when parsing logic.
- Kernel [2012/07/16] C constant expressions are now allowed as UNROLL
level into loop pragmas.
o! Cil [2012/07/16] Ast changed: Unrool_level renamed into Unroll_specs
and its argument becomes a list for next evolutions.
o! Kernel [2012/07/16] Add function [stmt_can_reach] to the arguments
of Dataflow.Backwards, which is used to speed up the analysis.
See dataflow.mli for good possible values.
- Kernel [2012/07/16] linker checks that the ghost status of two merged
declaration is the same, and raises an error otherwise.
o* Kernel [2012/07/16] -check verifies if vdefined flag is coherent with
status of variable in Globals tables and AST. Fixes one of the
issues of #!1241.
-! Rte [2012/07/16] Rename option -rte-const into
-rte-no-trivial-annotations (set by default).
-* Value [2012/07/15] Fix crash when an undeclared function returned
a pointer to a function that was later called.
-* Rte [2012/07/14] Prevent generation of incorrect alarms on statements
whose order of execution is not completely specified.
- Rte [2012/07/14] Generate simpler assertions for accesses to arrays,
and discard trivial ones; improve ordering of assertions.
Honor option -unsafe-arrays.
o Makefile [2012/07/13] Added variables PTESTS_OPTS and PLUGIN_PTESTS_OPTS
to pass options to ptests through make tests. See dev manual.
-! Value [2012/07/12] More thorough checks for calls through a function
pointer: warn when the function type and the pointer are
not compatible, and stop when they cannot be reconciled.
-! Kernel [2012/07/12] A negative value given to -ulevel option hides all
UNROLL_LOOP pragmas.
- Report [2012/07/10] Display unreachable properties in a special way;
identify unreachable statement more clearly.
- Gui [2012/07/10] Display all properties in 'Properties' panel,
including generated ones without location.
+! Kernel [2012/07/10] Change semantics of 'reachable' properties
for functions. Use intrinsic notion instead of accessibility
of first statement.
o Kernel [2012/07/04] Hook for handling for loop components in Cabs.
o Makefile [2012/07/04] plugin is distributed iff PLUGIN_DISTRIBUTED and
PLUGIN_ENABLE are not 'no' (instead of PLUGIN_DISTRIBUTED == yes).
-* Kernel [2012/07/03] Fixes bug #840 (inaccurate position in presence of
-pp-annot).
o+ Kernel [2012/06/29] New functions Annotations.remove_* and .fold_* for
each component of a contract and other small API changes.
Better compatibility between Visitor and Annotations.
- Kernel [2012/06/26] New option -keep-unused-specified-functions.
o! Kernel [2012/06/25] Correct (albeit slow) hash function for terms
and term lvalues.
-* Cil [2012/06/25] Better propagatation of volatile, const and restrict
type qualifiers through typedefs on arrays
-* Cil [2012/06/25] Preserve typedefs on global variables with an
initializer
-! Kernel [2012/06/22] improve 'reachable' properties.
o! Kernel [2012/06/19] Remove module Inthash. Use Datatype.Int.Hashtbl
instead, or directly carbon2nitrogen.sh migration script.
o! Value [2012/06/18] Made type Ival.tt private.
- Kernel [2012/06/16] Consolidation from call-site preconditions to
original precondition now handle calls through function pointers
- Value [2012/06/16] Position call-site statuses for function
preconditions, instead of the previous global status.
- Cil [2012/06/13] New option -warn-undeclared-callee for calls to
functions that have not been previously declared.
- From [2012/06/12] Better precision for code of the form
'if (c) stop(); else y = x+1;', where stop does not terminate
- Pdg [2012/06/12] Improve precision in presence of provably dead
code branches. Fixes issue #1194.
o Makefile [2012/06/12] Use ocamldoc.opt whenever possible.
- Rte [2012/06/11] Reuse behaviors names when -rte-precond is used
on fonctions with multiple behaviors.
o! Kernel [2012/06/11] New API for Annotations which merges old
Annotations, Globals.Annotations and operations of Kernel_function
over function contracts.
- Scope [2012/06/08] Improved computation of defs. Statements are
categorized between direct and indirect accesses.
-! Pdg [2012/06/08] Rename option -dot-pdg into -pdg-dot
- Logic [2012/06/07] Cleaner generated assertions in presence of multiple
pointer casts.
o! Kernel [2012/05/30] Kernel.Functions.get does not silently create
a kernel function if it does not already exist. This behavior
is kept for Cil builtins.
-* Kernel [2012/05/29] Fix graph of consolidation statuses when
several properties get the same name.
-* Value [2012/05/19] Calls (*p)() where p resolves to both valid functions
and invalid addresses are now properly handled.
- Value [2012/05/19] Add bzero builtin. A precise destination and size
are required (wish #915).
-* Value [2012/05/19] In lib-entry mode, honor 'const' attributes that
appear deep inside the type (bts #759).
-* Value [2012/05/19] Better time and space complexity for initialization
of big arrays in -lib-entry mode (bts #1026).
o* Kernel [2012/05/16] Fix implementation of Datatype.Triple and
Datatype.Quadruple (bts #!1133).
-* Value [2012/05/15] Re-emit alarms when Value options are changed and
an analysis is restarted.
- Value [2012/04/29] New option -val-ilevel, to change the frontier
between sets of integers and intervals.
- Kernel [2012/04/27] when printing help, display the name of the
opposite boolean option (bts #1085).
-* Kernel [2012/04/26] Fixed bug with Type.pp_ml_name for generic sets
which can lead to incorrect journal generation (bts #1127).
o! Kernel [2012/04/26] Plugin.set_optional_help is now deprecated.
-* Value [2012/04/26] Fix possible typing bugs when evaluating logic
expressions with non-integral types (bts #!1175).
- Kernel [2012/04/24] Use Zarith whenever possible (bts #!983).
- Value [2012/04/16] Allow comparison of invalid pointers in the logic.
- Value [2012/04/15] Old "Evaluate expression" menu in the GUI replaced
by "Evaluate ACSL term"; value of term lval is now displayed.
Evaluations that may fail are flagged.
- Value [2012/04/15] Errors during evaluation in the logic are now
reported.
*! Kernel [2012/04/14] Introduce more temporaries for a call [lv = f()] if
the return type of f and the type of lv do not match. Fix
issue #1024.
-* Value [2012/04/14] Fix incorrect initialization of volatile fields
or globals in presence of initializers (bts #!1112).
o* Makefile [2012/04/12] Fix bug #1145 about PLUGIN_LINK_GUI_OFLAGS.
-* Kernel [2012/04/12] Strict checking of type compatibility when merging
an already called prototype without arg list and a full prototype
(fixes issue #728, #!109).
- Kernel [2012/04/12] New option -<plugin>-share for plug-ins to
customize their specific share directories.
- Rte [2012/04/06] Emit \valid_read alarms instead of \valid for
read accesses.
- Inout [2012/04/05] Better precision for 'if' in which only a side
is reachable.
- Kernel [2012/04/05] Keep all prototypes with a spec,
even if not referenced.
- Inout [2012/04/04] Operational inputs are now more precise for
function with only an ACSL prototype.
-* Kernel [2012/04/04] Fixes issue in loop unrolling and annotations.
-* Kernel [2012/04/02] Fixed bug #1135 and bug #1139 about loop unrolling.
- Logic [2012/03/29] LoopEntry and LoopCurrent built-in labels.
- Value [2012/03/26] Support for \valid_read predicate; evaluation of
\at(p,Pre) and \initialized{Pre}(...).
o! Kernel [2012/03/26] Kernel.CppExtraArgs now gets type
Plugin.String_list and not Plugin.String_set (fixed bts #!1132).
- Value [2012/03/24] Improved handling of conditions involving the
conversion to int of a floating-point variable.
- Journal [2012/03/21] Better journalisation of command line options
setting a list of arguments (e.g. -slevel-function): avoid
quadratic complexity in the generated code (fixed bts #!1123).
- Gui [2012/03/20] Removing 'add assert before' from contextual menu.
Uses ACSL_Importer plugin for such a feature.
-* Value [2012/03/18] Handle 'assigns *p' where p has a typedef type
- Kernel [2012/03/18] Support for model fields
-* Kernel [2012/03/12] Initialization of locals is correct for all sizes;
uses bzero to 0 + contract (directly validated by Kernel)
-* Value [2012/03/12] Fixed bug where user assertions accessing
uninitialized variables got the wrong status.
- Value [2012/03/12] Improved handling of *(p+i) (or equivalently p[i])
when p is a known pointer and i is unknown.
-! Kernel [2012/02/29] Adding some more supports for built-in related to
memory blocks.
-! Cil [2012/02/24] Functions returning a value cannot let control flow
falling through the closing '}' Fixes #685.
- Inout [2012/02/24] Option -inout-callwise to compute callsite-wise
operational inputs. Improves precision of -inout, of the
"Modifies" clause in the gui, and of the slicing.
-! Kernel [2012/02/23] Sets generated assigns clauses into the default
behavior.
- Value [2012/02/22] New message for functions with only a specification.
Changed old message for functions with neither code nor
specification to "No code nor specification for function ...".
- Value [2012/02/21] Evaluation of \separated predicate
-* Value [2012/02/21] Fix bug in evaluation of pointers to start of array.
-* Cil [2012/02/20] Improve label positions in presence of loop
unrolling (bug #1100).
-* Value [2012/02/18] Fix crashes and/or missing alarms when evaluating
*p=(cast)f() with p invalid (bug #!1097).
-* Cil [2012/02/13] Correct sharing bug on widening pragmas.
Fixes #!1090.
o* Cil [2012/02/11] Fixed off-by-one error in
foldLeftCompound ~implicit:true.
o* Makefile [2012/02/09] 'make doc' did not work when GUI disabled
(bts #1014).
-! Kernel [2012/02/08] Adding supports for clause allocates and frees
and their version for loops.
- Slicing [2012/02/07] More precise slicing when -calldeps is used
(fixes wish #107).
-* Kernel [2012/02/07] Fixed bug about property statuses and setting
parameters after -load (statuses were not cleared when required).
-* Value [2012/02/07] Allocate a finite space for malloc builtins; fixes
some bugs when a pointer refers to a non-yet allocated space.
-* Journal [2012/02/07] Fixed bug #!1080: better generated journal
in case of missing internal data preventing it of being runable.
o* Makefile [2012/02/07] Fixed bug #1082 about wrong link in
generated code documentation.
- Scope [2012/02/04] Improve precision of Defs computation (wish #1079).
- Value [2012/02/02] Assertions of the form \valid(p+i) and \valid(&p->f)
are now used to reduce p whenever possible.
- Value [2012/01/30] Improve precision for code with pointer casts
(fixes bug #1074).
-* Syntactic_callgraph [2012/01/27] Fix bug #989 about difference of
display between GUI and dot output.
-* Syntactic_callgraph [2012/01/27] Fix tricky bug while computing
services when a cycle depends on another cycle (most part
of the fix is actually in OcamlGraph itself).
-* Value [2012/01/27] Evaluate ACSL && and || when they appear as terms
(fixes bug #1072).
- From [2012/01/25] More sharing between identical values when
printing results.
- Pdg [2012/01/25] Improve performance, typically on arrays of structs.
- Logic [2012/01/23] Better label inference in axiomatics (see bts #1068).
- Cil [2012/01/20] In debug mode, pretty-print numerical constants
instead of displaying the source file strings.
- GUI [2012/01/19] Add filters for properties' consolidated statuses.
- Value [2012/01/19] Aesthetic fix: do not display {{ &NULL }} and
{{ &"foo" + {2} }} but rather {{ NULL }} and {{ "foo" + {2} }}.
- Occurrence [2012/01/10] Results can be filtered to display only occurrences
in read or write positions.
- Value [2012/01/09] FRAMA_C_MALLOC_INDIVIDUAL modelization now
properly treats allocated blocks as uninitialized.
- Value [2012/01/07] Reduce more aggressively invalid pointers:
{ p->f1 = v1; p->f2 = v2 } will usually raise at most one alarm.
- Value [2012/01/03] During evaluation, reduce indexes that are detected
as out-of_bounds.
- Value [2012/01/03] In index out-of-bounds alarms, do not generate
'assert 0 <= i' part when 'i' is always greater than 0.
o Kernel [2011/12/19] Added Property.location function.
o* Value [2011/12/05] Fix option -absolute-valid-range being reset by
project copies.
-* Value [2011/12/05] Fix wrong hash function, which could cause
memory overuse and worse.
o Value [2011/12/02] Lmap.paste_offsetmap now handles imprecise
destinations.
o! Value [2011/12/02] Moved contents of memory_state/Abstract_value
into ai/Lattice_Interval_Set. Use bin/nitrogen2oxygen for
automatic migration.
- Project [2011/11/28] Accept to load inconsistent project by setting
to default the inconsistent states and their dependencies.
- Value [2011/11/26] Minor improvements related to single-precision
floating-point handling.
-* Pdg [2011/11/24] Option -pdg did nothing if -pdg-print was not set.
- Value [2011/11/22] After emitted an alarm \initialized(lv), the
value analysis tries to remember that lv is initialized.
This suppresses redundant alarms that were emitted further on.
-* Value [2011/11/22] Fixed soundness bugs involving lval = lval;
assignments targeting literal strings and automatically
created S_... memory zones.
- Value [2011/11/22] Suppressed confusing message "all target addresses
were invalid. This path is assumed to be dead.".
-* Value [2011/11/21] Prevent potentially incorrect assertions from being
emitted when the result a call must be cast. Fixes #997 and #1024.
o Kernel [2011/11/21] New File.init_from_project function.
- Value [2011/11/20] New builtin Frama_C_assert. Take advantage of
existing assertions with "#define assert Frama_C_assert".
-* Occurrence [2011/11/19] Fix bug where some occurrences were silently
ignored in big asts; improve performance.
-* Cil [2011/11/18] Go to new line more often when printing sequence
of statements. Fixes issues #1021.
- Value [2011/11/17] Better evaluation of \initialized predicate when
only some parts of the location are initialized.
- Value [2011/11/17] New option -no-val-left-shift-negative-alarms to
treat left shift of negative integers as defined.
-* Cil [2011/11/14] Fail when encountering a lvalue of type void (#1013).
- Value [2011/11/10] Evaluate more precisely statements of the form
if (*p == 1) {...} when *p is reused within the if block. This
also improves the handling of switches.
-* Kernel [2011/11/09] keep track of local variables even in presence of
annotation + do not silently lose statement contract.
Fixes issue #1009.
-*! Kernel [2011/11/07] empty list in complete/disjoint is expanded by
logic type-checker to the list of behavior name of current
contract. Fixes issue #1006. See bts comments for the
differences that can appear in the treatment of specs.
- Aorai [2011/11/07] Aorai gets a real Dataflow analysis for contract
generation + various logic simplifications.
- Gui [2011/11/04] Display global annotations in the filetree.
o! Cil [2011/11/04] Add method pFile in printers. Signature change for
Cil.d_file (but you should use !Ast_printer.d_file).
- Inout [2011/11/03] Major precision improvements when evaluating library
functions whose assigns contains ranges.
- From [2011/11/03] Major precision improvements when evaluating library
functions whose assigns contains ranges.
-* Logic [2011/10/30] Fixes issue #1005 (earlier detection of duplicated
axiom name avoids Kernel.fatal).
o Kernel [2011/10/27] Plugin.Register defines a new option
-plugin-debug-category that allows to enable debugging for
sub-categories of messages (See Log.set_debug_keys for more info).
-* Value [2011/10/27] Fixed #1001: do not warn for unsigned shifts,
do not end propagation on signed left shift of an address.
o Value [2011/10/27] shift_left and shift_right functions now take
an optional signedness boolean in addition to the optional size.
-* Value [2011/10/26] Generate correct assertions when using memcpy
builtin. Fix #1000.
- Value [2011/10/25] Improve interpretation of ACSL annotations in
presence of typedefs.
-* Value [2011/10/24] Improve warnings and evaluation in presence of
possibly infinite floats (fixes #997).
-* From [2011/10/21] The interpretation of explicit assigns clauses for
library function "assigns *p \from x;" was wrong: every possible
location was assumed to have been overwritten.
-* Kernel [2011/10/20] Link error aborts Frama-C (fixes #990).
-* Kernel [2011/10/20] Better linking behavior (fixes #672).
o! Kernel [2011/10/18] Logic_preprocess.file takes an additional parameter,
as gcc pre-processor treats differently .c and .cxx files,
and this must be reflected in annotation pre-processing.
- Value [2011/10/18] Improve evaluation of logic when option
-val-signed-overflow-alarms is active.
-* Value [2011/10/17] Fixed crash when a library function is called in
a state where the function's precondition cannot be true.
-* Value [2011/10/10] Fixed spurious alarm \valid(p) in *p = e; when e is
completely invalid. Soundness was not affected (the
alarm for whatever made e invalid was present).
#####################################
Open Source Release Nitrogen-20111001
#####################################
- Rte [2011/10/07] No longer position 'Don't know' statuses
- Value [2011/10/07] New alarm for left shift of negative values.
Minor other changes related to shift operation alarms.
o*! Rte [2011/10/06] Correct plug-in name for dynamically registered
RTE functions.
-* Kernel [2011/10/06] Warn when the plug-in specified by -load-module
or -load-script is not found (used to remain silent)
-!* Kernel [2011/10/06] Do not normalize Pre in Old, especially where Old
is not allowed.
- Value [2011/10/01] Do not continue evaluating successive 'requires'
or 'ensures' clauses if one of them is false.
- Kernel [2011/10/01] New kind of command-line parameter, for commands
that do heavy output. Used for Value, Pdg and Metrics.
-* Cil [2011/09/30] Correctly handle casts in switch. Fixes #961.
-! Rte [2011/09/30] Option -rte-precond is not entailed by -rte-all
anymore (precontion annotations must now be required explicitly).
-* Aorai [2011/09/30] Generation of loop invariant for intermediate
counter + fixes various issues
-! Slicing [2011/09/30] Option -slice-print is now deprecated: use instead
<normal slicing command> -then-on 'Slicing export' -print
- From [2011/09/29] Display results function by function, instead of
as one big block (may lower memory consumption considerably).
- Value [2011/09/27] New option -remove-redundant-alarms for removing
redundant alarms. This was previously done by default. Use this
option if you are going to inspect alarms emitted by Value.
-* Kernel [2011/09/26] Treat long bitfields the same way as gcc and clang.
Fixes #!959.
-* Kernel [2011/09/26] New exception for Ast.UntypedFiles.get when no
untyped AST is available. Fixes #954.
- Value [2011/09/23] New alarm, for programs that do not respect
C99 6.5.16.1:3 (overlapping assignment from lvalue to lvalue).
Partially supported (not emitted in some cases).
-* Kernel [2011/09/23] Fixes various performance issues when parsing very
large functions. Fixes #!965.
- Value [2011/09/23] Improved precision of if (x!=c) when the value set
of x is an interval of 9 elements.
-* Slicing [2011/09/23] Use correct function during generation of
sliced project. Fixes #!950.
o* Kernel [2011/09/22] Copy visitor creates new kf before visiting a
function, allowing to use it for creating Property.t items in
the new project during visit (fixes #!942).
-* Value [2011/09/22] Much more clever when interpreting logic terms,
including those containing \old (eg. formals in postconditions)
- Value [2011/09/21] Raised cut-off limit between sets and intervals
from 7 to 8 elements.
- Value [2011/09/21] New informative message when not using.
-val-signed-overflow-alarms "2's complement assumed for overflow"
o! Value [2011/09/18] Changed the representation of Ival.t. If an
external plug-in matches "Ival.Set s", a simple fix is
to add "let s = Ival.set_of_array s in" as first line of
that case.
- Value [2011/09/16] Improved precision of &.
- Value [2011/09/16] Improved precision when using -all-rounding-modes.
o Kernel [2011/09/09] Map_common_interface to have a merge function for
Ocaml < 3.12.
o Kernel [2011/09/09] Quadruple datatype.
- Value [2011/09/09] Better message when interpretation stops
for a function argument.
- Pdg [2011/09/06] Pdg can now be saved on disk.
-* Logic [2011/04/20] Fix bug #!501: volatile clauses relative to
partially volatile lvalues are handled by the kernel.
- Pdg [2011/09/03] Improved time and space complexity on big functions.
- Cil [2011/09/02] Add support for GCC specific cast from field of
union to union
-* Cil [2011/09/02] Fix merging bug (#!948).
-* Slicing [2011/09/02] Fix incorrect simplification of single-statement
block in presence of label.
- Value [2011/09/02] Wide strings more supported.
- Kernel [2011/09/02] Improve space complexity of function stmt_can_reach.
- Semantic Constant Folding [2011/09/02] All options are prefixed by "scf".
Use -scf-help for the details. Fixed #!946.
Compatibility is preserved thanks to option aliases.
- Value [2011/08/30] Remove non-relevant variables from the 'Modifies'
clauses of the GUI.
o! Kernel [2011/08/30] Add parameter ~with_locals to Db.accept_base
(prior this, ~with_locals was implicitly false)
o! Value [2011/08/30] Signature change in CilE: plugins that want to
emit Value analysis alarms must define their own emitters.
o! Value [2011/08/30] Add some missing ~with_alarms arguments, notably
to offsetmaps copy and paste.
o! Kernel [2011/08/29] Export datatype Varinfo.Hptset. Signature change
in functor Abstract_interp.Make_Hashconsed_Lattice_Set.
- Metrics [2011/08/26] New command-line options to compute the functions
potentially called from a given function, and the percentage
of functions analyzed by the value analysis.
- Value [2011/08/25] Improve handling of assigns in library functions.
- Occurrence [2011/08/25] Better pretty-printing: do not display
internal ids anymore.
-! Value [2011/08/24] Improve behavior in presence of errors during
the computation of the initial state. Allow non ISO global
initializers using the value of constant globals defined earlier.
o! Kernel [2011/08/23] Getters of Dynamic.Parameter now get an extra
argument of type unit. May improve efficiency a lot.
-* Kernel [2011/08/23] Fixes visitor bug + properly refresh ids of
properties in code transformation (in particular loop unrolling).
-* Kernel [2011/08/15] Add parameter ~declarations to
Globals.FileIndex.get_functions. Prevent duplication bug
in properties navigator of the GUI.
- Inout [2011/08/12] Operational inputs and outputs are now more precise
for library functions: assigns clause are evaluated at each call.
o! Inout [2011/08/12] Interface change. Non_contextual renamed to
Cumulative_analysis.
-* Cil [2011/08/10] Fix conversion bug for f(i++) or f(++i) when i has
size less than int, and f expects an int (bug #911).
- Value [2011/08/10] Loop invariants are now used to improve analysis.
- Value [2011/08/09] Uses "complete behaviors" information.
- Scope [2011/08/09] "Show Defs" is now an interprocedural analysis.
o! Value [2011/08/09] Module Cvalue_type renamed to Cvalue.
Module Relations_type removed. Use Cvalue instead.
- Value [2011/08/04] Postconditions containing \old are now handled.
- Kernel [2011/08/04] Current pragmas no longer give rise to code
annotations (as they do not contain anything that can be proven).
-! Gui [2011/08/04] Improve labels under the icons of the toolbar. Smart
constructors in Menu_manager now require a label and a tooltip.
o Kernel [2011/08/04] Add Kernel.Unicode.without_unicode, which applies
a function without upsetting the Unicode option in the gui.
-* Impact [2011/08/04] Correct a journalisation bug in gui mode.
- Value [2011/08/01] More precise when an alarm is emited in a loop.
o! Kernel [2011/08/01] Signature of Plugin renamed for consistency.
Use carbon2nitrogen for automatic translation.
o! Kernel [2011/08/01] Annotations.replace and
Globals.Annotations.replace_all are removed.
o! Kernel [2011/08/01] Add IPLemma, IPNotacsl and IPConjunction as new
constructors of Property.t; remove IPBehavior.
- Kernel [2011/08/01] Better pretty printing of lists of any elements
o! Kernel [2011/08/01] Properties_status is now called
Property_status. Fully new interface.
o! Cil [2011/08/01] Removing types about validity status from the AST.
Use module Property_status instead.
o Kernel [2011/07/25] Adding option ~dkey to Log.debug functions.
See Log.Messages for details.
o! Kernel [2011/07/22] Modification of Log.print_on_console. No more
based on Format.kfprintf to avoid deadlock when
error are raised by plugin pretty printers.
-* Logic [2011/07/22] Fixes bug #885 (wrong insertion of cast).
-* Logic [2011/07/21] Fixes bug #!887 (merging logic constants).
o* Kernel [2011/07/20] Ensures that a unique kf is generated per function
in each project, avoid using kf for project A in project B.
-! Kernel [2011/07/18] Better handling of comments with -keep-comments
and new API. See Cabshelper.Comments and Globals.get_comments_*
o! Aorai [2011/07/12] Redefinition of internal structures before
enabling Ya extensions for sequences
o! Value [2011/07/11] Add argument "exact" to Lmap.paste_offsetmap (which
was preciously supposed to be always true).
-* Cil [2011/07/06] Correct obscure Cil bug linked to the removal of
trivial unspecified sequences or blocks. Fixes bug #882.
- Value [2011/07/05] Option -val-builtin: experimental support for
builtins that can fail (by calling a fallback C function).
- Value [2011/07/04] New builtin Frama_C_dump_each_file, which dumps
the entire memory state into successive files.
o* Logic [2011/06/29] Fixes bug #751 (Cil.lconstant now returns terms of
type integer and not int).
- Metrics [2011/06/27] Improves efficiency of metrics computation.
o! Cil [2011/06/24] Improve performances of Cil_datatype.Typ.{compare,
equal, hash}.
- Cil [2011/06/22] Cache results of offsets computations.
-* Logic [2011/06/22] Fixed issue #!866 (merging specs included twice)
o Kernel [2011/06/16] Exporting Property_status.self state
o! Kernel [2011/06/16] Dynamic.load_module searches in plugin path as
advertised in its documentation
o*! Cil [2011/06/14] Support for large constants in programs. My_bigint
is now used instead of Int64.t in the AST. Fixes #!858.
o* Kernel [2011/06/10] Fix dynamic access to function [is_default] of
parameters.
o! Kernel [2011/06/10] New way for handling abstract type in the type
library.
-* Value [2011/06/09] Remove some uneeded warnings when comparing function
pointers with NULL. Fixes bug #!855.
-* Kernel [2011/06/09] Correct syntactic loop unrolling in presence of
switch. Fixes bug #861.
o! Kernel [2011/06/09] Remove function CilE.update_gotos.
o! Kernel [2011/06/09] new function Kernel_function.set_spec which
must be called whenever the spec of a kf is modified.
o! Kernel [2011/06/08] Remove Kernel_datatype (merge with Cil_datatatype).
o! Kernel [2011/06/07] Most types of module Property are now private.
Use smart constructors instead.
o Kernel [2011/06/07] New function Dynamic.is_plugin_present.
-* Cil [2011/06/07] Fixes bug #857 (problem with some C enum value and
Ocaml 32 bits 3.11.0).
-* Logic [2011/06/06] Normalization of assigns clause: \result and
\exit_status only appear if a \from is specified.
Fixes #!557, #!845
o! Kernel [2011/06/06] Structural_descr.pack is now a private type.
Use smart constructors instead.
- Value [2011/06/04] Emit \pointer_comparable alarm for unspecified.
equality test between literal strings such as "foo" == "foo".
- GUI [2011/06/03] Double-clicking on a warning now displays the
pretty-printed source location
o! Value [2011/06/03] Functions valid_* now take an argument ~for_writing
Pass true when the lvalue being considered is used for
writing in the program. Pass false when unsure.
- Value [2011/06/03] Literal strings are now read-only.
- Value [2011/06/03] More agressive state reduction when emiting
pointer_comparable assertions. Use option
-undefined-pointer-comparison-propagate-all if you liked
the old behavior better.
o GUI [2011/06/02] Menu_manager now support check menus and toggle
buttons
- Value [2011/06/02] New option -no-val-show-progress
- Cil [2011/06/02] Pretty-printing lval and term_lval the same way
- Cil [2011/06/01] Normalization of lval: T+1 ==> &T[1] when T is in
fact an array (implies *(T+1) ==> T[1])
-* Logic [2011/05/31] can have a local binding for a predicate (even
a constant one) without spurious warnings from typechecker.
(fixes #!848)
+ Ptests [2011/05/31] Add -xunit option to support JUnit like output.
o Kernel [2011/05/31] Cil_datatype.LogicLabel implemented
o Kernel [2011/05/31] New function File.new_machdep in order to
register a new machdep dynamically.
- Dominators,Postdominators [2011/05/31] No feedback by default. Use
-dominators-verbose 2 or -postdominators-verbose 2 if you need it.
-* Project [2011/05/31] Fix sharing bug when copying project.
- Value [2011/05/31] Alarms may pretty print the abstract value culprit
for the potential violation. This is particularly informative for
certain alarms.
- Cil [2011/05/30] Support for &"constant_string" in parser.
-* Kernel [2011/05/29] Fixed macros in limit.h.
- GUI [2011/05/28] Support to display the state of the absolute memory.
o! Kernel [2011/05/26] Module Parameters is dead. Each module
corresponding to a parameters is moved to Kernel. Module
Parameters.Dynamic is now Dynamic.Parameter while
Parameters.get_selection_context is now
Plugin.get_selection_context. You can use the script
bin/carbon2nitrogen to perform the translation (almost)
automatically.
- Value [2011/05/24] Option -val-after-results to control the recording
of post-statement states. Active by default in the GUI.
-* Cil [2011/05/24] Fixes bug #832 (spurious warning for read/write
accesses in undefined order)
o! Logic [2011/05/24] Add possibility to cast integer to C integral
type when type-checking (Changes parameter of Logic_typing.Make)
o! Kernel [2011/05/24] Kernel_function.find_return may now raise
exception Kernel_function.No_Statement.
-* Cil [2011/05/17] Fixes bug #771 (spurious warning for read/write
accesses in undefined order).
-* Kernel [2011/05/13] Support GCC like typing of enums.
- GUI [2011/05/13] Add history for navigating source code.
o! GUI [2011/05/13] Signature change for Filetree#add_select_function,
Filetree#select_global and Menu_manager.entry. Deprecate
Design.apply_on_selected.
-* Kernel [2011/05/12] Fixed typing of bitfields whose size is equal to the
size of int (bugs #823, #817).
-* Value [2011/05/11] Fixed undocumented builtin is_base_aligned.
-* Value [2011/05/11] Fixed bug when bitfield receives the result of
a function call (bug #819).
- GUI [2011/05/10] Menu to configure what is displayed in the filetree.
-* Logic [2011/05/08] Fixed overloading resolution (fixes bug #655).
-* Logic [2011/05/06] Fixed issue with -pp-annot (fix bug #691 and #812).
o Kernel [2011/05/05] Kernel now accepts declarations as main entry point.
- Aorai [2011/05/04] Automaton is handled by contract of leaf functions.
o Cil [2011/05/04] Various smart constructors and ast helper functions.
-* Cil [2011/05/04] Fixes wrong precedence of not in predicate when
pretty-printing.
- GUI [2011/05/04] Automatically show the main function at launch.
- GUI [2011/05/04] Hide empty plugins columns in the filetree. Add
support for hiding globals entirely.
o! GUI [2011/05/04] Signature change for Filetree#append_pixbuf_column.
o! Kernel [2011/05/03] Remove Db_types module. All types are now in
Cil_types. Moved type Alarms.t to Cil_types.alarm.
-* Kernel [2011/05/02] Support for GCC packed and aligned attributes and
for GCC pack pragmas. Fixes #719.
-* Configure [2011/05/02] Fix bug #!262: --disable-plugin works for external
plugins compiled from within Frama-C kernel.
- Dataflow [2011/04/29] Improve precision of backwards dataflow algorithm
and of postdominators on 'if' with a missing branch
-* Pdg [2011/04/28] Better precision in the dependencies.
Fix bug #787, #789 and #802 : infinite loops creation in slicing.
o Value [2011/04/28] Changed representation of bases for literal strings
in preparation of related checks.
o Postdominators [2011/04/27] Add Db.PostdominatorsValue: postdominators
taking into account value analysis results
-* Value [2011/04/24] Fixed crash for high values of -subdivide-float-var
- Value [2011/04/24] Improved results for operation % by zero.
Removed message about binary operators raising exceptions.
o Value [2011/04/24] Defunctorized Lattice_Interval_Set.
-* Logic [2011/04/20] Fix bug #761: adding \old in ensures clause for
parameters does not capture terms in associated offset.
-* Logic [2011/04/20] Fix bug #!501: volatile clauses are
handled by the kernel.
-* Slicing [2011/04/20] Fix bug #799: missing label in sliced program.
-* Value [2011/04/17] Fix bug #798: calls to functions that
return a value with latent conversion.
-* Cil [2011/04/15] Fix bug #785: promotion between long long and an
unsigned same-sized type.
-* Cil [2011/04/14] Fix bugs #780 and #791: use ids unique
between projects for varinfos, statements and expressions.
o*! Cil [2011/04/14] Remove incorrect Cil_const.Build_Counter; use
State_builder.SharedCounter instead.
-! Value [2011/04/14] Use hash-consed sets of statements, making
many analyses faster and leaner for large functions or idioms
that make functions large at normalization
(e.g. large initialized local arrays).
-* Kernel [2011/04/14] Fix 'make clean' of plug-ins.
-* Kernel [2011/04/13] Fix bug #769: merging issue for declared struct.
o* Kernel [2011/04/13] Fix bug #790: AST integrity checker issue.
-* Pdg [2011/04/13] Fix bug #787 but leads to less precise dependencies.
-* Slicing [2011/04/02] Fix bug #786: missing label in sliced program.
-* Value [2011/04/12] Correctly emit \pointer_comparable(...) alarms.
-* From [2011/04/11] Fix #781: handling of function calls with an implict
cast for the assignment of the result.
o Makefile [2011/04/08] Add target to launch the tests of a specific
dynamic internal plugin from Frama-C's main Makefile.
-* Aorai [2011/04/08] Existing assigns are augmented with the locations
corresponding to the instrumentation of the automaton.
- Value [2011/04/05] Each precondition can get a specific validity status.
-* Kernel [2011/04/01] Fixed bug #770 and #769, part 1. Fixed typo in
anonFieldName (was annonFieldName).
-* Kernel [2011/04/1] Fixed bug #775. Large octal and hexadecimal constants
are now correctly typed.
-* Occurrence [2011/04/01] Fixed bug when journalising.
-* Slicing [2011/04/01] Fixed bug #774: journalisation works again.
o Kernel [2011/03/30] Removed type Log.source. From now on all locations
have type Lexing.position.
- Kernel [2011/03/30] Some messages may be printed several time for
the same line if they refer to different columns.
-* Value [2011/03/30] Fixed bug #689. Each postcondition can get a
specific validity status.
-* Impact [2011/03/30] Bug fixed when plug-in `Security_slicing'
cannot be loaded or is incompatible with Impact.
-* Impact [2011/03/30] Bug fixed with '-impact-pragma f' on an unknown
function f.
-* Security_slicing [2011/03/30] Fixed bug #768 about exception raised when
analysing variadic functions. A warning is now emitted:
the function is ignored by the analyzer, thus the result is
potentially incorrect.
o! Kernel [2011/03/29] Alternative signature for dataflow initial state.
A few IntHash replaced by Stmt.Hashtbl.
- Users [2011/03/28] Calls to this plug-in are now written in the journal.
-* Value [2011/03/26] Some floating-point alarms could be printed several
times. Fixed.
o! Kernel [2011/03/25] get rid of bin/sed_inplace (use ISED from
share/Makefile.common where needed, which was the recommended
way from the beginning).
o* Kernel [2011/03/25] Makefile.plugin and .dynamic more robust wrt
external plugins (can make doc clean depend more easily;
fixes bug #754, improves bug #742).
-* Logic [2011/03/24] \at(t,L) when t is a C array is now a logic array
whose content is the one of t at L, not the address of the first
element of t (which stays the same between L and Here anyway).
partial fix of bug #761.
- Kernel [2011/03/24] \at(p,Old) is pretty-printed as \old(p).
o! Cil [2011/03/24] AST changed: removing Told and Pold constructs.
o! Kernel [2011/03/11] Following items are now deprecated:
function Kernel_function.pretty_name: use Kernel_function.pretty
module UseUnicode: use module Unicode.
o! Kernel [2011/03/11] Remove several kernel functions:
Ast_info.pretty_vname: use Cil_datatype.Varinfo.pretty_vname
Cil.print_utf8: use module Parameters.UseUnicode-
Clexer.keep_comment: use module Parameters.PrintComments
Cabshelper.continue_annot_error_set:
Cabshelper.continue_annot_error_set: use
Parameters.ContinueOnAnnotError.off
all Cil, Cilmsg and CilE functions for pretty printing: use Kernel
ones instead.
- From [2011/03/11] Display name of called function when displaying
results of option -calldeps.
o!* Logic [2011/03/11] Implementation of statement contracts for function
behaviors.
-* Value [2011/03/11] Fixed crash with ACSL assertions involving
floating-point variables (bug #752).
-* Logic [2011/03/10] Fixed bug #744 (comparison between arithmetic types
is done in the smallest possible type).
-* Kernel [2011/03/10] Bug fixed in File.create_project_from_visitor
potentially impacted programs transformation.
-* Kernel [2011/03/10] Bug fixed in pretty printer.
(incorrect precedences leading to missing parenthesis).
- Kernel [2011/03/09] Big integers can now be displayed using hexadecimal
notation.
- Value [2011/03/06] Improved option -subdivide-float-var when used
without -all-rounding-modes. Improvement marginal for
double computations and significant for float ones.
o! Cil [2011/03/04] AST changed: 'a before_after type is deleted. All
annotations are now attached before.
-* Value [2011/03/04] Fixed correctness bug when bitfield initializer
exceeds range (bug #721) (jrrt).
o! Value [2011/03/02] Minor interface changes in Value. Replace
some meaningless kinstr by stmt, and make the callbacks lazy.
o! From [2011/03/02] Minor interface changes in From. Replace
some meaningless kinstr by stmt, and make the callbacks lazy.
-! Cil [2011/03/02] Fixed #720 (incorrect simplification of switch).
- Kernel [2011/03/02] Better error message when plug-in crashes on
loading (bts #737).
o Kernel [2011/03/02] New function File.create_rebuilt_project_from_visitor
- Cil [2011/02/24] Implement precise dataflow on switch
constructs. As side effect, improve precision of value analysis.
o* Kernel [2011/02/24] Fixed bug #727 (visiting a GFun spec in frama-c
visitor was not done in the appropriate context).
o* Ptests [2011/02/24] Ptests adds filename of current test before the
options given to frama-c (see #736).
- Aorai [2011/02/24] Deterministic automata.
-* Aorai [2011/02/24] Fix issue in translation of guards + better error
messages.
o! Inout [2011/02/23] Db.InOutContext becomes Db.Operational_inputs.
- Inout [2011/02/23] Correctness in presence of recursive calls.
See issue #733.
- Value [2011/02/23] Improved informative messages about addresses
of locals escaping their scope.
o! Kernel [2011/02/22] Change semantics of ChangeDoChildrenPost for
vstmt_aux. See developer's manual for more precision.
- Value [2011/02/22] Take Flush-To-Zero possibility into account
for single-precision floats.
- Kernel [2011/02/22] Exit status on unknown error is now 125. 127 and
126 are reserved for the shell by POSIX.
o!* Kernel [2011/02/21] Extlib.temp_file_cleanup_at_exit and
Extlib.temp_dir_cleanup_at_exit may now raise exception
Temp_file_error. They may raise an unspecified exception before.
-* Value [2011/02/20] Fixed bug #732: Synthetic results were partial
when -slevel was set not high enough to unroll loops
completely.
- Inout [2011/02/20] Improved messages in presence of recursive calls
o! Kernel [2011/02/18] Bts #729: calling function Plugin.is_visible
(resp. Plugin.is_invisible) forces to display
(resp. prevents from displaying) the corresponding
parameters in an help message.
o! Kernel [2011/02/18] module Service_graph: function entry_point in
input and output of functor Make now returns an option type.
- Syntactic Callgraph [2011/02/18] Fixed issue #723: syntactic callgraph
does not require an entry point anymore. If no entry point,
services are less precise yet.
-* Cil [2011/02/17] Fixed bug #725 (type-checking && operator).
- Inout [2011/02/17] Improved precision of the computation of
operational inputs in presence of function calls.
-* Logic [2011/02/17] Fixed bug #714 about lexing ACSL characters and
strings.
o Cil/Logic [2011/02/16] New functions Clexer.is_c_keyword and
Logic_lexer.is_acsl_keyword.
-! Cil [2011/02/16] Enumerated constants are kept in the AST.
-* Aorai [2011/02/16] State names used as enum constant are checked to be
admissible fresh C identifiers.
-* Value [2011/02/15] Fixed bug when passing struct as argument to
function with a big-endian target architecture.
- Value [2011/02/15] Uniformized message displayed when no information
is available for a function.
- Logic [2011/02/14] Added support for bitwise operators --> and <--> into
ACSL formula.
-* Slicing [2011/04/02] Fixed bug #709: missing statements in sliced program.
-* Value [2011/02/14] Fixed bug when passing bitfield
as argument to function. (jrrt)
-* Value [2011/02/12] Fixed forgotten warning when passing completely
undefined lvalue as argument to function. (jrrt)
-* Value [2011/02/12] Fixed correctness bug involving nested structs
(jrrt).
-* Value [2011/02/12] Fixed crash when passing invalid argument to
function, found by John Regehr using random testing (jrrt).
-* Value [2011/02/09] Fixed representation of unknown single-precision
floats in initial context (it used to be the same as for
an unknown double).
-* Value [2011/02/09] Changes related to 0., +0., -0., sort of thing.
Unwarranted loss of precision fixed.
###################################
Open Source Release Carbon-20110201
###################################
- WP [2011/02/07] Plug-in WP removed from kernel-releases (now an
independent plug-in).
- Logic [2011/02/04] Mentioning a formal on the left-hand side of an
assigns clause is now an
error when type-checking logic annotations.
o! Logic [2011/02/04] Refactoring of assigns and from AST representation
and of Property.identified_property.
- Value [2011/02/04] Changes in Frama_C_memcpy built-in. Still not
perfect.
- Value [2011/02/04] Is is now possible to call Frama_C_show_each
without ..._x.
- Value [2011/02/04] Generate independent assertions for signed
overflow and signed underflow. In many cases only one is
generated (win!).
o! Value [2011/02/02] Renamed copy to copy_offsmap in Offsetmaps.
The name "copy" clashed with Datatypes.
o Kernel [2011/02/01] New syntactic context for memory accesses with
user-supplied validity range.
+ WP [2011/01/31] Option -wp-warnings to display additional
informations for 'Stronger' and 'Degenerated' goals.
+ WP [2011/01/24] Option -wp-split-dim <n> to limit spliting
up to 2**n sub-goals (see -wp-split option).
-! Kernel [2011/01/27] Handle errors better when they occur when exiting
Frama-C. Slight semantic changes for exit code:
- old code 5 is now 127;
- code 5 is now: error raised when exiting Frama-C normally;
- code 6: error raised when exiting Frama-C abnormally.
- Kernel [2011/01/27] Improve performance on platform with dynami.c
loading. Mainly impact value analysis
(for developers: improve efficiency of Dynamic.get).
- Value [2011/01/25] Change in initial states generated by -lib-entry
Much smaller. Perhaps more representative.
+ WP [2011/01/24] When -rte-precond is not used,
wp generates a separate proof obligation for each call site.
-! Configure [2011/01/24] Frama-C does not require Apron anymore (Why
does for Jessie). Thus fix bug #647.
- Value [2011/01/22] More aggressive handling of if(x>e) where x has
type double.
o* Kernel [2011/01/20] Fix bug #677. As a side-effect, function
Plugin.add_alias is now deprecated and replaced by
Plugin.add_aliases.
o Kernel [2011/01/21] New function in API:
Kernel_function.find_syntactic_callsites.
+ WP [2011/01/20] Options -wp-status-xxx to refine goal selection.
o Report [2011/01/20] Option -report no longer survive after -then.
+ WP [2011/01/19] Clarification of -save/-then effect on WP.
* Slicing [2011/01/19] Fixed bug #673.
- Value [2011/01/19] Various minor speed improvements.
-* Value [2011/01/19] Fixed correctness bug involving pointers to signed
integer pointing to memory locations containing unsigned
integers or vice versa.
-* Kernel [2011/01/19] Fixed bug if an empty string is given on the
command line while an option name is expected. There is now a
proper error message.
- Logic [2011/01/16] Fix priority bug in parser.
- Slicing [2011/01/14] New options added for fixing bug #668.
o Sparecode [2011/01/14] API modified for fixing #668.
o GUI [2011/01/13] Added support for icons in Gtk_helper.Icon.
-* GUI [2011/01/12] Fixed bug #666. Do not display misleading
"After statement".
- Value [2011/01/12] Improve performance of callbacks.
- GUI [2011/01/11] Display more precise state after statement
(http://blog.frama-c.com/index.php?post/2011/01/11/Seven-errors-game).
-o Value [2011/01/11] New callback for recording the state after a
statement.
+* WP [2011/01/10] Fixed incorrect status refresh problem in the GUI.
-* Kernel [2011/01/10] Fixed #!313. Entry point with a specification
is no longer wiped out.
-* GUI [2011/01/10] Fixed 100% cpu load while external command
are launched.
- Value [2011/01/09] Disabled incorrect interpretation of
ACSL statement contracts.
- Value [2011/01/07] Interpretation of ==> in ACSL annotations.
-* Value [2011/01/07] Fixed obscure crash that could happen during
very imprecise analyses.
-* Makefile [2011/01/06] Fixed bug #!660 related to a default
Frama-C-compatible ocamlgraph installation under Cygwin
(i.e. in a Win32 path containing the ':' character).
- Value [2011/01/06] Improved precision of & operator.
- Value [2011/01/05] Added check that denormals work correctly on
host computer (correction would be affected otherwise).
o! Kernel [2011/01/05] Remove Messages.disable_echo (can be done using
Log module) and Messages.depend (can be done using Messages.self).
- Value [2011/01/05] New alarm for float -> int cast overflows.
- Value [2011/01/04] Improved precision of | operator.
+* WP [2011/01/04] Fixed bug #702 on Coq output with large integers.
-* Inout [2010/12/22] Return statement dependencies were forgotten in
operational input computations. Fixed.
o! Kernel [2010/12/21] Remove API function Messages.enable_collect:
please let the kernel do the job.
- GUI [2010/12/21] Implement feature #635: display messages in the
messages panel while loading a batch session in the GUI. The
batch session must have been previously executed with the
new option -collect-messages.
-* Makefile [2010/12/21] Fixed bug #637: "make install -n" did wrongly
create directories.
-! GUI [2010/12/21] Gui options start by -gui and not -GUI
- Makefile [2010/12/21] Fixed bug #!638. By default, warnings are no more
errors when compiling a public Frama-C distribution and plug-ins.
SVN versions of Frama-C are still compiled with "-warn-error A".
o* Cil [2010/12/20] Fixed bug #645. Ast_info.constant_expr,
Cil.[zero,one,new_exp,makeZeroInit,mone,kinteger64_repr,
kinteger64,kinteger,integer,constFoldBinOp,mkAddrOf,
mkAddrOrStartOf,mkString,parseInt,sizeOf] no longer use
an optional argument ?loc. It is now a non optional labeled
argument. Previous default value of loc was
~loc:Cil_datatype.Location.unknown which is most of the time
not accurate.
###################################
Open Source Release Carbon-20101202
###################################
-* WP [2010/12/16] Fixed bug #639: no more Coq compilation to shared
directory.
- WP [2010/12/16] Accessibility of all provers from gui.
###################################
Open Source Release Carbon-20101201
###################################
-! Kernel [2010/12/13] Fixed bug #548: limit.h now syntactically correct.
Architectures other than x86_32 still unsupported.
- Value [2010/12/12] New option -float-normal (undocumented)
- Value [2010/12/12] Removed undocumented option -float-digits
- Value [2010/12/10] New option
named -undefined-pointer-comparison-propagate-all
-* Configure [2010/12/10] Always configure OcamlGraph local version (if
used) when configuring Frama-C.
-* Value [2010/12/09] Fixed bug that could happen in programs casting
address of floating-point type to address of integer type
o! Kernel [2010/12/07] Remove function Globals.has_entry_point. Use
Globals.entry_point instead.
-* Syntactic callgraph [2010/12/07] Fixed bug #!587: proper error message
when the entry point is invalid.
-* Value [2010/12/06] Do not evaluate annotations right after
propagation is stopped.
- Inout [2010/12/03] Improve printing of -out -input -deps
- Value [2010/12/03] Preliminary support for interpreting C type float
as IEEE 754 single-precision.
-* Value [2010/12/02] Emit proper ACSL alarm for overflowing
floating-point binary and unary operators. Fixed #259.
-* Value [2010/12/02] Emit alarm for overflowing floating-point constants
instead of crashing.
- Value [2010/12/02] Emit alarm for uninitialized arguments to library
functions.
- Value [2010/12/01] Improved speed of options -slevel* for arguments
in the thousands. Synthetizing results remains slow, so consider
options -no-results* if you take advantage of them.
- Value [2010/11/24] Do not emit alarm for uninitialized arguments to
non-library functions. Necessary for structs.
Relevant messages changed a little.
-! Cil [2010/11/16] Cil normalization takes care of abrupt clauses
o Kernel [2010/11/15] New Task module: a monadic library for calling
asynchroneous commands from the toplevel and the gui.
o! Kernel [2010/11/05] File.check_file takes a new argument, allowing to
describe which AST fails integrity check in case of trouble.
-!* Kernel [2010/11/05] Fixed #620 (default assigns generation).
o! Cil [2010/11/04] Changed type of doGuard in forward dataflow
-* Value [2010/10/29] Disappearance of non termination messages from the
log. The messages were inconsistent.
-! Cil [2010/10/15] Clean up local variables handling and pretty-printing
modified pBlock method interface (unified pBlock and pInnerBlock)
o! Cil [2010/10/13] Extending logic label for plugin purpose.
-! GUI [2010/10/08] New graph viewer, requires ocamlgraph > 1.5
-* Logic [2010/09/30] Priority is used for pretty printing predicates.
o!* Kernel [2010/09/30] Major changes in the kernel. Mainly merge the old
modules Datatype and Type into a single most powerful
library called Type. The API of these libraries changes.
Consequently, some other API changes. By side effect, a lot
of functions of module Cilutil has been removed and replaced
by their counterpart in module Cil_datatype.
The script bin/boron2carbon.sh fixes most changes
automatically. Feel free to use it to upgrade your plug-in.
In the process, some minor bugs found and fixed in the
Frama-C kernel.
o! Cil [2010/09/20] Changed ignored pure exp hook + hook for conditional
evaluation of side-effects
-* Value [2010/09/18] Fixed memory leak.
o! Cil [2010/09/14] Cil and Cabs expression have now a location.
o Ptests [2010/09/01] Slightly changed semantics of CMD and STDOPT.
See developer manual for more info
-* Logic [2010/08/31] Fixed #570 (implicit conversion to void*)
and fixes issue in overloading resolution
-* Value
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment