E&S CVS Commit: PyProtocols - Implemented "enumerable" criteria, which can list all the criteria they

pje at eby-sarna.com pje at eby-sarna.com
Fri Apr 22 00:46:01 EDT 2005

Module Name:	PyProtocols
Committed By:	pje
Date:		Fri Apr 22 04:56:17 UTC 2005

Modified Files:
	PyProtocols/src/dispatch: interfaces.py predicates.py strategy.py
	PyProtocols/src/protocols/tests: test_dispatch.py

Log Message:
Implemented "enumerable" criteria, which can list all the criteria they
imply, and have a single "leaf seed" that implies them.  Most criteria
are enumerable, but inequalities and AND-ed or NOT-ed criteria are not.
In the future, indexes will have O(1) insertion time for "flat"
enumerables (like "==" and "is") as long as there are no non-enumerables
in the index.  For hierarchical enumerables, insertion time will be
O(nparents), so for example class criteria will be O(len(cls.__mro__)) for
insertion, and parent-component checks will be O(len(getComponentPath(c)))
for insertion.  (Again, this assumes the index contains only enumerable
criteria; any non-enumerable criteria have to be added to the total O()

This checkin doesn't implement those index enhancements, though.  It just
implements the support code for managing enumerability, and consolidates
some of the commonalities between criteria implementations into
AbstractCriterion or other handy base classes.

To view diffs of this commit, you can use the following URL(s):

To generate a diff of this commit:
cvs rdiff -r1.18 -r1.19 PyProtocols/src/dispatch/interfaces.py
cvs rdiff -r1.21 -r1.22 PyProtocols/src/dispatch/predicates.py
cvs rdiff -r1.37 -r1.38 PyProtocols/src/dispatch/strategy.py
cvs rdiff -r1.46 -r1.47 PyProtocols/src/protocols/tests/test_dispatch.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

More information about the source-changes mailing list