• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

johnyf / dd / 169
81%
master: 88%

Build:
Build:
LAST BUILD BRANCH: v0.5.4
DEFAULT BRANCH: master
Ran 22 Feb 2017 08:39AM UTC
Jobs 2
Files 21
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
169

push

travis-ci

johnyf
API: add method `Function.__hash__`

to `autoref, cudd, sylvan` interfaces. Together with the existing
comparator methods, this defines `Function` as hashable.

Previously nodes weren't hashable, even though Python by default
lets user-defined types be hashable, because the presence of
a `__richcmp__` or other comparator method overrides this default
behavior [2].

As the definition of hashable object requires, we implement
`__hash__` so as to ensure that equal `Function` objects have
the same hash value. Nodes that belong to different managers
won't compare equal, so hash conflicts won't cause problems.

That node instances of the same manager with the same pointer (or
same integer node value, in the case of `dd.autoref`) are the same
entity relies on the uniqueness of representation in a BDD.

The only aspects of a node wrapped by a `Function` instance
that can change are the reference count and level of the
corresponding variable. These aren't inherent properties of
the node, and they are the same for all `Function` instances
that wrap that same node, because these values are obtained
from the manager. Thus, BDD nodes are indeed immutable entities.

[1] https://docs.python.org/3/glossary.html
[2] https://docs.python.org/3/reference/datamodel.html#object.__hash__

3246 of 4023 relevant lines covered (80.69%)

0.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 169.1 (CC=gcc-4.7 CXX=g++-4.7) 22 Feb 2017 08:39AM UTC 0
80.79
Travis Job 169.1
2 169.2 (CC=gcc-4.7 CXX=g++-4.7) 22 Feb 2017 08:39AM UTC 0
80.59
Travis Job 169.2
Source Files on build 169
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #169
  • 0b29f9f7 on github
  • Prev Build on dev_0.5.0 (#168)
  • Next Build on dev_0.5.0 (#170)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc