From 1d58493be32882cee8f507493b6175413440f197 Mon Sep 17 00:00:00 2001 From: Guillaume SADEGH Date: Sun, 7 Dec 2008 02:31:15 +0100 Subject: [PATCH] Update to compile with the Intel compiler. --- .gitignore | 1 + ChangeLog | 22 ++++++++++++ configure.ac | 1 + m4/intel.m4 | 54 ++++++++++++++++++++++++++++++ src/ltlvisit/syntimpl.cc | 10 ------ src/misc/optionmap.cc | 2 +- src/misc/optionmap.hh | 2 +- src/tgba/tgbabddconcreteproduct.cc | 6 ---- src/tgbaalgos/emptiness.cc | 4 +-- src/tgbaalgos/lbtt.cc | 6 ---- src/tgbaalgos/ltl2tgba_fm.cc | 15 --------- src/tgbaalgos/reductgba_sim.cc | 10 +++--- src/tgbaalgos/tau03opt.cc | 7 ---- 13 files changed, 87 insertions(+), 53 deletions(-) create mode 100644 m4/intel.m4 diff --git a/.gitignore b/.gitignore index d113ba9fd..7fdeacd0d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ stdout *.orig *.rej *.old +TAGS diff --git a/ChangeLog b/ChangeLog index 35c1ea4f8..f05941071 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2008-12-11 Guillaume SADEGH + + Update to compile with the Intel compiler. + + * m4/intel.m4: New file. + * configure.ac: Update. + * src/tgbaalgos/emptiness.cc (tgba_run): Modify s.s->clone() in + i->s->clone(). + * src/misc/optionmap.hh, src/misc/optionmap.cc: Remove the extra + `;' after the namespace. + * src/tgbaalgos/tau03opt.cc + (tau03_opt_search::add_new_state): Remove unreferenced method. + * src/tgbaalgos/ltl2tgba_fm.cc + (translate_dict::dump): Remove unreferenced method. + * src/tgbaalgos/lbtt.cc + (acceptance_cond_splitter::count): Remove unreferenced method. + * src/tgba/tgbabddconcreteproduct.cc + (tgba_bdd_product_factory::get_dict): Remove unreferenced method. + * src/ltlvisit/syntimpl.cc + (eventual_universal_visitor::recurse): Remove unreferenced method. + * src/tgbaalgos/reductgba_sim.cc: Reindent. + 2008-12-11 Alexandre Duret-Lutz Compute more statistics about SCCs. diff --git a/configure.ac b/configure.ac index 4126db8d1..5a1357901 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,7 @@ AC_CHECK_FUNCS([srand48 drand48]) AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL +spot_INTEL CF_GXX_WARNINGS adl_ENABLE_DEBUG ad_GCC_OPTIM diff --git a/m4/intel.m4 b/m4/intel.m4 new file mode 100644 index 000000000..a6e736d37 --- /dev/null +++ b/m4/intel.m4 @@ -0,0 +1,54 @@ + + +dnl Adapted from the predefined _AC_LANG_COMPILER_GNU. +m4_define([_AC_LANG_COMPILER_INTEL], +[AC_CACHE_CHECK([whether we are using the INTEL _AC_LANG compiler], + [ac_cv_[]_AC_LANG_ABBREV[]_compiler_intel], +[ +_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __INTEL_COMPILER + choke me +#endif +]])], + [ac_compiler_intel=yes], + [ac_compiler_intel=no]) +ac_cv_[]_AC_LANG_ABBREV[]_compiler_intel=$ac_compiler_intel +])])# _AC_LANG_COMPILER_INTEL + +dnl The list of warnings which must be disabled for Spot. +m4_define([_INTEL_IGNORE_WARNINGS], +[ 69 dnl Warn when an enum value is used as an int, without any + dnl explicit cast. + 279 dnl Warn when a constant expression is used in a control statement. + 654 dnl Warn when a child does not overload all virtual members of his + dnl parents. + 913 dnl Warn when multibyte character are used (for example "Büchi"). + 1125 dnl Warn when a child member hides a parent member. +]) # _INTEL_IGNORE_WARNINGS + +dnl Add extra flags when icpc is used. +AC_DEFUN([spot_INTEL], +[_AC_LANG_COMPILER_INTEL +AC_CACHE_CHECK([to add extra CXXFLAGS for the INTEL C++ compiler], + [ac_cv_intel_cxxflags], +[ dnl + if test x"$ac_compiler_intel" = x"yes"; then + disabled_warnings='' + for warning in _INTEL_IGNORE_WARNINGS; do + disabled_warnings="$disabled_warnings,$warning" + done + + # remove the extra "," and extra whitespaces. + disabled_warnings=`echo "$disabled_warnings" | sed "s/^,//;s/[[:space:]]//g"` + + INTEL_CXXFLAGS="-w1 -Werror -wd${disabled_warnings}" + + # Even if the icpc preprocessor defines __GNUC__, it is not a GNU compiler. + GXX= + CXXFLAGS="$CXXFLAGS $INTEL_CXXFLAGS" + + [ac_cv_intel_cxxflags="$INTEL_CXXFLAGS"] + else + [ac_cv_intel_cxxflags="no extra flags"] + fi]) + AC_SUBST([INTEL_CXXFLAGS]) +]) # spot_INTEL diff --git a/src/ltlvisit/syntimpl.cc b/src/ltlvisit/syntimpl.cc index aa9a180ac..295647cd4 100644 --- a/src/ltlvisit/syntimpl.cc +++ b/src/ltlvisit/syntimpl.cc @@ -301,16 +301,6 @@ namespace spot } } - bool - recurse(const formula* f1, const formula* f2) - { - if (f1 == f2) - return true; - inf_right_recurse_visitor v(f2); - const_cast(f1)->accept(v); - return v.result(); - } - protected: bool result_; /* true if f < f1, false otherwise. */ const formula* f; diff --git a/src/misc/optionmap.cc b/src/misc/optionmap.cc index c267579fa..8e6228290 100644 --- a/src/misc/optionmap.cc +++ b/src/misc/optionmap.cc @@ -157,4 +157,4 @@ namespace spot os << "\"" << it->first << "\" = " << it->second << std::endl; return os; } -}; +} diff --git a/src/misc/optionmap.hh b/src/misc/optionmap.hh index ab98b2e11..eca3c05d0 100644 --- a/src/misc/optionmap.hh +++ b/src/misc/optionmap.hh @@ -82,6 +82,6 @@ namespace spot private: std::map options_; }; -}; +} #endif // SPOT_MISC_OPTIONMAP_HH diff --git a/src/tgba/tgbabddconcreteproduct.cc b/src/tgba/tgbabddconcreteproduct.cc index 8cffb3d81..920e8d85f 100644 --- a/src/tgba/tgbabddconcreteproduct.cc +++ b/src/tgba/tgbabddconcreteproduct.cc @@ -56,12 +56,6 @@ namespace spot return data_; } - bdd_dict* - get_dict() const - { - return dict_; - } - bdd get_init_state() const { diff --git a/src/tgbaalgos/emptiness.cc b/src/tgbaalgos/emptiness.cc index 1edf13711..26c01b2dd 100644 --- a/src/tgbaalgos/emptiness.cc +++ b/src/tgbaalgos/emptiness.cc @@ -50,13 +50,13 @@ namespace spot for (steps::const_iterator i = run.prefix.begin(); i != run.prefix.end(); ++i) { - step s = { s.s->clone(), i->label, i->acc }; + step s = { i->s->clone(), i->label, i->acc }; prefix.push_back(s); } for (steps::const_iterator i = run.cycle.begin(); i != run.cycle.end(); ++i) { - step s = { s.s->clone(), i->label, i->acc }; + step s = { i->s->clone(), i->label, i->acc }; cycle.push_back(s); } } diff --git a/src/tgbaalgos/lbtt.cc b/src/tgbaalgos/lbtt.cc index 2e409a5d1..e4dafe88e 100644 --- a/src/tgbaalgos/lbtt.cc +++ b/src/tgbaalgos/lbtt.cc @@ -62,12 +62,6 @@ namespace spot return os; } - unsigned - count() const - { - return sm.size(); - } - private: typedef std::map split_map; split_map sm; diff --git a/src/tgbaalgos/ltl2tgba_fm.cc b/src/tgbaalgos/ltl2tgba_fm.cc index 7d9e5bd57..9e4943361 100644 --- a/src/tgbaalgos/ltl2tgba_fm.cc +++ b/src/tgbaalgos/ltl2tgba_fm.cc @@ -117,21 +117,6 @@ namespace spot return num; } - std::ostream& - dump(std::ostream& os) const - { - fv_map::const_iterator fi; - os << "Next Variables:" << std::endl; - for (fi = next_map.begin(); fi != next_map.end(); ++fi) - { - os << " " << fi->second << ": Next["; - fi->first->to_string(os) << "]" << std::endl; - } - os << "Shared Dict:" << std::endl; - dict->dump(os); - return os; - } - formula* var_to_formula(int var) const { diff --git a/src/tgbaalgos/reductgba_sim.cc b/src/tgbaalgos/reductgba_sim.cc index 3aae15504..8dee8c112 100644 --- a/src/tgbaalgos/reductgba_sim.cc +++ b/src/tgbaalgos/reductgba_sim.cc @@ -276,16 +276,16 @@ namespace spot void parity_game_graph::process_state(const state* s, - int , - tgba_succ_iterator*) + int, + tgba_succ_iterator*) { tgba_state_.push_back(s); } void - parity_game_graph::process_link(int , - int , - const tgba_succ_iterator*) + parity_game_graph::process_link(int, + int, + const tgba_succ_iterator*) { } diff --git a/src/tgbaalgos/tau03opt.cc b/src/tgbaalgos/tau03opt.cc index 87c9f6805..76c1a7d4d 100644 --- a/src/tgbaalgos/tau03opt.cc +++ b/src/tgbaalgos/tau03opt.cc @@ -530,13 +530,6 @@ namespace spot &(ic->second.first), &(ic->second.second)); } - void add_new_state(const state* s, color c) - { - assert(hc.find(s)==hc.end() && h.find(s)==h.end()); - assert(c != CYAN); - h.insert(std::make_pair(s, std::make_pair(c, bddfalse))); - } - void add_new_state(const state* s, color c, const weight& w) { assert(hc.find(s)==hc.end() && h.find(s)==h.end());