apply_rewrite_rule
Apply a formal Double-Pushout rewrite rule to a diagram using a rule spec and match mapping, transforming its graph structure and returning modified stats.
Instructions
Apply a formal Double-Pushout (DPO) rewrite rule to a diagram.
Args: diagram_id: Target diagram ID rule_spec: Serialize RewriteRule dict with 'lhs' and 'rhs' patterns match_mapping: Mapping of rule LHS node IDs to diagram node IDs (from pattern_match)
Returns: dict containing success status and modified diagram stats
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule_spec | Yes | ||
| diagram_id | Yes | ||
| match_mapping | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||