rascal
rascal copied to clipboard
replace arbLoc, arbInt, arb... functions with generic `arb(type[&T])`
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).
superseded by #1715
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.