Skip to content

Detailed atom trace 2#134

Merged
ColtonPayne merged 11 commits intomainfrom
detailed-atom-trace-2
Mar 18, 2026
Merged

Detailed atom trace 2#134
ColtonPayne merged 11 commits intomainfrom
detailed-atom-trace-2

Conversation

@ColtonPayne
Copy link
Copy Markdown
Collaborator

@ColtonPayne ColtonPayne commented Feb 21, 2026

Summary

  • Extends the rule trace tuple from 5 fields (timestep, fp_op, component, label, bound) to 9 fields, adding consistent (bool), triggered_by (Fact/Rule/IPL), meta_name (fact/rule name), and inconsistency_message (descriptive explanation)
  • Adds detailed inconsistency messages that explain why a conflict occurred — distinguishing IPL-based conflicts (e.g., sick vs healthy) from same-predicate conflicting bounds, and including the specific groundings and bounds involved
  • Adds new columns to rule trace output: Consistent, Triggered By, and Inconsistency Message in the CSV/DataFrame output, making inconsistency resolution fully explainable without parsing free-text strings
  • Preserves ground atom clauses in inconsistency trace entries when the conflict was triggered by a rule (passes qn/qe through instead of empty lists)
  • Adds inconsistency_example.py demonstrating node and edge inconsistencies (IPL-based and same-predicate) with the new trace output
  • Adds functional test (test_inconsistency_trace.py) parameterized across regular, fp, and parallel modes validating the new trace columns
  • Updates unit tests to work with the new 9-tuple format, using [:5] slicing for backward-compatible assertions and adding new assertions for metadata fields
  • Fixes filter.py unpacking to handle the expanded tuple (change[:5])

Test plan

  • Unit tests pass (test_interpretation_common.py, test_reason_core.py, test_reason_misc.py)
  • New functional test test_inconsistency_trace.py passes across regular, fp, and parallel modes
  • Run inconsistency_example.py and verify new columns appear in CSV output
  • Verify existing rule trace consumers (e.g., filter_and_sort_nodes) still work with the expanded tuple

🤖 Generated with Claude Code

@ColtonPayne ColtonPayne merged commit c3bcb3b into main Mar 18, 2026
3 checks passed
@ColtonPayne ColtonPayne deleted the detailed-atom-trace-2 branch March 18, 2026 19:58
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.

2 participants