mps.blutil: add new operations to BaseLanguage#1607
mps.blutil: add new operations to BaseLanguage#1607alamqadem wants to merge 31 commits intoJetBrains:maintenance/mps20223from
BaseLanguage#1607Conversation
Add the ElvisOperation to the new base language extensions
--------- Co-authored-by: Dennis Albrecht <dalbrecht@itemis.com>
…zip-operator Add zip operator to the new BaseLanguage extensions
Add the GroupByOperation to the new base language extensions
BaseLanguage
BaseLanguageBaseLanguage
…seq-operations-with-index Add sequence operations with index to new BaseLanguage extensions
The following `[0..10].zip([10..inf]).zip([0..inf])` was returning the wrong result.
…zip-bug Fix bug in zip operation
|
Can/should this language be integrated with com.mbeddr.mpsutil.blutil, located in the blutil folder? |
|
Also, the 2022.3 MPS version is quite old, are you prepared to handle cascading merges up to master? |
Add ScopeFunctionOperations to the new base language extensions
Fix insufficient type inference for groupBy
|
I didn't take a look at the implementation, but please don't forget the data flow aspect for the new concepts. |
|
Is there a schedule for when this feature should be ready? @dalbrecht1 , @alamqadem |
I realized that I would need a few things that I only have access to downstream to make that pretty (so I will probably contribute some more than initially planned), as well as there are some housekeeping things still open to do on that branch. On top other responsibilities were more important. I'll see what I can do in the next days. But I'd really want to target prior to end of year to get this off my plate. |
|
Maybe this PR could be split into multiple PRs so that some of the features could be merged earlier, or we could merge it as an experimental feature. I feel like without such an approach, this PR won't get merged. |
I and maybe @dalbrecht1 plan to get back and work on it in the next +1 week in the first week of March and get it merged as a whole or split it, whatever we can get done during that week. |
* move ElvisOperation to blutil * move IntegerRange concepts to blutil * move ZipOperation to blutil * move GroupBy to blutil * move select/where/foreach with indexes to blutil * move scope functions to blutil * move remaining actions from baseLanguageExtensions to blutil * move generator from baseLanguageExtensions to blutil * move reduction rules into separate mapping configurations * move runtime code to blutil.rt * move tests from baseLanguageExtensions to test.blutil * move sandbox to new blutil.sandbox solution * delete baseLanguageExtensions language and solutions * move tests to NodeTests instead of BTestCase * rename test model to remove baseLanguageExtensions prefix
* add dataflow for integer range and scope function * fix generator for scope functions - apparently while moving the code something was accidentally deleted * fix scope functions example in sandbox
…lutions (#18) - remove baseLanguageExtensions references from the build script - remove cyclic dependency between blutil and blutil.rt
BaseLanguageBaseLanguage
|
Following the suggestion from @sergej-koscejev , I rebased the changes on |
Add the following new BaseLanguage extensions to the
blutillanguage:x?:yallows to specify an alternative expressionywhen the expressionxisnull[x..y]allows to create a finite/infinite sequence of integers starting fromxincludingywith increments of1[x..inf]allows to create an infinite sequence of integers starting fromxwith increments of1seq.groupBy(keySelector)allows given a sequenceseqto group the elements of a sequence using thekeySelectorclosure on each elementseq1.zip(seq2)creates a sequence tuples where each element is a tuple from the element in the two sequences at that indexseq.selectIdx({~it, int index => ...})seq.whereIdx({~it, int index => ...})seq.forEachIdx({~it, int index => ...})similar toselect,whereandforeachalready present in the collections language, but the index of the current element is also an argument of the closure