Skip to content

Enhance support for conversion between formats#41

Merged
mballance merged 9 commits intomasterfrom
mballance/conversion
Feb 22, 2026
Merged

Enhance support for conversion between formats#41
mballance merged 9 commits intomasterfrom
mballance/conversion

Conversation

@mballance
Copy link
Member

No description provided.

mballance and others added 9 commits February 21, 2026 18:14
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
… goals

- Add abstract stubs for setAttribute/getAttribute/tags/getCoverFlags/setCoverData to Obj
- Implement getCoverFlags/setCoverFlags on MemCoverIndex and SqliteCoverIndex
- Fix SqliteScope.createNextCover to persist at_least (goal) to DB
- Implement getStringProperty/setStringProperty on MemObj (SCOPE_NAME, COMMENT)
- Add getStringProperty/setStringProperty on MemHistoryNode (HIST_CMDLINE, TEST_USERNAME, etc.)
- Override getStringProperty in SqliteScope to handle SCOPE_NAME from DB
- Add CVG_INST_AVERAGE computation to MemCovergroup
- Add new test files: test_api_str_properties, test_api_cover_properties, test_api_cover_flags

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… fix

- Add getPathSeparator/setPathSeparator to MemUCIS (default '/')
- Add ValueError validation for multi-character separator in Mem and SQLite
- Fix SqliteScope.createNextCover to persist at_least (goal) column to DB
- Add test_api_path_separator.py (T20): tests getPathSeparator/setPathSeparator
- Add test_api_tags.py (T11): dedicated tag API tests (addTag/hasTag/removeTag/getTags)

All 48 implementation todos complete. 729 tests passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Phase 13 — Delete operations:
- Add removeScope() abstract stub to ucis.py
- Add removeCover() abstract stub to scope.py
- Implement removeScope() in MemUCIS (depth-first subtree removal)
- Implement removeScope() in SqliteUCIS (recursive DELETE from scopes table)
- Implement removeCover() in MemScope (pop from cover item lists)
- Implement removeCover() in SqliteScope (DELETE from coveritems by index)

Phase 14 — DU name utilities:
- New src/ucis/du_name.py with parseDUName() and composeDUName()
- Handles qualified (lib.module) and unqualified (module) name forms

Phase 15 — Unique ID lookup:
- Add matchScopeByUniqueId() / matchCoverByUniqueId() stubs to ucis.py
- Implement in MemUCIS (depth-first walk comparing _str_properties)
- Implement in SqliteUCIS (query scope_properties / coveritem_properties table)

Tests:
- test_api_delete_operations.py (removeScope, removeCover)
- test_api_du_name.py (parseDUName, composeDUName, round-trips, edge cases)
- test_api_unique_id.py (matchScopeByUniqueId: found, not found, multi-scope)

749 tests passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ovements

New API:
- Add createInstanceByName() abstract stub to ucis.py (LRM ucis_CreateInstanceByName)
- Implement createInstanceByName() in MemUCIS: walks DU scope tree by name
- Implement createInstanceByName() in SqliteUCIS: queries scopes table by name

Tests:
- test_api_hdl_scopes.py: Tests for PROCESS, BLOCK, GENERATE, FORKJOIN, BRANCH,
  EXPR scope creation and type-filtered iteration (ScopeTypeT mask)
- test_api_hdl_scopes.py: TestApiCreateInstanceByName covers qualified/unqualified
  DU name lookup and KeyError on missing DU

769 tests passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add write_toggle_coverage(), write_block_coverage(), write_branch_coverage() to XmlWriter
- Add readToggleCoverage(), readBlockCoverage(), readBranchCoverage() to XmlReader
- Import ScopeTypeT, CoverData, CoverTypeT, UCIS_VLOG in xml_reader.py
- Use 'alias' attribute to preserve bin names in schema-compliant way
- Remove xfail for cc1_statement_coverage, cc2_branch_coverage, cc5_toggle_coverage
- All 3 round-trip tests now pass with valid UCIS XML schema

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix SqliteCoverpoint/SqliteCovergroup setComment/getComment to persist
  via setStringProperty(COMMENT)/getStringProperty(COMMENT) in scope_properties
- Add SqliteUCIS.clone() using sqlite3 backup API (commit before backup)
- Make MemFactory.clone() delegate to db.clone() if available
- Remove skip guards: test_comment_round_trip[sqlite], test_covergroup_comment[sqlite],
  test_clone_database[sqlite] all now pass
- Update test_clone_database to skip only xml backend (not all non-memory)
- Document XML backend known remaining limitations in XML_BACKEND_IMPROVEMENTS.md
- 777 tests passing, 80 skipped (2 more passing, 2 fewer skipped vs before)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- MockApp: set mock_db.conn = None to force API path in HierarchyView
- MockApp: use getScopeName()/getScopeType()/scopes() on mock scopes
- HierarchyView._build_hierarchy: use getattr(...conn, None) is not None
  instead of hasattr() so Mock objects with conn=None use API path
- test_user_reported_bug_with_fragmented_keys: use MockApp instead of
  missing test_vlt.cdb file

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… userAttr

- xml_writer.py: add write_block_coverage, write_branch_coverage,
  write_toggle_coverage, write_fsm_coverage, write_assertion_coverage,
  write_user_attrs; fix writtenBy/writtenTime; emit parentId on history nodes;
  ctx.warn for condition scopes
- xml_reader.py: add readFsmCoverage, readAssertionCoverage, read_user_attrs;
  call read_user_attrs from all coverage readers; two-pass parentId wiring
- db_merger.py: extend _merge_code_coverage for FSM/ASSERT/COVER scope types;
  extend _merge_code_coverage_items for all assertion bin types; rewrite
  history node copy with depth sort and parent-at-create-time
- ucis_builders.py: add cc7 (FSM), as1 (cover assertion), as2 (assert property),
  sm6 (parent-child history) builders; ALL_BUILDERS now 15 entries
- test_xml_conversion.py: add schema_validate fixture; schema validation in all
  roundtrip and write tests; test_source_file_ids_consistent; test_read_golden_file
  parametrized over 5 golden fixtures
- test_api_attributes.py: remove xml skip guards for 5 attribute tests
- fixtures/xml/: 5 golden XML files (toggle, fsm, assertion, block, branch)
- xml_interchange.rst: document all new coverage types, userAttr, history nodes;
  update Feature Support Matrix

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mballance mballance merged commit 2a0992e into master Feb 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant