~verifydtapn-contributers/verifydtapn/trunk

« back to all changes in this revision

Viewing changes to src/DiscreteVerification/DataStructures/CoveredMarkingVisitor.h

  • Committer: Jiri Srba
  • Date: 2015-08-31 12:39:10 UTC
  • mfrom: (324.3.24 PTrieWorkflow)
  • Revision ID: srba@cs.aau.dk-20150831123910-qwr9g6pq7zntajhe
merged in a big branch implementing PTrie for workflow analysis

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * File:   CoveredMarkingVisitor.h
 
3
 * Author: Peter G. Jensen
 
4
 *
 
5
 * Created on 17 June 2015, 00:04
 
6
 */
 
7
 
 
8
#ifndef COVEREDMARKINGVISITOR_H
 
9
#define COVEREDMARKINGVISITOR_H
 
10
 
 
11
#include "binarywrapper.h"
 
12
#include <limits>
 
13
#include <vector>
 
14
#include "ptrie.h"
 
15
#include "visitor.h"
 
16
#include "MarkingEncoder.h"
 
17
#include "NonStrictMarkingBase.hpp"
 
18
#include "NonStrictMarking.hpp"
 
19
 
 
20
 
 
21
using namespace ptrie;
 
22
namespace VerifyTAPN {
 
23
namespace DiscreteVerification {
 
24
    
 
25
    class CoveredMarkingVisitor
 
26
    : public visitor_t<MetaData*>
 
27
    {
 
28
        typedef binarywrapper_t<MetaData*> encoding_t;
 
29
        private:
 
30
            MarkingEncoder<MetaData*, NonStrictMarking>& encoder;
 
31
            NonStrictMarking* target;
 
32
            encoding_t scratchpad;
 
33
            ptriepointer_t<MetaData*> match;
 
34
            bool _found;
 
35
            ptriepointer_t<MetaData*> _targetencoding;
 
36
            
 
37
        private:
 
38
            bool target_contains_token(unsigned long long placeage, uint count);
 
39
            
 
40
        public:
 
41
            CoveredMarkingVisitor(
 
42
                            MarkingEncoder<MetaData*, NonStrictMarking>& enc);
 
43
            ~CoveredMarkingVisitor();
 
44
            virtual bool back(int index);
 
45
            virtual bool set(int index, bool value);
 
46
            virtual bool set_remainder(int index,
 
47
                                            ptriepointer_t<MetaData*> pointer);
 
48
            void set_target(NonStrictMarking* m, ptriepointer_t<MetaData*> me);
 
49
            NonStrictMarking* decode();
 
50
            bool found(){return _found;}
 
51
    };
 
52
    
 
53
}
 
54
}
 
55
 
 
56
#endif  /* BINARYMARKINGVISITOR_H */
 
57