-
Notifications
You must be signed in to change notification settings - Fork 22
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
[AERIE-2141] Add during expression by updating ForEach and Spans #402
[AERIE-2141] Add during expression by updating ForEach and Spans #402
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! I have one major concern that I should have seen coming. I think we need to reverse how spans translate to violations. Otherwise we lose the activity metadata in the invert()
call associated with specific spans. I saw in your implementation that you keep the IDs around and then associate all the violations with all of the IDs, which is better than nothing, but definitely a regression from Constraint.ForEachActivity
. I messaged you on Slack because its probably easier to discuss this over huddle
merlin-server/constraints-dsl-compiler/src/libs/constraints-edsl-fluent-api.ts
Outdated
Show resolved
Hide resolved
merlin-server/constraints-dsl-compiler/src/libs/constraints-edsl-fluent-api.ts
Outdated
Show resolved
Hide resolved
constraints/src/main/java/gov/nasa/jpl/aerie/constraints/time/Spans.java
Outdated
Show resolved
Hide resolved
constraints/src/main/java/gov/nasa/jpl/aerie/constraints/time/Spans.java
Outdated
Show resolved
Hide resolved
constraints/src/main/java/gov/nasa/jpl/aerie/constraints/tree/ActivityWindow.java
Outdated
Show resolved
Hide resolved
merlin-server/constraints-dsl-compiler/src/libs/constraints-ast.ts
Outdated
Show resolved
Hide resolved
constraints/src/main/java/gov/nasa/jpl/aerie/constraints/time/Spans.java
Show resolved
Hide resolved
merlin-server/constraints-dsl-compiler/src/libs/constraints-edsl-fluent-api.ts
Outdated
Show resolved
Hide resolved
merlin-server/constraints-dsl-compiler/src/libs/constraints-edsl-fluent-api.ts
Outdated
Show resolved
Hide resolved
merlin-server/constraints-dsl-compiler/src/libs/constraints-edsl-fluent-api.ts
Outdated
Show resolved
Hide resolved
b15a309
to
7939fae
Compare
7939fae
to
70e99b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropping a round of comments that are ready - I still have a few files to review
constraints/src/main/java/gov/nasa/jpl/aerie/constraints/tree/WindowsFromSpans.java
Outdated
Show resolved
Hide resolved
constraints/src/main/java/gov/nasa/jpl/aerie/constraints/time/Spans.java
Show resolved
Hide resolved
merlin-server/constraints-dsl-compiler/src/libs/constraints-edsl-fluent-api.ts
Outdated
Show resolved
Hide resolved
merlin-server/constraints-dsl-compiler/src/libs/constraints-edsl-fluent-api.ts
Outdated
Show resolved
Hide resolved
constraints/src/test/java/gov/nasa/jpl/aerie/constraints/tree/ASTTests.java
Show resolved
Hide resolved
bc5316f
to
798fce4
Compare
constraints/src/main/java/gov/nasa/jpl/aerie/constraints/json/ConstraintParsers.java
Outdated
Show resolved
Hide resolved
constraints/src/main/java/gov/nasa/jpl/aerie/constraints/tree/ViolationsOfSpans.java
Outdated
Show resolved
Hide resolved
merlin-server/constraints-dsl-compiler/src/libs/constraints-edsl-fluent-api.ts
Outdated
Show resolved
Hide resolved
merlin-server/constraints-dsl-compiler/src/libs/mission-model-generated-code.ts
Outdated
Show resolved
Hide resolved
798fce4
to
83f7ced
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Sorry we changed the scope halfway through.
merlin-server/constraints-dsl-compiler/src/libs/mission-model-generated-code.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work - I have one request (can be before or after merging): could you update the PR description to reflect the decisions made, separating the changes that are being merged from the ones that are now "future work"?
I forget why I added the breaking change
label - if you don't think there are any breaking changes, we can remove that label.
83f7ced
to
5d2ab8e
Compare
Description
I have followed what was proposed by @JoelCourtney
Spans.ForEachActivity
function/AST node has been added in the eDSL that allows the lambda to return aSpans
objectwindow()
,start()
andend()
methods inActivityInstance
in eDSL have been updated to returnSpans
with activity id metadataViolationsOf
is nowViolationsOfWindows
.Finally, the
Windows.During(ActivityTypes[]): Windows
was added to the constraints eDSL.Verification
Many tests were updated.
Documentation
Future work
The mutex global scheduling condition (AERIE-2142) in #410.