~tapaal-ltl/verifypn/scc-optimise

« back to all changes in this revision

Viewing changes to include/PetriParse/QueryXMLParser.h

  • Committer: srba.jiri at gmail
  • Date: 2020-09-11 14:23:39 UTC
  • mfrom: (213.1.151 interval_tar)
  • Revision ID: srba.jiri@gmail.com-20200911142339-bq9328s1gppw24uj
merged in lp:~verifypn-maintainers/verifypn/interval_tar doing 
- Implements TAR w/o z3, but using a simple integer inference engine for Hoare logic.
 - Replaces LP-Solve with GLPK, reduces computation-time and memory overhead
 - Implements new global properties, translated into CTL formulae.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* VerifyPN - TAPAAL Petri Net Engine
 
2
 * Copyright (C) 2014 Jiri Srba <srba.jiri@gmail.com>
 
3
 *                    Peter Gjøl Jensen <root@petergjoel.dk>
 
4
 * This program is 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
 
 
18
#ifndef QUERYXMLPARSER_H
 
19
#define QUERYXMLPARSER_H
 
20
 
 
21
#include <map>
 
22
#include <string>
 
23
#include <string.h>
 
24
#include <vector>
 
25
#include <memory>
 
26
#include <sstream> 
 
27
#include <set>
 
28
 
 
29
#include <rapidxml.hpp>
 
30
 
 
31
#include "PNMLParser.h"
 
32
#include "QueryParser.h"
 
33
using namespace PetriEngine::PQL;
 
34
 
 
35
class QueryXMLParser {
 
36
public:
 
37
    QueryXMLParser();
 
38
    ~QueryXMLParser();
 
39
 
 
40
    std::vector<QueryItem>  queries;
 
41
 
 
42
    bool parse(std::ifstream& xml, const std::set<size_t>& );
 
43
    void printQueries();
 
44
    void printQueries(size_t i);
 
45
 
 
46
private:
 
47
    bool parsePropertySet(rapidxml::xml_node<>* element, const std::set<size_t>&);
 
48
    bool parseProperty(rapidxml::xml_node<>*  element);
 
49
    bool parseTags(rapidxml::xml_node<>*  element);
 
50
    Condition_ptr parseFormula(rapidxml::xml_node<>*  element);
 
51
    Condition_ptr parseBooleanFormula(rapidxml::xml_node<>*  element);
 
52
    Expr_ptr parseIntegerExpression(rapidxml::xml_node<>*  element);
 
53
    string parsePlace(rapidxml::xml_node<>*  element);
 
54
    void fatal_error(const std::string& token);
 
55
};
 
56
 
 
57
#endif /* QUERYXMLPARSER_H */
 
58