whitemech / LTLf2DFA

From LTLf / PPLTL to Deterministic Finite-state Automata (DFA)
http://ltlf2dfa.diag.uniroma1.it/
GNU Lesser General Public License v3.0
63 stars 9 forks source link

Example on PyPI project page doesn't work #61

Closed dgenin closed 10 months ago

dgenin commented 10 months ago

PyPI project page suggest the following example usage:

from ltlf2dfa.parser.pltlf import PLTLfParser

parser = PLTLfParser()
formula_str = "H(a -> Y b)"
formula = parser(formula_str)       # returns a PLTLfFormula

print(formula)

followed by

dfa = formula.to_dfa()
print(dfa)

The first part behaves as described but generating the DFA fails with

Could not find the value .*DFA for formula with free variables:[\s]*(.*?)\n.*, in the text provided
Could not find the value .*Accepting states:[\s]*(.*?)\n.*, in the text provided

the output of print(dfa) is an empty graph

digraph MONA_DFA {
 rankdir = LR;
 center = true;
 size = "7.5,10.5";
 edge [fontname = Courier];
 node [height = .5, width = .5];
 node [shape = doublecircle]; 0.0;
 node [shape = circle]; 1;
 init [shape = plaintext, label = ""];
 init -> 1;
}
francescofuggitti commented 10 months ago

Hi @dgenin! Thanks for using LTLf2DFA. Regarding your issue, please make sure MONA is installed correctly. (cf. Issue #44).