yarpgen
Yet Another Random Program Generator (by intel)
csmith
Csmith, a random generator of C programs (by csmith-project)
yarpgen | csmith | |
---|---|---|
3 | 7 | |
454 | 944 | |
1.5% | 1.4% | |
6.0 | 4.1 | |
2 months ago | 4 months ago | |
C++ | C++ | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
yarpgen
Posts with mentions or reviews of yarpgen.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-11-10.
-
Property-Based Testing in Rust with Arbitrary
One also may bias values to be similar (or equal) to other recently generated values. This was a trick used in the compiler tester yarpgen, where it was useful in testing optimization of bitwise operators on integers.
https://github.com/intel/yarpgen
https://github.com/intel/yarpgen/blob/main/papers/yarpgen-oo...
(see "Policies for constants", page 196:8.)
-
Finding Bugs in C and C++ Compilers using YARPGen
This is really impressive! A link to the github if anyone wants to check out the code: https://github.com/intel/yarpgen/blob/main/README.md
Here's a list of bugs found by Yarpgen: https://github.com/intel/yarpgen/blob/main/bugs.rst
csmith
Posts with mentions or reviews of csmith.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-26.
-
Perses: Syntax-Directed Program Reduction
Yes! Another well-known program reducer is C-Reduce [0]. When Csmith [1] started churning out very large programs that exhibited errors in C compilers, the compiler maintainers asked the researchers to please reduce the ~81KB files to a more manageable size so they could understand the errors better. C-Reduce was developed specifically to address that need.
[0] https://github.com/csmith-project/creduce
[1] https://github.com/csmith-project/csmith
- Csmith, a random generator of C programs
-
The only definitive way to establish that software is correct and bug-free is through mathematics, using the formal methods
Is CompCert actually safer in practice? One way to evaluate this is via fuzzing tools like CSmith. CSmith has a list of bugs they have found (hundreds total, in mainstream compilers like llvm and gcc). Here is a quote from the 2011 PLDI paper on CSmith:
- How SQLite Is Tested
-
How to generate random but valid source programs?
If you are actually just going to use C, the easiest way is to just use this existing tool that does exactly what you want and has been used to find many, many existing bugs in many compilers: https://embed.cs.utah.edu/csmith/
-
Finding Bugs in C and C++ Compilers using YARPGen
Here's a list of bugs found by a similar project, Csmith: https://github.com/csmith-project/csmith/blob/master/BUGS_REPORTED.TXT
What are some alternatives?
When comparing yarpgen and csmith you can also consider the following projects:
sxd
ouroboros-network - Specifications of network protocols and implementations of components running these protocols which support a family of Ouroboros Consesus protocols; the diffusion layer of the Cardano Node.
MarkovJunior - Probabilistic language based on pattern matching and constraint propagation, 153 examples
hn-search - Hacker News Search
perses - language-agnostic program reducer.
creduce - C-Reduce, a C and C++ program reducer