You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.3 KiB

  1. /*
  2. * This file is part of the program ltl2dstar (http://www.ltl2dstar.de/).
  3. * Copyright (C) 2005-2007 Joachim Klein <j.klein@ltl2dstar.de>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef LTL2DRA_HPP
  19. #define LTL2DRA_HPP
  20. /** @file
  21. * Provides class LTL2DRA, which is used as a wrapper to convert from
  22. * LTL to NBA and from NBA to DRA.
  23. */
  24. #include "LTL2NBA.hpp"
  25. #include "APSet.hpp"
  26. #include "APElement.hpp"
  27. #include "NBA.hpp"
  28. #include "NBA_State.hpp"
  29. #include "EdgeContainerExplicit_APElement.hpp"
  30. #include "DA.hpp"
  31. #include "DRA.hpp"
  32. #include "DA_State.hpp"
  33. #include "Configuration.hpp"
  34. #include "StutterSensitivenessInformation.hpp"
  35. #include "LTLFormula.hpp"
  36. typedef NBA<APElement, EdgeContainerExplicit_APElement> NBA_t;
  37. typedef NBA_t::shared_ptr NBA_ptr;
  38. typedef DRA<APElement, EdgeContainerExplicit_APElement> DRA_t;
  39. typedef DRA_t::shared_ptr DRA_ptr;
  40. /**
  41. * Wrapper to convert from LTL to NBA and from NBA to DRA.
  42. */
  43. class LTL2DRA {
  44. public:
  45. LTL2DRA(Options_Safra& safra_opt,
  46. LTL2NBA<NBA_t> *ltl2nba);
  47. /** Destructor */
  48. ~LTL2DRA() {}
  49. DRA_ptr ltl2dra(LTLFormula& ltl,
  50. LTL2DSTAR_Options options=LTL2DSTAR_Options());
  51. NBA_ptr ltl2nba(LTLFormula& ltl, bool exception_on_failure=false);
  52. DRA_ptr nba2dra(NBA_t& nba,
  53. unsigned int limit=0,
  54. bool detailedStates=false,
  55. StutterSensitivenessInformation::ptr stutter_information=
  56. StutterSensitivenessInformation::ptr());
  57. /** Get the options for Safra's algorithm */
  58. Options_Safra& getOptions() {
  59. return _safra_opt;
  60. }
  61. private:
  62. /** The options for Safra's algorithm */
  63. Options_Safra& _safra_opt;
  64. /** The wrapper for the external LTL-to-Buechi translator */
  65. LTL2NBA<NBA_t>* _ltl2nba;
  66. };
  67. #endif