LCOV - code coverage report
Current view: top level - lts/include/mcrl2/lts - lts_aut.h (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 7 7 100.0 %
Date: 2019-06-26 00:32:26 Functions: 11 11 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Author(s): Jan Friso Groote
       2             : // Copyright: see the accompanying file COPYING or copy at
       3             : // https://github.com/mCRL2org/mCRL2/blob/master/COPYING
       4             : //
       5             : // Distributed under the Boost Software License, Version 1.0.
       6             : // (See accompanying file LICENSE_1_0.txt or copy at
       7             : // http://www.boost.org/LICENSE_1_0.txt)
       8             : //
       9             : 
      10             : /** \file
      11             :  *
      12             :  * \brief This file contains a class that contains labelled transition systems in aut format.
      13             :  * \details A labelled transition system in aut format is a transition system
      14             :  * with empty state labels, and strings as transition labels.
      15             :  * \author Jan Friso Groote
      16             :  */
      17             : 
      18             : 
      19             : #ifndef MCRL2_LTS_LTS_AUT_H
      20             : #define MCRL2_LTS_LTS_AUT_H
      21             : 
      22             : #include <istream>
      23             : #include "mcrl2/lps/state_probability_pair.h"
      24             : #include "mcrl2/lts/probabilistic_arbitrary_precision_fraction.h"
      25             : #include "mcrl2/lts/state_label_empty.h"
      26             : #include "mcrl2/lts/action_label_string.h"
      27             : #include "mcrl2/lts/probabilistic_lts.h"
      28             : 
      29             : 
      30             : namespace mcrl2
      31             : {
      32             : namespace lts
      33             : {
      34             : 
      35             : namespace detail
      36             : {
      37             : 
      38             : 
      39             : 
      40         502 : class lts_aut_base
      41             : {
      42             :   public:
      43             :     /** \brief Provides the type of this lts, in casu lts_aut.  */
      44          65 :     lts_type type()
      45             :     {
      46          65 :       return lts_aut;
      47             :     }
      48             : 
      49             :     /** \brief Standard swap function. */
      50           7 :     void swap(lts_aut_base& )
      51             :     {
      52             :       // Does intentionally not provide any action.
      53           7 :     }
      54             : };
      55             : 
      56             : } // end namespace detail
      57             : 
      58             : 
      59             : /** \brief A simple labelled transition format with only strings as action labels.
      60             :  *  \details This lts format corresponds to the Ceasar/Aldebaran labelled transition
      61             :  *  system format. There are no state labels, only transition labels which are plain
      62             :  *  strings.
      63             :  */
      64        1808 : class lts_aut_t : public lts< state_label_empty, action_label_string, detail::lts_aut_base>
      65             : {
      66             :   public:
      67             : 
      68             :     /** \brief Load the labelled transition system from a file.
      69             :      *  \details If the filename is empty, the result is read from stdin.
      70             :                  The input file must be in .aut format.
      71             :      *  \param[in] filename Name of the file from which this lts is read.
      72             :      */
      73             :     void load(const std::string& filename);
      74             : 
      75             :     /** \brief Load the labelled transition system from an input stream.
      76             :      *  \details The input stream must be in .aut format.
      77             :      *  \param[in] is The input stream.
      78             :      */
      79             :     void load(std::istream& is);
      80             : 
      81             :     /** \brief Save the labelled transition system to file.
      82             :      *  \details If the filename is empty, the result is written to stdout.
      83             :      *  \param[in] filename Name of the file to which this lts is written.
      84             :      */
      85             :     void save(const std::string& filename) const;
      86             : };
      87             : 
      88             : /** \brief A simple labelled transition format with only strings as action labels.
      89             :  *  \details This lts format corresponds to the Ceasar/Aldebaran labelled transition
      90             :  *  system format. There are no state labels, only transition labels which are plain
      91             :  *  strings.
      92             :  */
      93          28 : class probabilistic_lts_aut_t : 
      94             :             public probabilistic_lts< state_label_empty, 
      95             :                                       action_label_string, 
      96             :                                       mcrl2::lts::probabilistic_state<std::size_t, mcrl2::lts::probabilistic_arbitrary_precision_fraction>,
      97             :                                       detail::lts_aut_base>
      98             : {
      99             :   public:
     100             : 
     101             :     /** \brief Load the labelled transition system from a file.
     102             :      *  \details If the filename is empty, the result is read from stdin.
     103             :                  The input file must be in .aut format.
     104             :      *  \param[in] filename Name of the file from which this lts is read.
     105             :      */
     106             :     void load(const std::string& filename);
     107             : 
     108             :     /** \brief Load the labelled transition system from an input stream.
     109             :      *  \details The input stream must be in .aut format.
     110             :      *  \param[in] is The input stream.
     111             :      */
     112             :     void load(std::istream& is);
     113             : 
     114             :     /** \brief Save the labelled transition system to file.
     115             :      *  \details If the filename is empty, the result is written to stdout.
     116             :      *  \param[in] filename Name of the file to which this lts is written.
     117             :      */
     118             :     void save(const std::string& filename) const;
     119             : };
     120             : 
     121             : } // namespace lts
     122             : } // namespace mcrl2
     123             : 
     124             : #endif

Generated by: LCOV version 1.12