__init__.py 399 Bytes
Newer Older
1
from abc import ABCMeta, abstractmethod
2
3
4
5
6
7
8
9
import z3

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]
10
11
12

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