Skip to content

0152la/SpecReduce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpecReduce

Utility to automatically reduce programs generated by the SpecAST utility.

Requirements

  • Python >= 3.6
  • any C++ compiler (tested with g++ and clang++)
  • CMake >= 3.13

Installation

We provide a CMakeLists file to ease the building process.

> mkdir build && cd build
> cmake -DCMAKE_BUILD_TYPE=Release ..
> cd -

This will provide the mfReduce binary in the build directory.

Executing

The input to the reducer is a SpecAST generated test file. The execution is rather tightly integrated with the SpecASTSpecs repository. For a test to be reduced, we expect to use a CMake compilation script, and a corresponding compile_commands.json to correctly set paths, both of which are included for each SUT specification in the aforementioned repository. However, an SUT installed in the system paths might just work out of the box - the only dependency is having access to the SUT definition.

Another component is an interestingness test, which should tell the reducer whether the reduction process was successful. Currently, we distinguish a successful reduction process if the return code has been maintained, as in the provided interestingness.py.

NOTE currently this integration is quite tight, and the CMake compilation *script is wrapped via the compile.sh script available in the SpecAST repo. *This can be decoupled upon infrastructure revisit.

Flags affecting reduction

There are a few flags which affect the way the reduction is performed.

  • monotonic - if unset, will retry all previously attempted reduction passes upon a successful reduction
  • no-reduce-checks - sometimes, the metamorphic checks are not required in order for a reduction to be considered successful; this option prevent these checks from being removed, in order to ensure an oracle remains, to be potentially polished further manually
  • no-reduce-last-var - sometimes, a single metamorphic variant is sufficient for a successful reduction; similar to the above option, it might be useful to keep at least one other variant, in order for checks to be available

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published