__init__.py 401 Bytes
Newer Older
1
from abc import ABCMeta, abstractmethod
2

3
4
import z3

5

6
7
8
9
10
11
def enum(name, elements):
    d = z3.Datatype(name)
    for element in elements:
        d.declare(element)
    d = d.create()
    return d, [d.__getattribute__(element) for element in elements]
12
13
14

class Automaton(metaclass=ABCMeta):
    @abstractmethod
15
    def export(self, model):
16
        """Returns a z3gi.model for this automaton."""
17
        pass