[augeas-devel] [libfa] Create a sub-dfa given a dfa and one of its states

Filippo Bistaffa filippo.bistaffa at gmail.com
Wed Mar 25 13:42:04 UTC 2020


Hi all,
I hope this mail finds you all well during these times.
I am using libfa 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.

As an example, given this DFA and the state 0x56191c217e90:

[image: 0.dot.png]
i want to produce the sub-DFA
[image: example.dot.png]

My current (non-working) attempt is:

struct fa *fa_subfa(struct state *st) {
    struct fa *fa = fa_make_empty();
    if (fa) {
        fa->initial = st;
        fa->deterministic= 1;
        fa->minimal = 1;
    }
    return fa;
}

I am not getting the expected results because the internal state list is
not correct.
What is the best way to achieve this?

Thanks in advance,
Filippo Bistaffa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20200325/d822cc17/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0.dot.png
Type: image/png
Size: 134391 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20200325/d822cc17/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.dot.png
Type: image/png
Size: 78093 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20200325/d822cc17/attachment-0001.png>


More information about the augeas-devel mailing list