README.md 2.39 KB
Newer Older
Michele's avatar
Michele committed
1
2
3
4
5
6
7
8
9
10
11
12
## Synopsis

The active-learning-nondeterministic-systems is an implementation of an
adaptation of
[L*](http://www.cs.berkeley.edu/~dawnsong/teaching/s10/papers/angluin87.pdf) to
nondeterministic systems. The code is based on these scientific papers:
* [Active Learning of Nondeterminisitc Systems from an ioco Perspective](http://link.springer.com/chapter/10.1007%2F978-3-662-45234-9_16)
* [Approximate Active Learning of Nondeterministic Input Output Transition Systems](http://www.italia.cs.ru.nl/html/papers/VT15.pdf)

The goal is to constructing a model of a system for model-based testing,
simulation, or model checking.

13
14
15
16
## Included Libraries

[NumPy](https://github.com/numpy/numpy)

Michele's avatar
Michele committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Code Example

Check [the examples folder](examples/) for how to use it.

## Motivation

This code exists as a support implementation to the papers mentioned previously.

## Installation

Clone the repository. Then you can modify any file in [examples](examples/),
or create your own.
If you are using a real system under testing (an actual running black box
  software), you need to write your own adapters to connect it to the
  learning tool. The adapters should inherit from `AbstractTeacher` in
Michele's avatar
Michele committed
32
  [baseteacher.py](teachers/baseteacher.py) and from `AbstractOracle` in
33
34
  [baseoracle.py](teachers/baseoracle.py).

Michele's avatar
Michele committed
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
  In particular, the adapters should implement the abstract methods in
  `AbstractTeacher` and `AbstractOracle`. Those method are used by the
  learner to ask so called **output** and **observation** queries.

  Then you can start learning your system:

```python
teacher = YourOwnAdapterTeacher()
oracle = YourOwnAdapterOracle()

underModel, overModel = LearningAlgorithm(teacher, oracle, maxLoops=10,
                            tablePreciseness = 10000, modelPreciseness = 0.1)
```

where `underModel` and `overModel` are the under and over approximations
of your system, respectively, `maxLoops` is the limit of learning loops
when the learned models are not changing any more, `tablePreciseness` and
`modelPreciseness` are the levels of preciseness you would like to reach
before stopping.

The learning process stops when either the learned model does not change for
`maxLoops` loops, or when both the preciseness levels are met.

## Contributors

If you want to contribute, or if you have questions, you can contact me by
checking [my contact details](https://gitlab.science.ru.nl/u/mvolpato).

## License

Michele Volpato's avatar
Michele Volpato committed
65
See [LICENSE](./LICENSE)