#!/bin/bash -e ########################################################################## # # # This file is part of Frama-C. # # # # Copyright (C) 2007-2022 # # CEA (Commissariat à l'énergie atomique et aux énergies # # alternatives) # # # # you can redistribute it and/or modify it under the terms of the GNU # # Lesser General Public License as published by the Free Software # # Foundation, version 2.1. # # # # It is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU Lesser General Public License for more details. # # # # See the GNU Lesser General Public License version 2.1 # # for more details (enclosed in the file licenses/LGPLv2.1). # # # ########################################################################## usage=" Script to run C-Reduce (https://embed.cs.utah.edu/creduce) when debugging Frama-C, or when minimizing test cases resulting in a Frama-C error. NOTE: some distributions now use 'cvise' (a Python port of creduce) instead of 'creduce', but it is backwards-compatible. # Requirements - C-Reduce installed in the PATH, or its path in environment variable CREDUCE; - Frama-C installed in the PATH, or the path to its 'bin' directory in environment variable FRAMAC_BIN; - a source file + a command line which causes Frama-C to crash with a 'fatal' error (producing a stack trace); can also be used when Frama-C reports other errors, but in this case a separate script must be completed by the user. # Basic usage arguments: