Awali
Another Weighted Automata library
equality.hh
Go to the documentation of this file.
1 // This file is part of Awali.
2 // Copyright 2016-2022 Sylvain Lombardy, Victor Marsault, Jacques Sakarovitch
3 //
4 // Awali is a free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef COMMON_JSON_EQUALITY_HH
18 #define COMMON_JSON_EQUALITY_HH
19 
20 #include <cstddef>
21 
23 #include <awali/common/json_ast.hh>
24 
25 namespace awali {
26 namespace json {
27 
28 namespace internal {
29 
30  bool equal(node_t const* left, node_t const* right, path_t* path = nullptr);
31 
32 }//end of namespace awali::json::internal
33 
34 
35 
39 path_t* diff(json_ast_t left, json_ast_t right, bool ignore_metadata=true);
40 
41 bool equal(json_ast_t left, json_ast_t right, bool ignore_metadata = true);
42 
43 
44 
45 }//end of namespace awali::json
46 }//end of namespace awali
47 
48 
49 #endif
Definition: node.hh:193
std::ostream & json(automaton_t aut, std::ostream &out)
bool equal(node_t const *left, node_t const *right, path_t *path=nullptr)
std::vector< uint_or_string_t > path_t
Definition: node.hh:85
bool equal(json_ast_t left, json_ast_t right, bool ignore_metadata=true)
path_t * diff(json_ast_t left, json_ast_t right, bool ignore_metadata=true)
Return the path where occurs the smallest difference between left and right, or nullptr if the two tr...
Main namespace of Awali.
Definition: ato.hh:22
std::shared_ptr< json::object_t > json_ast_t
Definition: json_ast.hh:27