Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of September 27 to October 04, 2016.

  1. BAP 1.0.0
  2. From opkg to odig v0.0.1
  3. Sklml first public release
  4. About recently dead compiler-hacking wiki
  5. Encoding "links" with the type system
  6. findlib-1.6.3
  7. omake-0.10.0-test3
  8. Other OCaml News

BAP 1.0.0


Ivan Gotovchits announced:
We are proud to announce a stable public release of Binary Analysis Platform
[1]. This is our tenth public release, but the first one with a stabilized API,
so now it is safe to start to use it.

Binary Analysis Platform is a framework for writing program analysis
tools, that target binary files. The framework consists of a plethora
of libraries, plugins, and frontends. The libraries provide code
reusability, the plugins facilitate extensibility, and the frontends
serve as entry points. Basically, BAP can be seen as Frama-C for binaries :)

BAP comes with a comprehensive searchable documentation [2], based on our own
fork of argot project. We also have a wiki and permanently manned chat, where
you can get help.

At the time of writing, BAP.1.0.0 didn't yet land up into the opam-repository
[3], so if you want to try it, you should use our opam-repository,

opam repo add bap git://

So that you can install bap and its system dependencies with

opam depext --install bap

Alternatively, you can use Vagrantfile, shipped with the main repository to
build a virtual machine provisioned with bap. Or, you can use a docker image,

docker run binaryanalysisplatform/bap bap /bin/ls -dasm

Finally, if you really want to play with BAP on a daily basis, and do the
research in the field binary analysis and reverse engineering, then consider
applying to the CMU PhD program and join David Brumley's research team. (You can
apply to both ECE[4] and SCS[5] programs, even simultaneously).

Best wishes,
Binary Analysis Platform Team


From opkg to odig v0.0.1


Daniel Bünzli announced:
Due to concerns over a binary name clash with OpenWRT's package manager [1], the
opkg project was renamed to odig.

If you have installed opkg the way out is:

 opkg cache clear
 opam remove opkg  
 opam update && opam install odig
 odig ocamldoc  
 odig doc  

Thanks to David Kaloper Meršinjak and Peter Zotov for raising
the issue.  

Sorry for the inconvenience and happy doc digging,


P.S. To package devs if there are issues with the way your docs get rendered
please get in touch on the issue tracker (if that's not due to your package
install or an ocamldoc issue itself).

Anil Madhavapeddy then said:
I have deployed an experimental documentation build for MirageOS libraries (and
dependencies thereof) using odig at:

an experimental build using odoc (the new cross-referencing tool that is still
being worked on, so expected rendering bugs) is available under:

These URLs are all subject to change, but I thought it might be useful to see
the generated output for a real project. The Dockerfile that generates this site
is at:
Fabrice Le Fessant then asked and Daniel Bünzli replied:
> Looking briefly at the two websites, the differences are not obvious.

The main difference is that with odoc, identifiers are linked across packages,
it also should also work correctly on functor heavy code bases where ocamldoc
easily starts overwriting its own outputs. Another difference is that rendering
in odoc is not as good at the moment, the markup output needs reworking and some
elements that should be links are not linked which poses doc usability problem
and is reason why odoc is not the default doc path in odig yet.

> FWIW, `ocp-browser` can also be used to browse the API/documentation of
> installed packages in a terminal: see a screenshot at

Note that `odig` not only gives you access to API docs, it also gives you easy
access to the readme, changelogs, homepage, issues, etc. of packages. But it
shouldn't be too hard for `ocp-browser` to align on the conventions established
by odig, see `odig help packaging`, you could even use the Odig API (unstable

Sklml first public release


Pierre Weis announced:
                   Easy coarse grain parallelization                    

We are glad to announce the availability of Sklml version 2.0+pl0.

What is Sklml?

Sklml is a functional parallel skeleton compiler and programming system for OCaml programs.

The Sklml system is embedded into the OCaml programming language
and inherits the good properties of this functional heritage: Sklml
programs cannot go wrong (no bus error nor segmentation faults).

All Sklml programs may be run in two evaluation modes: parallel or
sequential evaluation.

The Sklml system features another salient property: for any
Sklml program the sequential and parallel evaluation modes always
return the same result. In particular, the parallel evalution mode is
deterministic and do not introduce nor hide any error (such as floating point
rounding errors).

In Sklml, parallelization is explicit and uses high-level
parallelization primitives for program parallel and data parallel usual
programming situations.

Composing the parallelization primitives is a powerful way to define more
complex or specialized parallelization schemes. For instance, the
Sklml library features a 'domain' high-level function devoted to
advanced scientific computing: indeed, the function 'mk_domain' provides a
parallel implementation of the classical 'Domain Decomposition' method to
solve Partial Differential Equations. Using the same methodology, advanced
users can define powerful parallelization functions and tune Sklml
to the specific domain at hand.

Where to get the Sklml code?

The tarball is available here:

Where to get more information?

The package home page is here:

All constructive criticisms and propositions are warmly welcomed.


Francois Clement <>
Pierre Weis <>

About recently dead compiler-hacking wiki


Kakadu asked:
Compiler hacking is fun. Hacking compiler with a feature that can be
potentially appreciated is a double fun. But ocamllabs wiki is dead.
Do we have a list of crazy ideas for compiler on mantis or somewhere
else to work ourselves or give to undergraduates as a pet project?

Gasche-style lists with small descriptions like [1] are quite good. If
you have personal ones I will be happy to look on them (you can post
them there). Even in french.

Happy hacking,

Anil Madhavapeddy then said:
Umm, the above rumours of the death of the OCaml Labs wiki may be slightly premature.

...indicates that the project list isn't curated actively and that it's not
authoritative to avoid misleading students, but the list is still a good source
of interesting projects. Note that it's open for editing by anyone, so you are
more welcome to help out by editing and refreshing any projects in there.

Cambridge Compiler hacking sessions took a hiatus for the summer, but will
return soon for those in the region:

It would be great to see similar events in Paris or elsewhere if anyone is
interested in organising them!
John Whitington also said:
The ocamllabs wiki used to have a list of good things for beginners. In that
vein, there are a few things marked 'junior_job' here:

(Use 'junior_job' as the search term)
Kakadu replied, then Gabriel Scherer said:
> This search gives me only 3 issues that are not closed. Am I doing
> the search righ?

To look for issues tagged junior_job from, first reset your current
Mantis filter ("Reset filter"), then click the "Tags" link in the filter form,
that will open an input field where you can write (or select) "junior_job".

The following link also works (built using the "Create Permalink" option to get
a URL from a filter):

Encoding "links" with the type system


Continuing this old thread, Gabriel Scherer said:
I came back to this thread thanks to Alan Schmitt's Caml Weekly News.

Here is a fairly systematic approach to the problem, contrasting Jeremy's more
virtuoso approach. It works well when the whole set is statically defined in the
source code, but I'm not sure about more dynamic scenarios (when a lot of the
type variables involved become existentially quantified.

The idea is to first formulate a solution using logic programming. A link set
can be represented as a list of accepted sinks, and I can write a small Prolog
program, "insert" that takes a new link, and a link set, and traverses the link
set to find the link's sink in the list, and add the link's source to the list
in passing.

set([sink]) :- link(source, sink).
set(sinks) :-
  link(source, sink),
  insert(prev_sinks, source, sink, sinks).

(* either the sink we want to insert is first in the list *)
insert([sink | _], source, sink, [source, sink | sinks]).

(* or it is to be found somewhere, recursively, under some other sink [s] *)
insert([s | prev_sinks], source, sink, [s | sinks]) :-
  insert(prev_sinks, source, sink, sinks).

Once you have this logic program, it is straightforward to translate it to a
GADT declaration:

type 's linkset =
  | Init : ('source, 'sink) link -> ('source -> ('sink -> unit)) linkset
  | Insert : ('source, 'sink) link * 'set1 linkset * ('set1, 'source, 'sink, 'set2) insert -> 'set2 linkset
and ('set1, 'source, 'sink, 'set2) insert =
  | Here : (('sink -> _) as 'set1, 'source, 'sink, 'source -> 'set1) insert
  | Next : ('set1, 'source, 'sink, 'set2) insert -> ('a -> 'set1, 'source, 'sink, 'a -> 'set2) insert

let _ = fun (type t1 t2 t3) (lnk1 : (t2, t1) link) (lnk2 : (t3, t1) link) (lnk3 : (t3, t2) link) ->
  let set = Init lnk1 in
  let set = Insert (lnk2, set, Next Here) in
  let set = Insert (lnk3, set, Here) in



Gerd Stolpmann announced:
there is a new version of findlib. It's mainly a bug fix version:

 - "ocamlfind printconf" respects the environment variable
 - findlib is built with the -opaque switch if detected
 - Fix the install when there are spaces in the path
 - New options: ocamlfind query -qe -qo, for suppressing
   stderr and/or stdout

There is also some experimental support for the native toplevel as
provided by This is sill
work in progress.

The new version 1.6.3 is available on the project page:



Gerd Stolpmann announced:
I'm happy to announce a new test release of omake. This is a candidate
for a regular release, and if no new serious bugs are found, the
regular release will likely happen in the course of October.

Since omake-0.10.0-test2, a couple of bugs were fixed:
 - private variables in foreach loops work now as expected
 - fixed "rm -rf" so that it never follows symlinks
   (2nd attempt of a fix)
 - The "equal" function works also for arrays. This fixes
   a couple of unit tests using this feature.

Of course, all the nice work of the previous test releases is also
available, in particular the speedup for large projects, and the new
bootstrap system.

The tarball can be downloaded at The repository is now
at Github, There is also an
issue tracker.

omake requires now ocaml-4.02 as minimum.

Other OCaml News

From the ocamlcore planet blog:
Here are links from many OCaml blogs aggregated at OCaml Planet,

ocurl releases will no longer be uploaded to forge

Asetmap, Bos, Hmap and Webbrowser


Odig 0.0.1

Full Time: Software Developer (Functional Programming) at Jane Street in New York, NY; London, UK; Hong Kong

The fixpoint combinator

Old cwn

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.

Alan Schmitt