rascal icon indicating copy to clipboard operation
rascal copied to clipboard

replace arbLoc, arbInt, arb... functions with generic `arb(type[&T])`

Open jurgenvinju opened this issue 4 years ago • 2 comments

Describe the bug

Logging this for the future.

There are arbX functions for all kinds of types but not for all. This is inconsistent and hard to document. Below the hood there is the generic functionality to generate values for types in IValueFactory, so let's just expose that in util::Arb with:

java &T arb(type[&T] \type);

We can later extend that module with generating random syntax trees as well (with code from DrAmbiguity).

jurgenvinju avatar Jun 08 '21 14:06 jurgenvinju

superseded by #1715

DavyLandman avatar Dec 02 '23 09:12 DavyLandman

this is quite a different item than #1715; in fact, if we solve this issue and rename it to random(type[&T] t), then #1715 would not be needed.

jurgenvinju avatar Dec 03 '23 20:12 jurgenvinju