You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
884 B

import os
import stormpy
import stormpy.logic
from helpers.helper import get_example_path
from configurations import dft
@dft
class TestDft:
def test_modularisation(self):
dft = stormpy.dft.load_dft_galileo_file(get_example_path("dft", "hecs.dft"))
assert dft.nr_elements() == 23
assert dft.nr_be() == 13
assert dft.nr_dynamic() == 2
dfts = dft.modularisation()
assert len(dfts) == 4
for ft in dfts:
assert ft.top_level_element.name in ["n116", "n137", "n120", "n21"]
@dft
class TestDftElement:
def test_element(self):
dft = stormpy.dft.load_dft_json_file(get_example_path("dft", "and.json"))
tle = dft.top_level_element
assert dft.nr_elements() == 3
assert dft.nr_be() == 2
assert dft.nr_dynamic() == 0
assert tle.id == 2
assert tle.name == "A"