mCRL2
Loading...
Searching...
No Matches
pbes_io.h
Go to the documentation of this file.
1// Author(s): Wieger Wesselink
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#ifndef MCRL2_PBES_DETAIL_PBES_IO_H
11#define MCRL2_PBES_DETAIL_PBES_IO_H
12
13#include "mcrl2/pbes/pbes.h"
14
15#include <fstream>
16
17namespace mcrl2::pbes_system
18{
19
22
25
26namespace detail
27{
28
30pbes load_pbes(const std::string& filename);
31
33void save_pbes(const pbes& pbesspec, const std::string& filename);
34
35// inline
36// std::string file_extension(const std::string& filename)
37// {
38// auto pos = filename.find_last_of('.');
39// if (pos == std::string::npos)
40// {
41// return "";
42// }
43// return filename.substr(pos + 1);
44// }
45//
46// inline
47// void my_save_pbes(const pbes& p, const std::string& filename)
48// {
49// auto ext = file_extension(filename);
50// if (ext == "pbes")
51// {
52// save_pbes(p, filename, pbes_format_internal());
53// }
54// else if (ext == "bes")
55// {
56// bes::save_pbes(p, filename, bes::bes_format_internal());
57// }
58// else if (ext == "pg")
59// {
60// bes::save_pbes(p, filename, bes::bes_format_pgsolver());
61// }
62// else
63// {
64// pbes_system::save_pbes(p, filename);
65// }
66// }
67
68} // namespace detail
69
70} // namespace mcrl2::pbes_system
71
72#endif // MCRL2_PBES_DETAIL_PBES_IO_H
The interface for a class that reads aterm from a stream. The default constructed term aterm() indica...
Definition aterm_io.h:59
The interface for a class that writes aterm to a stream. Every written term is retrieved by the corre...
Definition aterm_io.h:48
pbes load_pbes(const std::string &filename)
Loads a PBES from filename, or from stdin if filename equals "".
Definition io.cpp:292
void save_pbes(const pbes &pbesspec, const std::string &filename)
Saves an PBES to filename, or to stdout if filename equals "".
Definition io.cpp:307
The main namespace for the PBES library.
Definition absinthe.h:28
std::istream & operator>>(std::istream &is, absinthe_strategy &strategy)
std::ostream & operator<<(std::ostream &os, const absinthe_strategy strategy)
The class pbes.