Revision history for Algorithm-QuineMcCluskey
2015-6-12
- The minimum perl required was 5.10.1, but the module
was using the /r modifier on the tr// operator, which
doesn't appear until 5.14. Oops. Changed the string
assignment order in dual() and complement().
- Version goes to 0.03, and up to CPAN.
2015-6-11
- Realized that the maskmatcher regex could be changed to
not require the don't-care character, which means it doesn't
need to be in the parameter list of maskmatcher(),
purge_elements(), or remels().
- Renamed maskmatcher() maskedmatch(), because the grammar
was bugging me.
- With that, Version 0.02 is ready for CPAN.
2015-6-3
- Util.pm now has an %EXPORT_TAGS.
- Change the covers attribute to contain all of the minimal
covers, not just the one that happens to be in the zeroth
position in the covers array.
- Change solve() to return a scalar.
- With solve() now returning a scalar, change tests to look
for an answer in a set of possible answers (some terms sets
can be covered by more than one equation.)
2015-5-30
- Make remels() remove the hash key if the array ref is empty.
- Change columns() to not auto-create empty keys.
2015-4-18
- Made the primes attribute "lazy", so that one can look
up prime implicants without going through the solving
process.
2015-4-15
- Replace row_dom() and col_dom() with row_dominance()
in Util.pm. When they were changed to returning keys
instead of deleting from the hash immediately, they
became essentially the same function, just called
with different parameters.
2015-3-27
- Changed row_dom() and col_dom() to return the rows/cols
to remove, instead of removing them inside.
- Changed row_dom() and col_dom() from methods to functions,
and moved the code to Util.pm
2015-3-6
- Method find_essentials() is essentially a single-term search
through the hash of arrays. Changed it from a method to a
function and moved it to Util.pm.
- Found an error in remels(), which was only removing one
matched array element instead of all matched elements.
2015-1-26
- Changed argument list to purge_essentials(). Had been
taking an esssentials hash, but since it was only using the
keys of the hash, we only need to pass those.
- In purge_essentials() change the order of deletion. The
primes hash "rows" (hash entries) are removed first,
*before* going through the hash to look for the "column"
in the array ref. Shortens the search for the "column".
- The argument list change lets me use purge_essentials()
later in recurse_solve(), replacing a remels()/delete
pair of lines.
- Renamed purge_essentials() to purge_elements(), since
the above change means we're not just purging essentials
now.
2015-1-18
- Removed sortterms attribute -- always sort.
- Simplified covers loop (helped by removing sortterms).
- Moved a constant calculation of the %reduced hash out
a loop.
2015-1-16
- New function tableformat() (current name, at least) to show
primes hash in the table form used in textbook Quine-McCluskey
descriptions. Should help users understand what's going on,
and help in debugging too.
- New module to contain tableforms() (and future functions),
named it Algorithm::QuineMcCluskey::Format.
- Do-while using is_LequivalentR() was supposed to be comparing
hash keys, but a 'keys' had been left off on one side.
Fixing that saves at least one loop.
- Avoid calling recurse_solve() if the reduced primes hash is
empty.
2015-1-6
- Added new object-creating methods dual() and complement().
- Added tests for the new methods.
2015-1-1
- No default parameters for find_essentials(). The primes
hash must be passed in, while the binary-formatted terms
are collectd from the object.
- Found spots in QM.pm and Util.pm where a "sum map {}"
construct can be replaced with "any {}", which has the
advantage of early break out of the loop on a match.
2014-12-3
- The weight count in find_primes() and the cost count in
recursive_solve() were using sum of a map block using
split. A match in list context is much simpler, changed
them to that (and put the function for it in Util.pm).
2014-11-27
- Add \Q and \E around don't-care character in maskmatcher()
substitution code in case someone chose a substitution
metacharacter as their don't-care character.
2014-11-26
- Was looping around remel() for each arrayref in the hash.
Now just pass the hash in directly (this necessitated
changing one of the outer loops in purge_essentials,
and remel() becomes remels()).
2014-11-13
- The test with don't-care terms randomly fails two thirds
of the time. Separate it into its own file, and add
debugging statements.
2014-11-4
- Extended the object test to consider minterms, maxterms,
and columnstrings methods of creation.
- deAlias considered finished and merged into the master
branch.
2014-10-31
- Added columnstring attribute, and wrote bitstring code
for setting and getting it.
- Changed minterms, maxterms, and dontcares back to
'rw', allowing the columnstring attribute to set them.
2014-10-28
- Changed to_boolean() to take an argument list instead of
automatically using the covers attribute internally. This
will allow the user (or the test files) to check terms before
or during minimization.
- Separated out the var-by-var code from to_boolean(). Now it
calls a new method to_boolean_term() for each individual term
in the covers (or other) list, for easier output manipulation.
2014-09-28
- The 'covers' attribute gets changed from ArrayRef[Int] to
ArrayRef[Str].
2014-09-21
- Added namespace::autoclean as recommended in the Moose Best
Practices manual.
- Changed the all the "terms" attributes to 'ro'.
2014-09-19
- For internal clarity, renamed allterms() to all_bit_terms(),
and minmax_terms() to minmax_bit_terms().
- Methods maskmatch() and maskmatches() now combined into a single
method (one called the other, but there was no reason for the
separate internal function, and it saved re-creating
utility variables over and over).
- Check if there's an overlap between the don't-care list and
the min or max term list, and call it an error if there is.
- Attributes actually check their type now (thanks Moose) so
the qw operators around the term lists are now removed in
the documentation and in the test files.
2014-08-20
- No more default arguments (in the form of $self->get_primes())
for row_dom(), col_dom(), and purge_essentials(). Always
pass in the argument -- it's less confusing that way.
- Trim Util.pm of tobits() -- it's embedded in BUILD now.
2014-08-19
- More work in find_primes(). An array slice in a hash isn't
working as originally coded (I seem to recall the rules
changing some time ago). Changed it to two statements for
now.
2014-07-07
- After looking over the labeling in the run.t file, added
a new attribute, "title". We can now say what the A::QMcC
object actually represents.
- Broke up run.t into separate test files. The original
file was compact and in theory easy to add to, but I was
having trouble figuring out what was causing my Moose
errors. Plus, there were too many eval calls in the code.
- The original code changed the minterms, maxterms, and
dontcares attributes from the passed-in list of decimal
into bitstrings, and saved them back in the attributes.
We can't do that now, because Moose has set those fields
typed as 'ArrarRef[Int]'.
So, set up three new fields that represent the three fields
in their bitstring form: min_bits, max_bits, and dc_bits.
2014-04-30
- Moosified ("has" declarations) the attributes.
- Achieved a compile-error-free version using Moose instead
of Alias. Now to make it runtime-error-free.
- As part of the compilation process, moved from a Makefile.PL
base (which was creating errors of its own) to Build.PL,
which Just Works.
- Turned attributes boolean, imp, and bits into a local
variables as they were only used in single functions.
- Defined and made use of predicate functions for attributes
minterms, maxterms, and dontcares. Simplifies some sanity
checks.
- Added methods allterms() and minmax_terms() to simplify
coding.
- List::MoreUtils isn't actually being used in A::QMcC (it is
used in A::QMcC::Util though).
0.01 2006-06-24T21:32-0500
First version, released on an unsuspecting world. Supports
single-output problems only.