Enable -Wmissing-declarations in development mode.
* m4/gccwarn.m4: Add -Wmissing-declarations. * iface/ltsmin/ltsmin.cc, iface/ltsmin/modelcheck.cc, src/bin/common_trans.cc, src/bin/genltl.cc, src/bin/ltlgrind.cc, src/tests/acc.cc, src/tests/bitvect.cc, src/tests/checkpsl.cc, src/tests/checkta.cc, src/tests/complementation.cc, src/tests/consterm.cc, src/tests/emptchk.cc, src/tests/equalsf.cc, src/tests/graph.cc, src/tests/ikwiad.cc, src/tests/intvcmp2.cc, src/tests/intvcomp.cc, src/tests/kind.cc, src/tests/length.cc, src/tests/ltlprod.cc, src/tests/ltlrel.cc, src/tests/ngraph.cc, src/tests/randtgba.cc, src/tests/readltl.cc, src/tests/reduc.cc, src/tests/syntimpl.cc, src/tests/tostring.cc, src/tests/twagraph.cc, src/tl/contain.cc, src/twaalgos/dtgbacomp.cc, src/twaalgos/minimize.cc: Add "static" and move in anonymous namespace when appropriate.
This commit is contained in:
parent
162d8d297d
commit
20365e53f0
32 changed files with 553 additions and 563 deletions
|
|
@ -943,75 +943,75 @@ namespace spot
|
|||
mutable callback_context* state_condition_last_cc_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// LOADER
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// LOADER
|
||||
// Call spins to compile "foo.prom" as "foo.prom.spins" if the latter
|
||||
// does not exist already or is older.
|
||||
static bool
|
||||
compile_model(std::string& filename, std::string& ext, bool verbose)
|
||||
{
|
||||
std::string command;
|
||||
std::string compiled_ext;
|
||||
|
||||
if (ext == ".prom" || ext == ".pm" || ext == ".pml")
|
||||
{
|
||||
command = "spins " + filename;
|
||||
compiled_ext = ".spins";
|
||||
}
|
||||
else if (ext == ".dve")
|
||||
{
|
||||
command = "divine compile --ltsmin " + filename;
|
||||
compiled_ext = "2C";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (verbose)
|
||||
std::cerr << "Unknown extension `" << ext
|
||||
<< ("'. Use `.prom', `.pm', `.pml', `.dve', `.dve2C' or"
|
||||
"`.prom.spins'.") << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Call spins to compile "foo.prom" as "foo.prom.spins" if the latter
|
||||
// does not exist already or is older.
|
||||
bool
|
||||
compile_model(std::string& filename, std::string& ext, bool verbose)
|
||||
{
|
||||
std::string command;
|
||||
std::string compiled_ext;
|
||||
struct stat s;
|
||||
if (stat(filename.c_str(), &s) != 0)
|
||||
{
|
||||
if (verbose)
|
||||
{
|
||||
std::cerr << "Cannot open " << filename << std::endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (ext == ".prom" || ext == ".pm" || ext == ".pml")
|
||||
{
|
||||
command = "spins " + filename;
|
||||
compiled_ext = ".spins";
|
||||
}
|
||||
else if (ext == ".dve")
|
||||
{
|
||||
command = "divine compile --ltsmin " + filename;
|
||||
compiled_ext = "2C";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (verbose)
|
||||
std::cerr << "Unknown extension `" << ext
|
||||
<< "'. Use `.prom', `.pm', `.pml', `.dve', `.dve2C' or"\
|
||||
"`.prom.spins'." << std::endl;
|
||||
return false;
|
||||
}
|
||||
std::string old = filename;
|
||||
filename += compiled_ext;
|
||||
|
||||
struct stat s;
|
||||
if (stat(filename.c_str(), &s) != 0)
|
||||
{
|
||||
if (verbose)
|
||||
{
|
||||
std::cerr << "Cannot open " << filename << std::endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Remove any directory, because the new file will
|
||||
// be compiled in the current directory.
|
||||
size_t pos = filename.find_last_of("/\\");
|
||||
if (pos != std::string::npos)
|
||||
filename = "./" + filename.substr(pos + 1);
|
||||
|
||||
std::string old = filename;
|
||||
filename += compiled_ext;
|
||||
struct stat d;
|
||||
if (stat(filename.c_str(), &d) == 0)
|
||||
if (s.st_mtime < d.st_mtime)
|
||||
// The .spins or .dve2C is up-to-date, no need to recompile it.
|
||||
return false;
|
||||
|
||||
// Remove any directory, because the new file will
|
||||
// be compiled in the current directory.
|
||||
size_t pos = filename.find_last_of("/\\");
|
||||
if (pos != std::string::npos)
|
||||
filename = "./" + filename.substr(pos + 1);
|
||||
int res = system(command.c_str());
|
||||
if (res)
|
||||
{
|
||||
if (verbose)
|
||||
std::cerr << "Execution of `" << command.c_str()
|
||||
<< "' returned exit code " << WEXITSTATUS(res)
|
||||
<< ".\n";
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
struct stat d;
|
||||
if (stat(filename.c_str(), &d) == 0)
|
||||
if (s.st_mtime < d.st_mtime)
|
||||
// The .spins or .dve2C is up-to-date, no need to recompile it.
|
||||
return false;
|
||||
|
||||
int res = system(command.c_str());
|
||||
if (res)
|
||||
{
|
||||
if (verbose)
|
||||
std::cerr << "Execution of `" << command.c_str()
|
||||
<< "' returned exit code " << WEXITSTATUS(res)
|
||||
<< ".\n";
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
kripke_ptr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue