Code Monkey home page Code Monkey logo

fp-benchmarks-imperial's People

Contributors

ccadar avatar danielschemmel avatar erzett avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fp-benchmarks-imperial's Issues

interval_klee_bug.x86_64.bc may have unreachable asserts.

The interval_klee_bug.x86_64.bc benchmark declares several counter example locations in its spec. However when I run our tool on it some of those are not covered. Our exploration is not exhaustive unfortunately so unlike #13 I'm less certain if those asserts are reachable.

WARNING:MainThread: MATCH SPEC for task no_assert_fail but with warnings:
/home/user/build_O2/benchmarks/c/imperial/synthetic/interval_klee_bug.x86_64.bc (/home/imperial/experiments/imperial/tool_exchange/0/wd/workdir-60/klee-wd)
Observed counter examples do not cover all listed for this task in spec. The following locations were not covered:
{'interval.c': {104}}

We observe failures on line 99. @afd are you sure line 104 is reachable? Could you look into this?

synthetic/sum_is_commutative_klee_float_bug.x86_64 is missing counter examples

WARNING:MainThread: MATCH SPEC for task no_invalid_deref but with warnings:
/home/user/build_O2/benchmarks/c/imperial/synthetic/sum_is_commutative_klee_float_bug.x86_64.bc (/home/dsl11/dev/klee-afr/experiments/first/wd/workdir-83/klee-wd)
Observed counter examples not listed in spec
  Test 000006 in /home/user/fp-bench/benchmarks/c/imperial/synthetic/sum_is_commutative/sum_is_commutative.c:40

@afd This is your benchmark. Could you added the out of bound memory access to the list of counter examples for no_invalid_deref verification task.

gsl/benchmarks/integration/integration_klee_bug.x86_64 is missing counter examples

WARNING:MainThread: MATCH SPEC for task no_assert_fail but with warnings:
/home/user/build_O2/benchmarks/c/imperial/gsl/benchmarks/integration_klee_bug.x86_64.bc (/home/dsl11/dev/klee-afr/experiments/first/wd/workdir-48/klee-wd)
Observed counter examples not listed in spec
  Test 000001 in /home/user/fp-bench/benchmarks/c/imperial/gsl/benchmarks/integration/integration-sym.c:49

gsl/benchmarks/blas_klee_bug.x86_64 spec is missing counter examples

Our tool is reporting bugs in this benchmark but the

/home/user/build_O2/benchmarks/c/imperial/gsl/benchmarks/blas_klee_bug.x86_64.bc (/home/dsl11/dev/klee-afr/experiments/first/wd/workdir-43/klee-wd)
Observed counter examples not listed in spec
  Test 000001 in /home/user/fp-bench/benchmarks/c/imperial/gsl/benchmarks/blas/blas-sym.c:50
  Test 000002 in /home/user/fp-bench/benchmarks/c/imperial/gsl/benchmarks/blas/blas-sym.c:49

but the spec doesn't list them as an expected counter examples.

They should be added.

@ccadar I think you're the author of this benchmark. Could you add them?

Benchmarks that access fenv should use the `STDC FENV_ACCESS` pragma

Several benchmarks

  • synthetic/fadd_to_exact_zero/fadd_to_exact_zero.c
  • synthetic/fsub_to_exact_zero/fsub_to_exact_zero.c
  • synthetic/interval/interval.c
  • synthetic/rounding_sqrt/rounding_sqrt.c

maybe parts of gsl too (I'm not sure).

access the floating point environment without setting the pragma. This is undefined behaviour and should be fixed.

#pragma STDC FENV_ACCESS ON

Indeed Clang 3.9 at -O3 mis-compiles the interval benchmark.

See https://bugs.llvm.org//show_bug.cgi?id=8100

Note Clang doesn't support this pragma currently.

GCC also miscompiles this benchmark at -O3.

vectors_klee_bug.x86_64 may have unreachable asserts

The vectors_klee_bug.x86_64 benchmark declares several counter example locations in its spec. However when I run our tool on it some of those are not covered and our exploration appears to be exhaustive. Later on this results in a warning when analysing our results.

WARNING:MainThread: MATCH SPEC for task no_assert_fail but with warnings:
/home/user/build_O2/benchmarks/c/imperial/gsl/benchmarks/vectors_klee_bug.x86_64.bc (/home/imperial/experiments/imperial/tool_exchange/0/wd/workdir-57/klee-wd)
Observed counter examples do not cover all listed for this task in spec. The following locations were not covered:
{'vector_example.c': {57, 58}}

I suspect those locations (i.e. lines 57 and 58 in vector_example.c) are not reachable? @ccadar could you look into this and fix if appropriate.

`statistics_klee_bug.x86_64.bc` may have unreachable asserts

The statistics_klee_bug.x86_64.bcbenchmark declares several counter example locations in its spec. However when I run our tool on it some of those are not covered. Our exploration is not exhaustive unfortunately so unlike #13 I'm less certain if those asserts are reachable.

When later analysing a run of our tool I get the following warning.

WARNING:MainThread: MATCH SPEC for task no_assert_fail but with warnings:
/home/user/build_O2/benchmarks/c/imperial/gsl/benchmarks/statistics_klee_bug.x86_64.bc (/home/imperial/experiments/imperial/tool_exchange/0/wd/workdir-55/klee-wd)
Observed counter examples do not cover all listed for this task in spec. The following locations were not covered:
{'stat.c': {45, 48, 49, 50, 51, 52}}

We observe assertion failures on lines 44, 46 and 47.

I worry that some of the counter examples given are actually not reachable. @ccadar could you look into this?

gsl/benchmarks/blas/blas_klee_correct.x86_64 is incorrect

This benchmark is supposed to be correct according to the spec.yml file but our tool found a bug in it (during testing we probably didn't let our tool run long enough to find the bug).

WARNING:MainThread: MISMATCH SPEC for task no_assert_fail:
/home/user/build_O2/benchmarks/c/imperial/gsl/benchmarks/blas_klee_correct.x86_64.bc (/home/dsl11/dev/klee-afr/experiments/first/wd/workdir-44/klee-wd)

WARNING:MainThread:   Test 000001 in /home/user/fp-bench/benchmarks/c/imperial/gsl/benchmarks/blas/blas-sym.c:46

The particular failure is

KLEE: ERROR: /home/user/fp-bench/benchmarks/c/imperial/gsl/benchmarks/blas/blas-sym.c:46: ASSERTION FAIL: c[0] == a[0]*b[0] + a[1]*b[2] + a[2]*b[4]

Examining the ktest file reveals that the problematic value is a nan which the test does not guard against.
We should probably add a klee_assume(!isnan(a[0])) or something?

@ccadar This is your benchmark. Any thoughts on it?

synthetic/sqrt/sqrt does not terminate.

synthetic/sqrt/sqrt.c has a termination bug which has some similarities similar to the bug I tried to fix in #12

Calling naive_sqrt(float x) with x being 2.0f causes the function to enter what appears to be an infinite loop.

@afd could you take a look at this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.