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

Csmith checksum #127

Merged
merged 3 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
repos:
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ['--profile', 'black']
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies: [pytest >= 7.0.0]
Expand Down
9 changes: 6 additions & 3 deletions diopter/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
# The output should be 2
assert output.stdout.strip() == "2"
"""

from __future__ import annotations

import argparse
Expand Down Expand Up @@ -1185,9 +1186,11 @@ def get_compilation_cmd(
str(self.compiler.exe),
f"-{self.opt_level.name}",
),
(program[0].language.get_language_flag(),)
if include_language_flags
else ("",),
(
(program[0].language.get_language_flag(),)
if include_language_flags
else ("",)
),
self.flags,
(f"-I{path}" for path in self.include_paths),
(f"-isystem{path}" for path in self.system_include_paths),
Expand Down
1 change: 0 additions & 1 deletion diopter/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ class CSmithGenerator(Generator):
default_options_pool = [
"arrays",
"bitfields",
"checksum",
"comma-operators",
"compound-assignment",
"consts",
Expand Down
1 change: 1 addition & 0 deletions diopter/reducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def test(self, program: SourceProgram) -> bool:
if rprogram:
#the reduction was successful
"""

import inspect
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions diopter/sanitizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
if not sanitizer.sanitize(program):
# the program is broken
"""

from __future__ import annotations

import subprocess
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = diopter
version = 0.0.26
version = 0.0.27
author = Theodoros Theodoridis, Yann Girsberger
author_email = [email protected]
description = A library for building differential tests
Expand Down
Loading