Improve UCIS compliance for the new NCDB database#45
Merged
Conversation
Phase 1: Scope goal and source type - Add PRESENCE_GOAL and PRESENCE_SOURCE_TYPE to scope_tree.bin - Scope goal (coverage percentage target) now round-trips - Source type (SourceT enum) now round-trips Phase 2: Per-coveritem flags - New coveritem_flags.bin ZIP member for sparse flag storage - Delta-encoded (coveritem_index, flags) pairs - Supports exclusion flags (EXCLUDE_PRAGMA/FILE/INST/AUTO) and type-qualified flags (IS_BR_ELSE, IS_FSM_RESET, etc.) Phase 3: Attribute system redesign - attrs.bin v2 format with sections for scopes, coveritems, history nodes, and global (DB-level) attributes - MemCoverIndex gains setAttribute/getAttribute/getAttributes - MemHistoryNode gains setAttribute/getAttribute/getAttributes - Backward compatible: v1 JSON still readable Phase 4-5: Properties and tags (already working) - EXPR_TERMS, DU_SIGNATURE round-trip via existing properties.json - History hierarchy and scope tags already supported Test: 14 new compliance tests in test_ucis_compliance.py Full suite: 1002 passed, 0 failed
The UCIS LRM defines IS_32BIT, HAS_GOAL, HAS_WEIGHT as structural flags determined by cover type, not per-bin state. All CVGBIN items have IS_32BIT|HAS_GOAL|HAS_WEIGHT (0x19); all others have IS_32BIT (0x01). These are now stored in COVER_TYPE_DEFAULTS and applied automatically during deserialization. coveritem_flags.bin only stores flags that DIFFER from the type default (exclusion flags, IS_BR_ELSE, IS_FSM_RESET, etc.). For typical databases this means 0 entries → member not written. Impact on merged.vdb benchmark (131K bins): - coveritem_flags.bin: 264KB → 0 (not written) - Read: 3.13s → 2.79s (-11%, ~340ms saved) - Write: 2.71s → 2.63s (-3%, ~80ms saved) - Merge: unchanged (fast path never touches flags) Full test suite: 1002 passed, 0 failed
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.