Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lin2/STM2: Port Lin and STM to QCheck2 #497

Open
jmid opened this issue Dec 19, 2024 · 9 comments
Open

Lin2/STM2: Port Lin and STM to QCheck2 #497

jmid opened this issue Dec 19, 2024 · 9 comments
Labels
feature For enhancements of the libraries or test suite

Comments

@jmid
Copy link
Collaborator

jmid commented Dec 19, 2024

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_cmd function and
  • by building on only one generator type QCheck2.Gen.t (as opposed to the current QCheck.arbitrary and QCheck.Gen.t mix)

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.

@jmid jmid added the feature For enhancements of the libraries or test suite label Dec 19, 2024
@SitaGanesh
Copy link

Can i work on this issue?

@jmid
Copy link
Collaborator Author

jmid commented Dec 19, 2024

You are welcome to give it a stab - this is open source after all! 🙂

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.

@SitaGanesh
Copy link

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

@jmid
Copy link
Collaborator Author

jmid commented Dec 19, 2024

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 QCheck first as Lin and STM build on it - and this porting project requires knowing both QCheck and QCheck2 well -- see https://github.com/c-cube/qcheck/issues
  • writing some tests that utilize the Lin and STM libraries first - to get working experience with the interfaces they expose before taking on a project of changing them -- see, e.g., Test more modules from the Stdlib #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? 🤔

@SitaGanesh
Copy link

SitaGanesh commented Dec 19, 2024

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.

@jmid
Copy link
Collaborator Author

jmid commented Dec 19, 2024

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

@SitaGanesh
Copy link

I will definitely refer to them, thankyou for the clarification Sir!

@SitaGanesh
Copy link

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.

@jmid
Copy link
Collaborator Author

jmid commented Dec 19, 2024

Thanks! For this repository my recommendation in #497 (comment) still stands.
I don't have the resources to provide a step-by-step guide unfortunately. 🤷

As for the other ocaml-multicore repositories, I recommend asking on the ones that you would like to help out on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature For enhancements of the libraries or test suite
Projects
None yet
Development

No branches or pull requests

2 participants