Open
Description
Is your feature request related to a problem? Please describe.
The following code does not work:
from pythomata.impl.symbolic import SymbolicDFA
from sympy import symbols
a = symbols("a")
dfa = SymbolicDFA()
dfa.create_state()
dfa.add_transition((0, a, 1))
dfa.set_accepting_state(1, True)
# returns True, correctly
dfa.accepts([{"a": True}])
# it raises ValueError: Symbol {a: True} is not valid.
dfa.accepts([{a: True}])
The reason is that SymbolicDFA.accepts
accepts only PropositionalInterpretation
whose labels are of type str
and not sympy.Symbol
.
Describe the solution you'd like
Make it work. That is, try to be more flexible on the data validation in SymbolicDFA.accepts
.
Describe alternatives you've considered
n/a
Additional context
n/a
Metadata
Metadata
Assignees
Labels
No labels