caml-list - the Caml user's mailing list
 help / Atom feed
From: Mario Pereira <mjp.pereira@fct.unl.pt>
To: Niols <niols@niols.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] O(n ln k) sorting for ocaml on github and a challenge
Date: Mon, 11 Oct 2021 22:27:32 +0100
Message-ID: <CAJ98Ag=8bQbFsNnn_fDh_SfnUo7Sp-2zRZ_8WUscj1xmD9HEXw@mail.gmail.com> (raw)
In-Reply-To: <875a3212-c4a1-41fb-65f7-2a68b012af9f@niols.fr>

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]

Hi Niols,

The repository in question is very experimental. Our implementation of
> TimSort on list is indeed broken. I can't remember if it contains the
> famous TimSort bug, but we are aware that it exists and know of two ways
> to fix it. We quickly switched to working on arrays, though, and were
> planning on coming back to list eventually.
>
> Our implementation of TimSort on arrays can be found here:
>
>
> https://github.com/LesBoloss-es/sorting/blob/master/src/array/timsort.ml
>
> It does include a fix of the bug. We have tested it successfully on a
> rather wide range of arrays.
>

So interesting that you mentioned this :) I actually came across your
implementation as I was looking for an OCaml implementation of TimSort that
I could use as a test stress for Cameleer (a deductive verification tool
for OCaml-written code).

I didn't get that much far (cf, the in-progress proof is here:
https://github.com/ocaml-gospel/cameleer/blob/master/examples/in_progress/timsort.ml),
but I was planning to get back to it very soon. Maybe I will take a look
first at the implementation on arrays :)

Cheers
--
Mário

[-- Attachment #2: Type: text/html, Size: 1720 bytes --]

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09  4:05 Christophe Raffalli
2021-10-09  8:58 ` Mario Pereira
2021-10-09 19:59   ` Christophe Raffalli
2021-10-11 11:46     ` Niols
2021-10-11 21:27       ` Mario Pereira [this message]
2021-10-22  4:44 ` Kazuhiko Sakaguchi

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ98Ag=8bQbFsNnn_fDh_SfnUo7Sp-2zRZ_8WUscj1xmD9HEXw@mail.gmail.com' \
    --to=mjp.pereira@fct.unl.pt \
    --cc=caml-list@inria.fr \
    --cc=niols@niols.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox