-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Record Updates Allow Arbitrary Expressions, Update Pollen Tests #141
Conversation
Co-authored-by: Adrian Sampson <[email protected]>
Co-authored-by: Adrian Sampson <[email protected]>
…()" is also syntactically valid
…;' is not valid yet)
…nested functions are not supported.
Accidentally merged before review
Excellent; all sounds great!
I see the new directory of tests, which seems great, but I don't set see a configuration file for Runt (or Turnt). Did this perhaps just not get checked in?
Sounds right to me! Less ambiguity => more better. |
Ah, it looks like |
The short change list:
flip.pollen
.{ e with f1:e1, f2:e2, ... }
)Add automated testing viaAll automated tests pass after Pollen supports array access #140runt
test
folders totests
, for the sake of consistency with thecalyx
directory (I don't have a preference between one or the other, I just want to be consistent so that I don't have to think about which one I need depending on which directory I'm in).pollen
from.pol
..pol
is much shorter, but apparently is already a file extension for "group policy settings." I'd be curious if anyone has feeling about.pol
versus.pollen
.The longer explanation:
The majority of updates to the pollen examples consisted of
outset
withparset
,(t1*t2)
rather than(t1, t2)
.x += y
withx = x + y
(we do not yet support this syntactic sugar)in_g.paths
,in_g.steps
, andin_g.segments
with simplypaths
,steps
, andsegments
, though perhaps we would only want one special variable as opposed to 5 (includinghandles
andedges
).Additionally, I fixed a logical bug in
flip.pollen
related to ourparset
semantics - previously, it had been attempting to update a step's rank by iterating throughrev(path.steps)
and then emitting the step with it's orientation reversed without updating its index. However, as per our relational semantics, the order in which we emit steps does not matter, and we must instead specify its new index onpath
when we emit it, like so:{ step with idx: max_step_idx - step.idx }
.What this pull request does not do is completely reconcile our pollen tests with the parser's semantics -
paths.pollen
refers to the steps in the path viapath.steps[i]
, but the parser does not currently support array access. See #140