From 42355da43e8fa8ee9162b1a33e73580a8a6e2e8c Mon Sep 17 00:00:00 2001 From: jaredoconnell Date: Tue, 14 Mar 2023 14:33:34 -0400 Subject: [PATCH 1/3] Proposal for expansion of expression language --- .../2023-03-14-expression-expansion.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 art-decisions/proposals/2023-03-14-expression-expansion.md diff --git a/art-decisions/proposals/2023-03-14-expression-expansion.md b/art-decisions/proposals/2023-03-14-expression-expansion.md new file mode 100644 index 0000000..f045146 --- /dev/null +++ b/art-decisions/proposals/2023-03-14-expression-expansion.md @@ -0,0 +1,37 @@ +# Expansion of Workflow Expression Language + +## Background + +The current state of the expression language allows users to retrieve values from inputs and step output. That is enough for usable workloads, but is insuffient for many use cases. + +Examples of situations which are limited right now: +- Can't import values from files (will be done with a function) +- Can't conditionally run sections (will be done with a conditional expression and a sub-workflow) +- Can't do comparisons or math with known values for inputs and outputs. (Will be done with conditional expressions and mathematical expressions) + +This proposal will make it so less manual work is required to get a workflow working. + +## Proposal + +Proposed changes: +- Make subexpressions default within map access since it is unintuitive as-is, removing the old () syntax. Moving from `map[(sub-expression)]` to `map[sub-expression]` +- Add functions. Would be added as a root item, and therefore would work where subexpressions are supported. That would also make it so an expression can be exclusively a fuction call. +- Add binary comparison operators. This would need to be another root item. This would be simple. `expression ==|!=|<|>|<=|>= expression`. +- Mathematical expressions. These would be simple binary mathematical operators, with the potential for parhenthases for ordering changes. + +Detailed issues for proposed changes: +- [Functions](https://github.com/arcalot/arcaflow-expressions/issues/1) +- [Binary Comparison Operators](https://github.com/arcalot/arcaflow-expressions/issues/2) +- [Mathematical Expressions](https://github.com/arcalot/arcaflow-expressions/issues/3) + +### Priorities +- The function calls and comparison operators will be the top priorities +- Mathematical expressions will be lower priority, with most of the work based on the work for the comparison operators. + +### Approval +By approving this proposal, you are agree to the addition of functions, binary comparison operators, and mathematical expressions to the language. Not necessarily the way it's implemented. + +Discussion on how it is implemented can be debated in the issues on the expression repository linked above. + +## Drawbacks +- It adds complexity to the language \ No newline at end of file From 12da44b86bd0c19d550d871f51a44669a40cc298 Mon Sep 17 00:00:00 2001 From: jaredoconnell Date: Thu, 16 Mar 2023 17:39:01 -0400 Subject: [PATCH 2/3] Add details about typing and the interface --- .../proposals/2023-03-14-expression-expansion.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/art-decisions/proposals/2023-03-14-expression-expansion.md b/art-decisions/proposals/2023-03-14-expression-expansion.md index f045146..e0df3c8 100644 --- a/art-decisions/proposals/2023-03-14-expression-expansion.md +++ b/art-decisions/proposals/2023-03-14-expression-expansion.md @@ -15,9 +15,9 @@ This proposal will make it so less manual work is required to get a workflow wor Proposed changes: - Make subexpressions default within map access since it is unintuitive as-is, removing the old () syntax. Moving from `map[(sub-expression)]` to `map[sub-expression]` -- Add functions. Would be added as a root item, and therefore would work where subexpressions are supported. That would also make it so an expression can be exclusively a fuction call. -- Add binary comparison operators. This would need to be another root item. This would be simple. `expression ==|!=|<|>|<=|>= expression`. -- Mathematical expressions. These would be simple binary mathematical operators, with the potential for parhenthases for ordering changes. +- Add functions. Would be added as a root item, and therefore would work where subexpressions are supported. That would also make it so an expression can be exclusively a function call. The functions will be strongly typed, with a standardized interface for their inputs and outputs, allowing type verification. +- Add binary comparison operators. This would need to be another root item. This would be simple. `expression ==|!=|<|>|<=|>= expression`. Types must match, or else there will be a type error. +- Mathematical expressions. These would be simple binary mathematical operators, with the potential for parhenthases for ordering changes. Will be strongly typed. Detailed issues for proposed changes: - [Functions](https://github.com/arcalot/arcaflow-expressions/issues/1) @@ -34,4 +34,4 @@ By approving this proposal, you are agree to the addition of functions, binary c Discussion on how it is implemented can be debated in the issues on the expression repository linked above. ## Drawbacks -- It adds complexity to the language \ No newline at end of file +- It adds complexity to the language From d37ccf4353c9c3cb1e36277baed11efcfc83298b Mon Sep 17 00:00:00 2001 From: jaredoconnell Date: Mon, 20 Mar 2023 15:43:11 -0400 Subject: [PATCH 3/3] Fix typos Does not change the content of the proposal --- art-decisions/proposals/2023-03-14-expression-expansion.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/art-decisions/proposals/2023-03-14-expression-expansion.md b/art-decisions/proposals/2023-03-14-expression-expansion.md index e0df3c8..b3fb7b8 100644 --- a/art-decisions/proposals/2023-03-14-expression-expansion.md +++ b/art-decisions/proposals/2023-03-14-expression-expansion.md @@ -17,7 +17,7 @@ Proposed changes: - Make subexpressions default within map access since it is unintuitive as-is, removing the old () syntax. Moving from `map[(sub-expression)]` to `map[sub-expression]` - Add functions. Would be added as a root item, and therefore would work where subexpressions are supported. That would also make it so an expression can be exclusively a function call. The functions will be strongly typed, with a standardized interface for their inputs and outputs, allowing type verification. - Add binary comparison operators. This would need to be another root item. This would be simple. `expression ==|!=|<|>|<=|>= expression`. Types must match, or else there will be a type error. -- Mathematical expressions. These would be simple binary mathematical operators, with the potential for parhenthases for ordering changes. Will be strongly typed. +- Mathematical expressions. These would be simple binary mathematical operators, with the potential for parentheses for ordering changes. Will be strongly typed. Detailed issues for proposed changes: - [Functions](https://github.com/arcalot/arcaflow-expressions/issues/1) @@ -29,9 +29,9 @@ Detailed issues for proposed changes: - Mathematical expressions will be lower priority, with most of the work based on the work for the comparison operators. ### Approval -By approving this proposal, you are agree to the addition of functions, binary comparison operators, and mathematical expressions to the language. Not necessarily the way it's implemented. +By approving this proposal, you agree to the addition of functions, binary comparison operators, and mathematical expressions to the language. Not necessarily the way it's implemented. -Discussion on how it is implemented can be debated in the issues on the expression repository linked above. +Discussion on how it is implemented can be debated in the issues in the expression repository linked above. ## Drawbacks - It adds complexity to the language