penrose / penrose

Create beautiful diagrams just by typing notation in plain text.

Home Page:https://penrose.cs.cmu.edu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect handling of indexed sets with flipped ranges

liangyiliang opened this issue · comments

Describe the bug

When a substance indexed set has flipped ranges (e.g., for i in [35, 32]), the range should contain zero elements. But it seems to be not the case.

To Reproduce

https://penrose.cs.cmu.edu/try/?gist=5dcb8754142fa595cbfc52bb16368c41

Expected behavior

I expect nothing to be displayed on the canvas.

Screenshots

Solution is just to add a check at evalISet. If high < low, then return empty.

This behavior is also not consistent with what the docs say:
image