network of automata

This commit is contained in:
Artur Meski
2016-12-28 22:43:26 +01:00
parent 58f06c3fc1
commit f367c5d72c
5 changed files with 19 additions and 13 deletions

View File

@@ -8,3 +8,4 @@ from rs.extended_context_automaton import ExtendedContextAutomaton
from rs.network_of_context_automata import NetworkOfContextAutomata from rs.network_of_context_automata import NetworkOfContextAutomata
from rs.reaction_system_with_automaton import ReactionSystemWithAutomaton from rs.reaction_system_with_automaton import ReactionSystemWithAutomaton
from rs.reaction_system_with_autnet import ReactionSystemWithNetworkOfAutomata

View File

@@ -0,0 +1,11 @@
class ReactionSystemWithNetworkOfAutomata(object):
def __init__(self, reaction_system, context_automata):
self.rs = reaction_system
self.cas = context_automata
def show(self, soft=False):
self.rs.show(soft)
self.cas.show()

View File

@@ -1,9 +1,5 @@
from sys import exit
from colour import *
from rs.reaction_system_with_concentrations import ReactionSystemWithConcentrations from rs.reaction_system_with_concentrations import ReactionSystemWithConcentrations
from rs.context_automaton_with_concentrations import ContextAutomatonWithConcentrations from rs.context_automaton_with_concentrations import ContextAutomatonWithConcentrations
from rs.network_of_context_automata import NetworkOfContextAutomata
class ReactionSystemWithAutomaton(object): class ReactionSystemWithAutomaton(object):

View File

@@ -4,8 +4,8 @@ import rs_examples
def run_tests(): def run_tests():
# test_extended_automaton() test_extended_automaton()
process() # process()
def test_extended_automaton(): def test_extended_automaton():
@@ -33,11 +33,11 @@ def test_extended_automaton():
na = NetworkOfContextAutomata([c1,c2]) na = NetworkOfContextAutomata([c1,c2])
rna = ReactionSystemWithAutomaton(r,na) rna = ReactionSystemWithNetworkOfAutomata(r,na)
rna.show() rna.show()
checker = SmtCheckerRS(rna) checker = SmtCheckerRSNA(rna)
def process(): def process():

View File

@@ -10,12 +10,10 @@ import resource
class SmtCheckerRSNA(object): class SmtCheckerRSNA(object):
"""SMT-based Model Checking for Reaction Systems with Network of Automata""" """SMT-based Model Checking for Reaction Systems with Network of Automata"""
def __init__(self, rsca): def __init__(self, reaction_system_with_netaut):
rsca.sanity_check()
self.rs = rsca.rs self.rs = reaction_system_with_netaut.rs
self.ca = rsca.ca self.ca = reaction_system_with_netaut.cas
self.v = [] self.v = []
self.v_ctx = [] self.v_ctx = []