PatternDispatch.jl icon indicating copy to clipboard operation
PatternDispatch.jl copied to clipboard

Non-tree patterns

Open toivoh opened this issue 12 years ago • 0 comments

When the same pattern variable is repeated within a signature, e.g.

@pattern egal(x, x) = true
@pattern egal(x, y) = false

the pattern should require all occurrences to match the same value.

This should probably be accomplished by joining all the bound nodes into the same egal-equivalence class. This will require

  • Pattern simplification driven by equivalence classes: alternate merging and simplification until reaching a fixed point.
  • Nodes that have more than one argument node; at least for equivalence classes.
  • Pattern printing:
    • support for DAG structures
    • name unnamed nodes with multiple references

toivoh avatar Jan 05 '13 21:01 toivoh