Lin2/STM2: Port Lin and STM to QCheck2
Lin and STM are both based on the battle-tested QCheck module from qcheck-core.
The QCheck2 module however offers integrated shrinking, which should simplify the interface a bit, e.g.,
- by removing the need for a
shrink_cmdfunction and - by building on only one generator type
QCheck2.Gen.t(as opposed to the currentQCheck.arbitraryandQCheck.Gen.tmix)
For this reason, we should experiment with porting the libraries to QCheck2.
Note: This may hit and involve improvements to QCheck2's shrinkers, such as c-cube/qcheck#157.
Can i work on this issue?
You are welcome to give it a stab - this is open source after all! :slightly_smiling_face:
What's your experience with OCaml. the QCheck library, and the Lin and STM libraries?
I'm thinking this may be a bit of a mouthful for a first-time contributor, depending on your experience with the above.
I am a bit familiar with the syntax of OCaml, and I know some concepts related to software testing. The Lin and STM libraries are among the tools I remember
I am a bit familiar with the syntax of OCaml, and I know some concepts related to software testing.
OK. In that case I would suggest
- starting by contributing to
QCheckfirst asLinandSTMbuild on it - and this porting project requires knowing bothQCheckandQCheck2well -- see https://github.com/c-cube/qcheck/issues - writing some tests that utilize the
LinandSTMlibraries first - to get working experience with the interfaces they expose before taking on a project of changing them -- see, e.g., #64
The Lin and STM libraries are among the tools I remember
Oh? I'm curious to learn where you have heard of these two libraries before? :thinking:
Thanks for the suggestions! I'll begin by contributing to QCheck and learning about the libraries. This will help me understand things better before working on the task.
I came across these libraries while exploring tools for testing, I just read the abbreviation and remembered it as STM for my academic.
Hm. Despite the same acronym, the OCaml qcheck-stm package (STM for short) is a state-machine testing library and has nothing to do with https://en.wikipedia.org/wiki/Software_transactional_memory
There's a description here: https://github.com/ocaml-multicore/multicoretests?tab=readme-ov-file#a-parallel-state-machine-testing-library and a short paper here: https://github.com/ocaml-multicore/multicoretests/blob/main/doc/paper.pdf
I will definitely refer to them, thankyou for the clarification Sir!
Sir @jmid, after going through the codebase and resources, I see there’s a lot to explore in this tech stack. It’s really interesting! I’ve started a tutorial on OCaml and the libraries. A small suggestion: could you provide a step-by-step guide for beginners on where to start contributing to this organization? What would that be?
And from the above discussion, I just wanted to clarify that my knowledge of these libraries is mostly theoretical. I’ve never implemented them in practice, so it’s taking me some time to understand these concepts fully.
Thanks! For this repository my recommendation in https://github.com/ocaml-multicore/multicoretests/issues/497#issuecomment-2553910942 still stands. I don't have the resources to provide a step-by-step guide unfortunately. :shrug:
As for the other ocaml-multicore repositories, I recommend asking on the ones that you would like to help out on.