debugging-benchmark
Quickstart
Generating Passing and Failing Inputs:
from debugging_benchmark.calculator.calculator import CalculatorBenchmarkRepository
from debugging_framework.tools import GrammarBasedEvaluationFuzzer
calc = CalculatorBenchmarkRepository().build()
param = calc.to_dict()
fuzzer = GrammarBasedEvaluationFuzzer(**param)
fuzzer.run()
gen_inps = fuzzer.get_generated_inputs()
Evaluation:
from debugging_benchmark.calculator.calculator import CalculatorBenchmarkRepository
from debugging_framework.evaluator import Evaluation
from debugging_framework.tools import InputsFromHellEvaluationFuzzer
tools = [InputsFromHellEvaluationFuzzer]
subjects = SieveOfEratosthenesStudentAssignmentBenchmarkRepository().build()
result = Evaluation(
tools=tools,
subjects=subjects[0:1],
repetitions=1,
timeout=3600
).run()
Deeper Look into the Class Structure
Check out the Class Diagram for a first overview. Further down in this section we take a look at some key functions of interest.
Class Diagram
BenchmarkRepository and BenchmarkProgram can be found in debugging_framework/benchmark.py
StudentAssignmentBenchmarkProgram,StudentAssignmentRepository and GCDStudentAssignmentBenchmarkRepository can be found in debugging_benchmark/student_assignments.py
The faulty programs can be found at debugging_benchmark/student_assignments/problem_1_GCD and the correct implementation at debugging_benchmark/student_assignments/reference1.py
build()
Returns a List of BenchmarkPrograms. Calls internally _construct_test_program(). This function is our interface.
_construct_test_program()
Returns a BenchmarkProgram. Calls internally construct_oracle() to construct a oracle for our program.
construct_oracle()
Where the magic happens. Returns a Functions which loads the faulty and correct implementation, executes both with the input and checks if they are the same or not. If they are the same return OracleResult.PASSING, if not return OracleResult.FAILING
to_dict()
PLACEHOLDER
Install, Development, Testing
Install
If all external dependencies are available, a simple pip install PLACEHOLDER suffices. We recommend installing PLACEHOLDER inside a virtual environment (virtualenv):
python3.10 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install PLACEHOLDER
Development and Testing
For development and testing, we recommend using PLACEHOLDER inside a virtual environment (virtualenv). By doing the following steps in a standard shell (bash), one can run the PLACEHOLDER tests:
git clone https://github.com/martineberlein/debugging-benchmark
cd debugging-benchmark
python3.10 -m venv venv
source venv/bin/activate
pip install --upgrade pip
# Run tests
pip install -e .[dev]
python3 -m pytest
Metadata
Release files for debugging-benchmark 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| debugging-benchmark-0.0.1.tar.gz | 302.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| debugging_benchmark-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.1 MB
Release files / debugging-benchmark-0.0.1.tar.gz
| Download URL | debugging-benchmark-0.0.1.tar.gz |
|---|---|
| Size | 302.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2e12b22c89cf549291374fe0a1e195ffeba31b9dada117315a5928f7a1e0f9c
|
|
BLAKE2b-256 checksum How to use checksums |
b6aee0c7b100c62d5d6e40bc7a0f10188ffcbd1d2aed61f81f14219e1e521be9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / debugging_benchmark-0.0.1-py3-none-any.whl
| Download URL | debugging_benchmark-0.0.1-py3-none-any.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
681fdd1ecbf62b9c13d7c0a5fbd2c5b61cd4d30dc2c9a3b96020eab55ccee6a4
|
|
BLAKE2b-256 checksum How to use checksums |
3a502d8f37973242407cecf6c507a7d0cf65606605889f0b2468f32687fa9ef5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for debugging-benchmark 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.