~tapaal-ltl/verifypn/scc-optimise

« back to all changes in this revision

Viewing changes to PetriEngine/Simplification/Vector.cpp

  • 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
 
/*
2
 
 * To change this license header, choose License Headers in Project Properties.
3
 
 * To change this template file, choose Tools | Templates
4
 
 * and open the template in the editor.
5
 
 */
6
 
 
7
 
/* 
8
 
 * File:   Vector.cpp
9
 
 * Author: Peter G. Jensen
10
 
 *
11
 
 * Created on 31 May 2017, 09:26
12
 
 */
13
 
 
14
 
#include "Vector.h"
15
 
#include "LPCache.h"
16
 
 
17
 
namespace PetriEngine {
18
 
    namespace Simplification {
19
 
        
20
 
        void Vector::free()
21
 
        {
22
 
            --ref;
23
 
            if(ref == 0)
24
 
            {
25
 
                factory->invalidate(*this);
26
 
            }
27
 
        }
28
 
        
29
 
        void Vector::inc()
30
 
        {
31
 
            ++ref;
32
 
        }
33
 
 
34
 
        size_t Vector::data_size() const 
35
 
        {
36
 
            return _data.size() * sizeof(std::pair<int,int>);
37
 
        }
38
 
        
39
 
    }
40
 
}
 
 
b'\\ No newline at end of file'