All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- the
AtomStrategyhandles extra parameters when counting, finding equations and sampling
from_dictmethods usecopyto avoid deleting dicts
- Bug in
CombinatorialSpecification.get_rulewhich broke the equality ofEmptyStrategyrules in specs.
- Minimum Python version updated from 3.8 to 3.10
- Migrated from setup.py to modern pyproject.toml packaging with hatchling backend
- Updated GitHub Actions workflows to use latest versions and modern build commands
- Updated README badges: replaced deprecated Travis CI and requires.io badges with GitHub Actions
CombinatorialSpecification.expand_verifiedwill expand all classes that use the same pack at once
- setup.py and MANIFEST.in files (replaced by pyproject.toml configuration)
VerificationRule.from_dictreapplies strategies.
- Bug in
CombinatorialSpecification.expand_comb_class, it will now unpack all of theEquivalencePathRules. - Bug in
Quotient.get_terms. Look at reliance profile to check for initial conditions, so as to avoid max recursion error. CombinatorialSpecification.get_genfwill not try to solve systems of equations with catalytic variables.- Bug in
DisjointUnion.build_param_map. If two params map to the same, then these shouldn't sum. EquivalencePathRulecan not acceptComplementrules where two parameters map to the same parameter as this will result in more than permuting labels.
- Update dependency on psutil from 5.8 to 5.9.4
- Update dependency on sympy from 1.9 to 1.10.1
- Update dependency on pympler from 0.9 to 1.0.1
- Update dependency on requests from 2.26.0 to 2.28.1
- Update dependency on typing-extensions from 4.0.0 to 4.4.0
- Update dependency on tabulate from 0.8.9 to 0.9.0
- Updated dependencies in the tox file
- Make specification iterable
- Add a
get_comb_classmethod to combinatorial specification StrategyPack.add_expansionandStrategyPack.remove_strategymethods- Add a flag
classdbandclassqueuetocomb_spec_searcher.__init__
- The
get_termsnow have unique keys for the parameters to save memory. CombinatorialSpecification.expand_verifiedwill try to find a spec allowing reverse rules if it fails without.- The labels assigned to nodes will always be in DFS order now.
- Fixing bug creating non productive forest when expanding verified classes
- Handled properly when user asks for an random object of a size the class does not have
- Trying to verify the class being expanded when expanding a combinatorial specification.
- Bug in complement constructors inside equivalence path rules.
- Reverse rule default back to the equation of the original rule in case
NotImplementedError find_bijection_betweentries to find a bijection between classes given aCombinatorialSpecificationSearcherobject for both.- Added Forest searching capability to the css. Those are specification that can you reverse rule that are not equivalences.
- Special forward and backward maps, called indexed forward and backward maps. They are to be used for bijections and their purposes is to support bijections for non-injective forward maps by labelling the resulting objects or map from an labelled object.
NonBijectiveRulewill implement a labelling system for indexed forward and backward maps.EqPathParallelSpecFinderthat, on top of the base class, validates any potential path contained in equivalence labels.PartialSpecificationRuleExtractorthat extracts rules from partially built specifications and two subclasses with specific applications of that.
- If a rule in a specification cannot be sanity checked (e.g., counting is not implemented), a warning is printed and sanity checking continues, instead of returning the exception.
- More responsibility have been delegated to the rule database. This will allow for more flexibility in the implementation of the rule database. Things like computing specification rule now happens at the rule db level.
- Removed a debug print
- Sharing of a specification html via gofile API.
- Moves local
Constructor.param_mapfunction outward so that specifications can be pickled. - Fix bug in complement constructor counting
- Fixing a bug in counting for equivalence rule from a reverse rule
- Fixing in the formal step of reverse equivalence rule. The formal step now state that the rule is reversed.
- Removed bug in equation of
DisjointUnionthat ignores multiple CVs mapping to the same in a child
- Python 3.6 is no longer supported
LimitedStrategyRuleDBis not longer part of css
- Automatic bijection between equivalent specifications through the functions
get_bijection_toandare_isomorphicof the specifications class. The bijection object holds amapfunction that performs the actual mapping. - Sanity check for random sampling on rule
- Strategy must not define a
is_two_waymethod in order to decide if they can be used to find the count of a children knowing the parent's and other children' count. If so the constructor returned by the new methodreverse_constructoris used. - Adds
expand_all_verified_with_packtoSpecificationto attempt expansion of verified nodes with a given pack and time limit. - Adds
unexpanded_verified_classestoSpecificationto return the set of verified classes.
- Specification are now built using a set of rules
- The json format of a spec is based storing the json format of its rule
- Streamlined the extraction of a specification from a searcher.
- All unary strategy are now store at the level of the equivalence database in order to avoid some productivity issue with catalytic variables.
- Adds a
max_expansion_timeoptional parameter tocomb_spec_searcher._auto_search_rules.
forward_mapofEquivalencePathRuleall_specificationsmethod ofRuleDB
- Computation of terms in the constructor is now on a per size basis. The value for each possible parameters is computed at once in the new
get_termsfunction of constructor. If you do not implement your own constructor this should have no effect on your code. The oldgenerate_object_of_sizemethod of the constructor is also replaced by aget_objectsmethod that returns the objects for each possible combination of parameters.
- Can sample and generate objects from specifications using multiple parameters.
- Sanity check tests object generation for rules with multiple parameteres.
- Removed the processname extra from logging
- when passed a multivariate function, the
taylor_expandfunction expands inx. - A division by zero error that occurred making the status update before starting to run.
- using Github Actions for testing and deployment
- add specification sharing function to
ForestSpecificationDrawer
- when using a
LimitedStrategyRuleDB, searching is aborted much faster when the root is not in the first pruned rules dictionary
- use
AbstractRuleinstead ofRulein_rules_from_strategy - fix
CombinatorialSpecification.share()which was missing
- fixed the type hints
- a
SpecificationDrawerfor visualizingCombinatorialSpecification showmethod toCombinatorialSpecificationto_html_representationmethod toCombinatorialClassAbstractStrategyraisesStrategyDoesNotApplyin the__call__method- function
CombinatorialSpecification.share_spec()which uploads the spec to a file sharing site - more verbose logging during the specification creation process
- Improved the status update
rule_from_equivalence_rule_dictnow takes a list of expected equivalence rules so a much smaller dictionary is produced
- fixed
ProofTreehandling of getting rules from spec - fixed printing of
InvalidOperationErrormessage
- the methods
expand_verifiedandexpand_comb_classonCombinatorialSpecification - the
get_rulemethod onCombinatorialSpecificationcan also take a label as a key expand_verifiedflag to the initialiser ofCombinatorialSpecificationSearcherwhich will expand verified classes using the pack passed to theCombinatorialSpecificationSearcherrule_from_equivalence_rule_dicttoRuleDBBase- It is now possible to get all the combinatorial classes contained in a specification
with the
comb_classesmethod.
- When expanding verified nodes in a specification, the search now uses
_auto_search_rules, instead ofdo_levelandget_smallest_specification. This is a stripped back auto search method returning the equivalence paths and strategies needed to create a specification. - the
get_eq_symbolandget_op_symbolare moved toAbstractStrategyrather thanConstructor - the
expand_verifiedflag on theauto_searchmethod andCombinitorialSpecification.__init__method was removed, and the default is now to not expand verified classes. You should use theexpand_verifiedmethod onCombinatorialSpecificationfor the same behaviour. It also no longer logs the string of the specification.
- fixed sanity checking in
comb_spec_searcher - the initialiser of
CombinatorialSpecificationremoves redundant rules
DisableLoggingwas removed fromutilsas it is no longer used.
- added an optional
fixed_valuesparameter to theDisjointUnionconstructor, that allows you to set a value that a child's parameter must take. - add the abstract method
can_be_equivalenttoAbstractStrategy.
- removed the method
is_equivalencefromConstructor. You should instead use theis_equivalencemethod on theRule. - the
CartesianProductnow considers compositions of all parameters and not justn. - the
RelianceProfiletype changed to work multiple parameters. It is now a dictionary pointing from parameters to the values.
- ignore rules where the left and non-empty right hand sides are the same
- Support for maple equations in multiple variables
- an option on
auto_searchto not expand verified classes - a
LimitedStrategyRuleDBto find specifications with no more than a given number of strategies of certain types - log information when expanding a verified combinatorial class.
- added
is_equivalencemethod toRule - sanity checking in multiple variables. In order to use this one must implement
the method
possible_parameterson theirCombinatorialClass. The sanity checker only checks counts, not generation of objects. - Added the
initial_conditionsmethod toCombinatorialClassand aget_initial_conditionsmethod toCombinatorialSpecification.
- when subbing parameters use simultaneous flag
- Retrieving the rule in the forget db when the rules comes from applying a strategy to a child.
- When a parameter does not map to equivalent child we don't look for it on the
child, preventing a
KeyError. - the extra parameters dictionary is flipped when creating the constructor in a reverse rule.
- fixed the
EquivalencePathRule.constructormethod - only save equivalence rules for rules a -> (b,) if a and b are equivalent.
- When the searcher finds a specification, it will now spends 1% of the time spent searching trying to find a small specification instead of just returning a random one.
- When expanding a class with a strategy, you can now create rules where the parent is not the class passed to the strategy.
- The 'get_equations' method now handles multiple parameters
- Removed some of the detailed timing in the queue to make status report shorter.
This release is a major change of the comb_spec_searcher structure.
Instead of being centered around the ProofTree object, this version
introduces the CombinatorialSpecification object that offers many more
features. Most notably the support for arbitrary constructors, object building
and random sampling. The new version also widely improves support for multiple
variables.
ProofTree.expand_tree()is a method the can be used to expand a proof tree using a strategy pack. This can be used to expand strategy verified combinatorial classes, to give a single tree.
- The
CombinatorialSpecification.auto_seach()only uses keyword arguments.
- Fix the
is_expandedfunction to check for inferral and initial expansion - Fix the
__contain__of ClassDB so that it actually works.
- Support for Python 3.5 and earlier
- Fix the dict method of Info so that it saves all the attributes.
- If
forward_equivalenceisFalse, then if the constructor is one ofequiv,disjoint, ordisjointthe rule will be treated with forward equivalence.
ProofTree.generate_objects_of_length()implements an algorithm for generating the objects of a given length by utilising the structure implied by a proof tree.ProofTreeNode.is_atom()andProofTreeNode.is_epsilon()methods for checking if a node represents an atom or epsilon.
- Use polynomial algorithm for generating terms in random sampling code.
ProofTree.count_objects_of_length()implements the recurrence relation implied by the proof tree as long as the strategies used are only disjoint unions, decompositions, verification or recursion.
- Remove the dependency on
permuta.
- Update sympy version to 1.4
- Update the readme and test it
- Added missing equation for "F_root" case
- This changelog file.