12#ifndef MCRL2_UTILITIES_TOOL_H
13#define MCRL2_UTILITIES_TOOL_H
15#include "mcrl2/utilities/logger.h"
17#include "mcrl2/utilities/command_line_interface.h"
18#include "mcrl2/utilities/execution_timer.h"
19#include "mcrl2/utilities/platform.h"
21#ifdef MCRL2_PLATFORM_WINDOWS
69 desc.add_option(
"timings", make_optional_argument<
std::string>(
"FILE",
""),
70 "append timing measurements to FILE. Measurements are written to "
71 "standard error if no FILE is provided");
78 if (parser.options.count(
"timings") > 0)
97 if (parser.options.count(
"quiet"))
99 if (parser.options.count(
"debug"))
101 parser.error(
"options -q/--quiet and -d/--debug cannot be used together\n");
103 if (parser.options.count(
"verbose"))
105 parser.error(
"options -q/--quiet and -v/--verbose cannot be used together\n");
108#ifndef MCRL2_TOOL_CLASSES_NO_CORE
109 if (parser.options.count(
"quiet"))
113 if (parser.options.count(
"verbose"))
117 if (parser.options.count(
"debug"))
121 if (parser.options.count(
"log-level"))
134 parser.check_no_duplicate_arguments();
141 return "[OPTION]...\n";
147 const std::string& author,
148 const std::string& what_is,
149 const std::string& tool_description,
150 std::string known_issues =
""
189#ifdef MCRL2_PLATFORM_WINDOWS
194 if (_fileno(stdin) >= 0 && _setmode(_fileno(stdin), _O_BINARY) == -1)
196 throw std::runtime_error(
"Cannot set stdin to binary mode");
203 command_line_parser parser(clinterface, argc, argv);
206 if (parser.continue_execution())
217 m_timer = execution_timer(m_name, timing_filename());
242 catch (
std::exception& e)
Class for logging messages.
static void set_report_time_info()
Indicate that timing information should be printed.
static void set_reporting_level(const log_level_t level)
Set reporting level.
logger(const log_level_t l)
Default constructor.
Standard exception class for reporting runtime errors.
Simple timer to time the CPU time used by a piece of code.
void report()
Write all timing information that has been recorded.
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
log_level_t log_level_from_string(const std::string &s)
Convert string to log level.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
std::size_t operator()(const atermpp::detail::reference_aterm< T > &t) const