Skip Menu |

This queue is for tickets about the FLAT CPAN distribution.

Report information
The Basics
Id: 124032
Status: resolved
Priority: 0/
Queue: FLAT

People
Owner: Nobody in particular
Requestors: user42_kevin [...] yahoo.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: suggest get state equivalence classes
Date: Mon, 08 Jan 2018 17:10:23 +1100
To: bug-FLAT [...] rt.cpan.org
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
As an idea for a feature, it could be good to have some method returning the state equivalences which as_min_dfa() finds. I had a semi-manual created state machine matcher which was not minimal and I couldn't quite tell which states were equivalent. I stuck a print in as_min_dfa() to find out and thought its find-equivalences could be offered separately. Not sure exactly what form would be good to return equivalences. The existing list of arefs of state numbers could be ok. I suppose it depends what you might do with it. In my case it was print out the >=2 size classes.
On Mon Jan 08 01:11:30 2018, user42_kevin@yahoo.com.au wrote: Show quoted text
> As an idea for a feature, it could be good to have some method returning > the state equivalences which as_min_dfa() finds. > > I had a semi-manual created state machine matcher which was not minimal > and I couldn't quite tell which states were equivalent. I stuck a print > in as_min_dfa() to find out and thought its find-equivalences could be > offered separately. > > Not sure exactly what form would be good to return equivalences. The > existing list of arefs of state numbers could be ok. I suppose it > depends what you might do with it. In my case it was print out the >=2 > size classes.
Thank you for the suggestion. I created a new class, FLAT::DFA::Minimal. FLAT::DFA->as_min_dfa now returns a FLAT::DFA::Minimal. It isa FLAT::DFA, with the additional "EQUIVALENCE_CLASSES" field, which is accessible via the getter and setter, FLAT::DFA::Minimal->get_equivalence_classes and FLAT::DFA::Minimal->set_equivalence_classes (meant only for use inside of FLAT::DFA->as_min_dfa, respective. I just uploaded version 0.9.4 to PAUSE, so it should be available soon. Thanks!