Commit Graph

78 Commits

Author SHA1 Message Date
Dima
e4205dfbbf
feat!: add name scopes to if/else/try blocks (#715) 2023-05-17 17:10:18 +03:00
Dima
670e779ba0
refactor: fix: LNG-143 LNG-144 definitions and locations algebras (#705) 2023-05-03 16:24:19 +03:00
Dima
dac8fb5774
refactor: Move LSP logic to LSP package (#701) 2023-04-20 13:01:47 +03:00
Dima
8fa979cd33
feat: Return arrows from functions (#693) 2023-04-14 16:28:17 +03:00
Dima
50f0723a32
feat: copy structures implementation [fixes LNG-102] (#646) 2023-01-20 12:02:05 +07:00
Dima
63433f2c91
LNG-96 object creation (#592) 2022-11-30 15:28:06 +03:00
Dima
85b8f31e74
Fix join behavior when using .length (#584) 2022-11-16 15:20:32 +03:00
Dima
e46cd0b550
small change (#580) 2022-10-19 19:45:13 +03:00
DieMyst
2b99cba0d1 push to stream as a result of inner function only if stream is declared in outer function 2022-10-19 19:07:08 +03:00
Dima
176cad360c
LNG-87 add null and never modes to fold instruction (#563) 2022-10-09 20:11:27 +03:00
Dima
95d3dc2d9e
LNG-86 Stream canonicalization (#553) 2022-09-30 19:06:55 +03:00
Dima
d452070b9f
DXJ-82 DXJ-42 Go-to definition for data structs and imports in VSCode extension (#541) 2022-07-26 16:58:28 +03:00
Dmitry Kurinskiy
f0cc65e2ad
Fixes LNG-63: introduced ShadowRaw (#528) 2022-06-27 15:54:21 +03:00
Dima
5f2de1b9d5
DXJ-44 JSON services support (#520) 2022-06-23 15:02:41 +03:00
Dima
5a7450bce1
Go-to definitions location between files (#516) 2022-06-02 13:31:31 +03:00
Dima
6064659610
DXJ-21 Save token definitions for LSP (#514) 2022-05-24 17:05:26 +03:00
Dima
0892a72afd
#484 Improve type mismatch error messages (#488) 2022-04-13 17:09:58 +07:00
Dmitry Kurinskiy
abd101c4f9
Fix for greedy par (#487) 2022-04-12 16:27:04 +03:00
Dima
e9a686aac6
Math sequence fixes (#476) 2022-04-11 15:36:01 +03:00
Dima
8ff57625f0
#478 throw compilation error if service returns multiple results (#479) 2022-04-04 18:14:57 +07:00
Dmitry Kurinskiy
12ee2d52fa
Arrow Call as a Raw Value (#461)
* CallArrowToken in the parser

* CallArrowRawTag

* unfoldArrow

* handle IntoIndexRaw for CallArrowRaw

* Removed useless CallArrowRawTag.service argument

* RawValueInliner split into several classes

* cliJS compiles

* Parser tests compile

* Semantics spec compile but fail

* Allow braces around values

* infix token WIP

* InfixToken WIP

* Fixes #423

* Infix (arithmetic) operations order

* Infix (arithmetic) operations parallelism fix

* seq it!

* fix inline test

* fix transform test

* fix semantics spec

* fix CallArrowSem

* bugfix

* Fix for CLI help typo

* merge

* Order fix

* Order fix

* optional space after `func` in closures

* some doc comments

Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
2022-03-25 17:23:41 +03:00
Dima
2ed1d8cf08
V3 types (#453) 2022-03-17 14:25:12 +03:00
Dmitry Kurinskiy
ab0990dd72
Capture and apply topology (#451) 2022-03-15 14:52:43 +03:00
Dima
04e68b553f
Use global node_modules path to find aqua dependencies (#450) 2022-03-09 18:54:28 +03:00
Dmitry Kurinskiy
2fa3a09548
Empty collections creation (#447) 2022-03-04 14:07:30 +03:00
Dmitry Kurinskiy
6772c1d0fa
Sugar for collections (#445) 2022-03-03 17:54:45 +03:00
Dmitry Kurinskiy
d5d7b8b5fd
Fix for greedy XOR tags (#412) 2022-02-02 19:06:35 +03:00
Dmitry Kurinskiy
012cba493c
Op model (#403)
* Separating raw FuncOp from OpModel WIP

* Model compiles, fighting with transform

* Refactoring WIP

* transform compiles

* Fixing AquaCompiler WIP

* Compiler compiles WIP

* AquaContext's allFuncs, allValues

* WIP trying to compile the CLI

* It compiles

* It runs and fails to compile

* Compiles wrong way

* fix TopologySpec

* Sugar bugfix

* fix TransformSpec compilation

* fix test compilation

* fix SemanticSpec

* Topology debugging

* TransformSpec fixed

* Do not import aqua.model

* Take parts in Semantics

* Fix for re-exports

* Maybe a fix for streams

* Maybe a fix for declarations

* streamArgs.aqua in test examples

* more aqua code with bugs

* FuncOp removed

* removed wrapNonEmpty

* fix TransformSpec

* fix SemanticSpec compilation, delete FuncOps

* Separated model/res, model/inline

* tiny fix

* Tests fixed

* TreeNode to wrap labels into cofree standard way

* TreeNodeCompanion with defauls show, equalsOrShowDiff for all Cofree trees we have

* Simple TagInlinerSpec

* Failing test in TagInlinerSpec

* test wip

* test fixed

* delete Node

* delete test-kit, move tests

* fix constants

* Failing TagInliner test

* More complex case for TagInlinerSpec

* TagInlinerSpec fix

* Split RawValueInliner, TagInliner

* Dumb case for ArrowInlinerSpec

* spec for stream renaming

* renaming stream test

* Exports fixed

* SeqModel.wrapWithEmpty for tests

* Deleted EmptyModel

* Bring back EmptyModel

* ArrowInlinerSpec wip

* ArrowInlinerSpec fixed

* Test fixed

* fix

* stream in callback test WIP

* Slightly better logging for TagInliner

* add example in aqua

* test update

* Removed occasional abilities override

* test

* AquaCompilerSpec WIP

* AquaCompilerSpec failing

* AquaCompilerSpec fixed

* fix test

* compiler test, add RestrictionTag

* break test

* fix stream passing to box arguments

* fix exports in context

* Do not reexport builtins

* init for topology bug

* test for topology

* Reproduced the import-reexport bug

* Hops are working...

* Issue #397 does not reproduce!

* foldJoin reproduces the bug

* Reexports inefficiently fixed

* Topology test fixed

* topology bug

* Cache compiled parts

* Cache compiled parts

* ignore the wip topology test

* delete test

* hanging

* add builtin

* Use linked-data-structure `equals` instead of recursive `hashCode`

* A bit more logs

* eq is faster than ==

* Try to join one by one

* op.identity for join

* reverting op.noop for join

* Fix for renaming when value has the same name as argument

* Bump the version to .6

* broken test for names

* second test for renaming

* this test works but i must break it

* add index in call

* JoinModel breaks test

* the test works fine with a fix, but we should check it closely. and `foldJoin.aqua` integration test become broken

* broken test with xor

* Fixed naming issue for lambda's variables substitution

* Topology bug wip

* Fixes #397

* Maybe fix

Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
2022-01-31 14:48:13 +03:00
Dmitry Kurinskiy
f795edfaf7
Join expression (#402) 2022-01-13 13:58:20 +03:00
Dmitry Kurinskiy
5a8a702f1c
Scalar index access (#401)
* Access index by scalar value

* Decomposed resolveField/resolveIndex semantics

* valueToRaw with recursive lambda support

* P.defer for recursive parser

* Desugarize all tags

* .backtrack

* Recursion bugfix

* Some code readability improvement

* Compile bugfix
2022-01-13 13:39:43 +03:00
Dmitry Kurinskiy
061e896b63
Model/raw refactoring (#398)
* Introducing model/raw subproject

* ValueRaw WIP

* ValueRaw WIP

* ValueModel.fromRaw WIP

* Recursive variables renaming

* Tests

* recursiveRaw

* Arrow Inliner refactoring

* desugarize takes its place WIP

* Sugar.desugarize maybe works

* Some movings/renamings

* Compile bug fixed

* Updated scalafmt

* Fix for service defaultId

* Map values recursively
2022-01-13 10:32:59 +03:00
Dmitry Kurinskiy
8c22a69840
Detach for par (#369) 2021-11-25 12:11:45 +03:00
Dmitry Kurinskiy
27b885f12d
#321 restricted stream scopes (#359) 2021-11-17 08:25:06 +03:00
Dmitry Kurinskiy
0eab86dc4c
Closures syntax (#327) 2021-11-04 19:22:57 +03:00
Dima
73f46c6897
Pass stream arguments to callbacks properly (#350)
* add DeclareStreamTag

* some fixes

* fix

* intersect argsToRename and streamToRename to fix excess renaming

Co-authored-by: dmitry <dmitry@fluence.one>
2021-11-02 12:26:00 +03:00
Dmitry Kurinskiy
5dd4ea6b0f
Pushing a stream into a stream (#344)
* Remove premature handling of pushing a stream into a stream

* Handling PushToStreamTag with literal tmpName

* Handling PushToStreamTag on Topology level

* Compilation bugfix

* Better handling for CanonicalizeTag

* Mutable i
2021-10-27 14:21:12 +03:00
Dmitry Kurinskiy
1bd640e773
277 implicit canonicalization for <<- stream (#339)
* Create opaque names in NamesInterpreter

* Implicit canonicalization for <<- stream

* PR fixes

* Second part of #277
2021-10-26 19:47:28 +03:00
Dmitry Kurinskiy
836dcccc79
Wrap for par with par null (#338) 2021-10-25 18:56:09 +03:00
Dima
aa34d04808
Add levenshtein distance to error messages, fix constant parsing (#303) 2021-09-20 15:35:45 +03:00
Dima
49da2a07ad
fix bug (#289) 2021-09-09 15:53:13 +03:00
Dima
d881f5bdbe
Upper cased constants (#260) 2021-09-07 11:09:48 +03:00
Dima
621e06dd9c
Fixes version display and empty module compilation (fixes #264 #265) (#274) 2021-09-07 11:02:36 +03:00
Dima
b0d76b9631
just delete asInstanceOf (#259) 2021-09-01 13:27:25 +03:00
Dmitry Kurinskiy
3e7b11db10
Imports/exports fixes (#258)
* Fix for export in headerless file

* Ability arrow resolution bugfix

* Trying to reproduce a bug

* Allow dots in module declaration
2021-08-31 13:05:26 +03:00
Dima
dae234dc5a
Performance improvement: single parser instance (#254) 2021-08-27 15:57:44 +03:00
Dmitry Kurinskiy
7e0fe470ec
Support for the new (ap instruction (#241) 2021-08-24 18:59:51 +03:00
Dmitry Kurinskiy
3de8571be9
Imports bugfixes (#249) 2021-08-21 11:10:38 +03:00
Dmitry Kurinskiy
b9af20339b
Module and Use expressions (#245)
* Module and Use expressions

* UseFromExpr

* ImportFromExpr

* PubExpr

* Export, declares

* Collecting all the needed info WIP

* Got all the needed data

* Tests fixed

* HeaderSem

* HeaderSem wip

* Everything except `export`/`declares` should be working

* Compile bug fixed

* Fix readme: cli/assembly

* Handle declares, exports

* Compile only exports in AquaRes

* Call services imported from modules

* Import consts, types, services from modules

* Resolve arrows from modules

* Bugfix
2021-08-20 18:03:47 +03:00
Dmitry Kurinskiy
96bc76ef2a
Separate Transform from Model (#244)
* Separate Result from Model

* Result->Transform, docs in README.md
2021-08-16 17:58:15 +03:00
Dima
e2da2e90d7
Crossprojects for JVM and JS platforms (#237) 2021-08-11 19:53:36 +03:00