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

[FEATURE] CSmith / cn-reduce experiment #136

Open
podhrmic opened this issue Nov 26, 2024 · 0 comments
Open

[FEATURE] CSmith / cn-reduce experiment #136

podhrmic opened this issue Nov 26, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request SoW TA2.1.2.B Apply Verse Development Environment (VDE) to provide qualitative and quantitative feedback.
Milestone

Comments

@podhrmic
Copy link
Collaborator

podhrmic commented Nov 26, 2024

Summary

Rosetta Code contains around 1600 C examples, from which around 800 compile (although with warnings). From the 843 ones that compile, 841 can be parsed with CN (but fail), but 2 of these lead to uncaught exceptions in CN and non-termination.

Use csmith/cn-reduce scripts to take the non-terminating experiments, and find a minimal example that leads to this behavior.

Push the results into cerberus repo for triage.

The parsing script is below:

#!/bin/bash

pass=0
fail=0
compiled=0
processed=0
OK=0

for d in `ls`;
do
    for f in `ls $d`;
    do
        echo ">>> Compiling $d/$f"
        processed=$((processed + 1))
        gcc $d/$f
        res=`echo $?`
        if [ "$res" = "$OK" ]; then
            echo ">>> Compilation OK, running cn!"
            compiled=$((compiled + 1))
            timeout 30 cn verify $d/$f
        else
            echo "Skipping $d/$f because it does not compile"
            continue
        fi
        res=`echo $?`
        if [ "$res" = "$OK" ]; then
            echo "CN OK result"
            pass=$((pass + 1))
        else
            echo "CN Failure"
            fail=$((fail + 1))
        fi
    done
done

echo "Total processed: $processed"
echo "Total compiled: $compiled"
echo "Total CN passed: $pass"
echo "Total CN fail: $fail"
@podhrmic podhrmic added enhancement New feature or request SoW TA2.1.2.B Apply Verse Development Environment (VDE) to provide qualitative and quantitative feedback. labels Nov 26, 2024
@podhrmic podhrmic added this to the MVP 1.0 milestone Nov 26, 2024
@podhrmic podhrmic self-assigned this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SoW TA2.1.2.B Apply Verse Development Environment (VDE) to provide qualitative and quantitative feedback.
Projects
None yet
Development

No branches or pull requests

1 participant