NB-076
|
e97e25165c
|
fix: 覆盖率统计95.6% — __DP合成约束接入完整管道
## 修复
1. **__DP 约束被过滤掉** (__init__.py)
- _resolve_field 对 '__DP' 直接穿透
- fn.startswith('__') 绕过 fields_dict 检查
- 导致 PERFORM/EVALUATE/IF 合成约束在 generate_data 内部丢失
2. **collect_all_dps DP ID 计数器** (design_mcdc.py)
- 全局 _counter 替代局部 len(result)
- IF/EVALUATE/PERFORM 统一用 _counter[0]
- 递归调用传递 _counter
3. **__DP 匹配不依赖 DP ID** (coverage.py)
- _mark_if / _mark_eval / _mark_perform 移除 id 检查
- 直接通过 __DP label 识别分支方向
4. **PERFORM VARYING 条件提取** (design_mcdc.py)
- VARYING UNTIL 从句自动提取 UNTIL 条件
5. **cond.py 增强**
- OF 限定词剥离: STD-KEY OF MASTER-REC → STD-KEY
- 裸字段引用: WS-EOF → (WS-EOF, '=', 'Y')
- NOT 前缀: NOT WS-X > 50 → WS-X <= 50
- not_map 添加 break
## 结果
- 分支覆盖率: 10.6% → 95.6% (3208中3068覆盖)
- S15回归: 17/17 PASS
- 程序数: 43/43有分支检测
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-24 21:47:10 +08:00 |
|
hangshuo652
|
7fb9304212
|
merge local cobol_testgen improvements into v3 shared modules
- cond.py: SQLCODE/SQLSTATE handling, alphanumeric >/< boundary fix
- output.py: termination tracking, db_input support, _is_field_assigned filter
- coverage.py: mark_from_gcov, THRU support, KeyError protection
- gcov.py: new file (dependency for coverage.py)
- grammar.lark: multi-segment PIC support
- read.py: SQL INCLUDE resolution, DECLARE TABLE parsing, * comment fix
- core.py: SQL parsing, blocked_names, keyword list
- design.py: multi-sentinel, THRU ranges, PERFORM VARYING last iteration
- __init__.py: local main() + v3 API functions, guarded imports
All 6 ZAN programs verified passing through v3 pipeline
|
2026-06-23 22:38:17 +08:00 |
|
hangshuo652
|
bc1d56d1a4
|
feat: Phase 2 complete — 13 Phases of COBOL type classification and test benchmark
P0.6: gcov infrastructure
P1: extract_structure output expansion (11 new feature fields)
P2: Confusion group rule engine (8 pairs + contradiction + backtrack)
P3: 4-factor confidence calculation + quality gate update
P4: 33+2 COBOL program type test samples (22 files, 7 categories)
P5: parametrized/ test data generation engine
P6: japanese_data.py lookup tables
P7-10: Type-specific test suites (~159 parametrized tests)
P11: Full classification pipeline (classify_program) + orchestrator integration
P12: Documentation (module-interfaces, test-plan v3.0, coverage-matrix)
Architecture decisions:
- classification_pipeline/ merged to hina/pipeline/
- parametrized/ as independent module
- japanese_data.py as root-level file
- hina/__all__ only exports classify_program()
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-19 23:51:55 +08:00 |
|