diff options
author | John Hodge <tpg@mutabah.net> | 2016-11-25 15:01:39 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-11-25 15:01:39 +0800 |
commit | 86526ec2ee28c87d199f9632132d761bbce9d7de (patch) | |
tree | b8e95cd11c9678b764f57e1fb4bfe7bdc8f27445 | |
parent | 040db857dd41775028f47ef553f73328ee93a12a (diff) | |
download | mrust-86526ec2ee28c87d199f9632132d761bbce9d7de.tar.gz |
Notes - Design notes on an update to the match code
-rw-r--r-- | Notes/MIR-Match.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Notes/MIR-Match.md b/Notes/MIR-Match.md new file mode 100644 index 00000000..f47d2c88 --- /dev/null +++ b/Notes/MIR-Match.md @@ -0,0 +1,22 @@ +% MIR Match Generation Algorithms and Notes + +Alternative DecisionTree generator +================================= + +Take the full list of rules and iteratively partition and simplify/propagate +- Requires that all rules have the same format (which they do) + + +For each index in the rule (all rules must be the same length) +- Sort the rules (with `_` sorting to the end) +- If all rules are `_`, skip and continue +- Group into sub-lists based on the condition +- Add copies of the default to all sub-lists + - NOTE: Default is maintained only if the ruleset is not exhaustive at this level + + +- TODO: The above approach beaks with value ranges (which can overlap) + - Requires special handling to resolve the overlaps + - Ranges sort after? + + |