<div dir="ltr">Hi all,<div>I hope this mail finds you all well during these times.</div><div>I am using <font face="monospace">libfa</font> in a project, and one of the tasks I am trying to achieve is: given a DFA and one of its states S, create a new "sub-DFA" starting from the state S.</div><div><br></div><div>As an example, given this DFA and the state <font face="monospace">0x56191c217e90</font>:</div><div><br></div><div><div><img src="cid:ii_k87dew760" alt="0.dot.png" width="542" height="336"><br></div></div><div>i want to produce the sub-DFA<br></div><div><img src="cid:ii_k87dfn6f1" alt="example.dot.png" width="542" height="311"><br></div><div><br></div><div>My current (non-working) attempt is:</div><div><br></div><div><span style="font-family:monospace">struct fa *fa_subfa(struct state *st) {</span><br></div><div><font face="monospace">    struct fa *fa = fa_make_empty();<br>    if (fa) {<br>        fa->initial = st;<br>        fa->deterministic= 1;<br>        fa->minimal = 1;<br>    }<br>    return fa;<br>}</font><br></div><div><br></div><div>I am not getting the expected results because the internal state list is not correct.</div><div>What is the best way to achieve this?</div><div><br></div><div>Thanks in advance,</div><div>Filippo Bistaffa</div></div>