~verifytapn/verifytapn/1.0

« back to all changes in this revision

Viewing changes to src/main.cpp

  • Committer: Lasse Jacobsen
  • Date: 2010-11-25 13:44:42 UTC
  • Revision ID: lassejac@lassejac-laptop-20101125134442-65r093ij17ylh410
- added experimental feature for using either global of local max constants
  for extrapolation

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
using namespace VerifyTAPN::TAPN;
15
15
using namespace boost;
16
16
 
17
 
void test()
18
 
{
19
 
        dbm::dbm_t dbm(3);
20
 
 
21
 
        dbm.setInit();
22
 
        dbm.constrain(0,1, dbm_bound2raw(-1, dbm_WEAK));
23
 
        dbm.constrain(1,0,dbm_bound2raw(3,dbm_WEAK));
24
 
        dbm.constrain(0,2,dbm_bound2raw(-1,dbm_WEAK));
25
 
        dbm.constrain(2,0,dbm_bound2raw(5,dbm_WEAK));
26
 
        dbm.constrain(1,2,dbm_bound2raw(2,dbm_WEAK));
27
 
        dbm.constrain(2,1,dbm_bound2raw(2, dbm_WEAK));
28
 
 
29
 
 
30
 
        int max[] = { 3,-dbm_INFINITY,3 };
31
 
 
32
 
        std::cout << "dbm: \n";
33
 
        std::cout << dbm << "\n\n";
34
 
 
35
 
        dbm::dbm_t dbm2(3);
36
 
 
37
 
        dbm2.setInit();
38
 
        dbm2.constrain(0,1, dbm_bound2raw(-2, dbm_WEAK));
39
 
        dbm2.constrain(1,0,dbm_bound2raw(3,dbm_WEAK));
40
 
        dbm2.constrain(0,2,dbm_bound2raw(-1,dbm_WEAK));
41
 
        dbm2.constrain(2,0,dbm_bound2raw(4,dbm_WEAK));
42
 
        dbm2.constrain(1,2,dbm_bound2raw(2,dbm_WEAK));
43
 
        dbm2.constrain(2,1,dbm_bound2raw(2, dbm_WEAK));
44
 
 
45
 
 
46
 
        std::cout << "dbm2: \n";
47
 
        std::cout << dbm2 << "\n\n";
48
 
 
49
 
        relation_t relation = dbm2.relation(dbm);
50
 
 
51
 
        std::cout << "relation:\n";
52
 
        std::cout << "dbm2 <subset eq> dbm: " << ((relation & base_SUBSET) != 0 ? "true" : "false") << "\n";
53
 
 
54
 
        dbm2.extrapolateMaxBounds(max);
55
 
 
56
 
        std::cout << "dbm2 inactive:\n";
57
 
        std::cout << dbm2 << "\n";
58
 
 
59
 
        relation = dbm2.relation(dbm);
60
 
 
61
 
        std::cout << "relation:\n";
62
 
        std::cout << "dbm2 <subset eq> dbm: " << ((relation & base_SUBSET) != 0 ? "true" : "false") << "\n";
63
 
 
64
 
 
65
 
}
66
17
 
67
18
int main(int argc, char* argv[]) {
68
 
        //test();
69
19
        VerificationOptions options = VerificationOptions::ParseVerificationOptions(argc, argv);
70
20
 
71
21
        TAPNXmlParser modelParser;