test.py 818 Bytes
Newer Older
yoogx's avatar
yoogx committed
1
2
#! /usr/bin/python

Jerome Hugues's avatar
Jerome Hugues committed
3
4
import ocarina
import lmp
yoogx's avatar
yoogx committed
5
6
7
8
9

def main ():
    '''Test function'''

    err=ocarina.load("rma.aadl");                   # load a file
10
    print 'load("rma.aadl"),:', err
Jerome Hugues's avatar
Jerome Hugues committed
11

yoogx's avatar
yoogx committed
12
    err=ocarina.load("deployment.aadl");            # load a file
13
    print 'load("deployment.aadl"):', err
Jerome Hugues's avatar
Jerome Hugues committed
14

yoogx's avatar
yoogx committed
15
    err=ocarina.analyze();                          # analyze models
16
    print 'ocarina.analyze():', err
Jerome Hugues's avatar
Jerome Hugues committed
17
18

    err=ocarina.instantiate("rma.impl");           # instantiate system
19
20
21
22
23
24
25
26
27
28
    print 'ocarina.instantiate("rma.impl"):', err

    err=ocarina.add_real_library("rma.real");
    print err;

    err=ocarina.set_real_theorem("check_scheduling");
    print err;

    err=ocarina.generate (ocarina.Backends.real_theorem);
    print err;
yoogx's avatar
yoogx committed
29
30
31
32

if __name__ == "__main__":
    main ()
    sys.exit (0);                       # exit