Commit Graph

131 Commits

Author SHA1 Message Date
Dima
a8eeeacb8a
#521 #522 #523 deploy script and logging improvements (#549) 2022-08-22 17:02:24 +03:00
Dima
5a3ef04c2a
Update scala and libs versions (#544) 2022-08-01 22:20:45 +03:00
Dima
9bba41abbe
fix type definition for literals, increase version (#527) 2022-06-24 11:46:18 +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
16a802f5a5
Language server (#512) 2022-05-17 15:05:25 +03:00
Dima
10061ade3b
Generate types from JSON (#492) 2022-04-20 14:45:42 +03: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
6772c1d0fa
Sugar for collections (#445) 2022-03-03 17:54:45 +03:00
Dima
5eae05dff0
Add top-bottom support (#442) 2022-02-23 12:37:18 +03:00
Dima
3320cffde8
Remove service command, file options refactoring (#428) 2022-02-16 10:47:43 +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
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
22778914ca
Topology refactoring & fixes (#371)
* Topology optimization for Folds

* cache RawCursor's parent for better performance

* Tests fixed

* wip

* wip

* Use the new Topology to find paths

* Compile bug fixed

* Old tests works

* One more fixed test

* Move before seq next

* One more fixed test

* Bugfix

* Disabled debug output

* maybe fix?

* maybe fix?

* Topology wip

* Maybe fix

* Maybe fix

* Fold optimization

* Root topology

* Respect forceExit in endsOn

* better caching

* better caching

* Root afterOn = const

* XorGroup endsOn should break

* no EndsOn for Root

* Maybe better?

* Uncycling

* Eval

* Respect ParTag.Detach

* Detach test

* Detach test failing

* Detach test fixed

* Go to relay via relay

* Fixes #380

* Increment Aqua version to 0.5.2

* Add image to transform readme, update dependencies

* Review fixes

* Updated Scala version in the release flow
2021-12-22 15:21:37 +03:00
Dima
71ea87aefd
#374 Pass structures to aqua run as JSON from an argument or a file (#386) 2021-12-10 14:39:26 +03:00
Dima
ae27dcb534
stringify args, add timeout option (#360) 2021-11-19 17:17:47 +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
2f1d5a0760
Async fluence js (#334) 2021-10-21 16:47:04 +03:00
Dima
3844d8f2db
Run aqua code from CLI (#324) 2021-10-13 11:10:10 +03:00
Dima
4e63da83f5
Combine js and ts backends (#307) 2021-09-23 13:45:27 +03:00
Dima
84141bbcc4
revert to w.x.y-z (#300) 2021-09-13 13:29:35 +03:00
Dima
46a972714c
Use and export without .aqua extension, flag for a dry run, create output directories (#299) 2021-09-13 13:08:15 +03:00
Dima
7556db0a93
Use .js file in aqua command by default (#278)
* move to `aqua` and `aqua-j`

* more updates

* update readme

* aqua-cli -> aqua

* don't publish aqua as aqua-cli

* update scala

Co-authored-by: Dmitry Kurinskiy <dmitry@fluence.one>
2021-09-08 13:37:59 +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
7982f04847
increase version to publish aqua-cli (#262) 2021-09-02 16:15:37 +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
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
Dima
296c64836d
Js build (#247) 2021-08-18 13:06:14 +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
Dmitry Kurinskiy
3eb3ecc221
Return many values from a single function (#229) 2021-08-09 21:33:55 +03:00
Dima
4ccac9bf0e
Migration to Scala 3 (#228) 2021-08-06 13:33:58 +03:00
Dima
ee67d038ad
53 219 issues (#224)
* functions that only return literal, don't parse top-bottom

* empty funcOp to FuncOps

* version

* fix
2021-08-04 13:16:42 +03:00
Dmitry Kurinskiy
e3716f6f31
Converting compiler to a pure function (#217)
* Trying to make the compiler a pure function

* Pure compiler WIP

* Compiler should be working now

* printlns

* printlns

* printlns

* fix, delete printlns

* more logs

* fix import resolving, more tests

* fix imports, add tests for imports resolving

* fix test

* correct paths to targets, correct output

* refactoring, create directories to file if not exist

* small changes

* fix test

* Tiny fixes WIP

* Tiny fixes

* Incrementing base version, as host_peer_id is added (fixes #218)

* render error messages, WIP

* small fix

* get src for lexer error

* wrap parser error

* add list of errors

* Handle file write errors accurately

* Use show syntax

* fix test

* fix test

* fix test

* println

Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
2021-08-03 17:23:28 +03:00
Dima
3bbf089e87
209 Push to stream (#214) 2021-07-26 14:31:17 +03:00
Dmitry Kurinskiy
83d5a7b2a3
Introducing top and bottom types (#199)
* - Added top and bottom types
- Added nil for empty streams, options, arrays
- Fixed product variance

* Version bump due to syntax changes in the type system
2021-07-13 17:43:24 +03:00
Dmitry Kurinskiy
d24e77b5e3
Removing IO from compiler submodule (#186)
* Removing IO from compiler submodule (wip)

* move targets to cli
2021-06-30 09:21:40 +03:00
Dima
f15bd0558b
Cli/compiler refactoring (#184) 2021-06-29 16:31:20 +03:00
Dima
5e1ef6e227
Abstract backend (#182) 2021-06-25 10:25:27 +03:00
Dmitry Kurinskiy
bbf47628c6
Co expression (#181) 2021-06-24 11:01:59 +03:00
Dmitry Kurinskiy
985309d4eb
Fixes missing par (#177)
* Fixes missing par

* test for par

* Par topology bug fixed

* test `on` on every par branch

* Topology refactoring

* Tests compilation wip

* Tests compilation wip

* Tests compile

* Test fix

* Non-par tests fixed

* The last test remains

* Topology tests fixed

* SemanticsSpec compiles

* transformspec wip

* fix diff

* TransformSpec with diff

* test for error handling

* topology resolver spec wip

* delete test, rename test

* fixed

* par with export variable test

* test for try without catch

* Handle try without catch

* XorParTag fix

* Wake up target peer after par

* Increment version

* Fix xor par during func model resolution

* test with import and fold

* Linker bug fixed

Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
2021-06-22 11:03:45 +03:00
Dima
f71de81cb4
test kit as separate project (#178) 2021-06-18 17:01:31 +03:00
Dmitry Kurinskiy
ee23ffeb9e
Introduce Catch espression (#162) 2021-06-10 16:33:01 +03:00
Pavel
6522deccb4
Javascript backend (#161)
Add javascript backend
2021-06-10 13:43:46 +03:00
Dmitry Kurinskiy
d300a7dea3
AssignmentExpression (#155)
* AssignmentExpression

* Increment minor version due to syntax enhancement

* Don't generate (null) for assignment tags

* AbilityIdTag

* Added defaultId to ServiceModel

* fix compilation

Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
2021-06-08 09:42:09 +03:00
Dmitry Kurinskiy
15f582eaf9
Fix: resolve function return name (#154) 2021-06-04 15:57:53 +03:00
Dmitry Kurinskiy
807c26619f
108 option type (#146)
* Option type support: arguments, values

* Aqua version 0.1.4

* Fix for optional return value in TS

* Tiny fixes

* Example for declaring local options
2021-06-02 12:29:12 +03:00
Dmitry Kurinskiy
378d154ff7
Added bang op to get array items by index (#144) 2021-06-01 20:07:09 +03:00
Dmitry Kurinskiy
58132b8d8b
Try expression added (#132)
* Try expression added

* Increment `baseAquaVersion` due to syntax change.
2021-05-27 14:13:38 +03:00
Dima
9f5c0d64ed
Bug fixes (#127) 2021-05-24 11:00:45 +03:00
Dmitry Kurinskiy
c4a2752e18
For...try expression (#115) 2021-05-14 11:36:49 +03:00
Dmitry Kurinskiy
1fc5557ba6
Topology refactoring (#100)
* Topology refactoring

* TransformSpec fixed & improved

* Fixes #98

* Better Par handling

* Introduced Cursor class

* Better exit process for par branch

* Force move to target peer when exiting from a par branch
2021-04-29 14:16:25 +03:00
Dima
ca8e3bfa40
Constant expr (#79) 2021-04-22 16:42:08 +03:00
Dmitry Kurinskiy
433b464a36
67 plain air gen (#78)
* Refactoring ForClient to make its parts reusable/recomposable

* Func transformation decomposed into parts

* Improves AIR compilation target
2021-04-20 16:44:06 +03:00
Dmitry Kurinskiy
6ec999c5b6
Pass sbt version to JAR file (#55) 2021-04-14 14:15:27 +03:00
Dmitry Kurinskiy
970da2e1b7
30 import basics (#49)
* Functions must be marked with `pub` to be exported

* AquaFiles WIP

* Factoring out linker

* Core linker logic

* FileModuleId WIP

* AquaFile WIP

* AquaFiles WIP

* Basic imports works

* Show errors

* Dirty hack to make imports work (almost)

* Better errors displaying

* Simplified AquaCompiler interface

* Write compiled files

* New AquaCli

* CLI fixed, works

* Review fixes
2021-04-13 16:05:31 +03:00
Dmitry Kurinskiy
569df52d27
Intro – first approach (#44)
* Readme WIP

* Readme WIP
2021-04-13 16:02:36 +03:00
Dima
2e5f986961
fix assembly, add u8 (#45) 2021-04-08 15:53:54 +03:00
Dmitry Kurinskiy
0de43b470e
39 fix callbacks (#43)
* Project layout reorganized

* Topology resolution extracted to a separate file

* FuncResolved class

* aqua.model.transform

* Basic bubbling

* Get more context into topology resolver

* Failing Topology test

* Get back in seq

* OnTag.via: List changed to Chain, as via is reversed and concatenated quite frequently
2021-04-06 19:01:25 +03:00
Dima
f28dca35eb
Args and stdin (#23) 2021-03-24 13:17:02 +03:00
Dima
b20694b987
improve CLI (#8) 2021-03-22 17:10:38 +03:00
DieMyst
a72bfff377 readme 2021-03-19 12:40:27 +03:00
DieMyst
10ba31479f use fs2 2021-03-19 11:30:55 +03:00
DieMyst
ce049d42ca build jar, generate hll files from dir 2021-03-18 15:51:22 +03:00
dmitry
b4a9979278 ReturnExpr for functions 2021-03-17 13:10:21 +03:00
dmitry
b7306e1fa5 StackInterpreter factored out 2021-03-15 11:45:27 +03:00
dmitry
d0ef5ee942 Typechecker WIP 2021-03-04 18:51:37 +03:00
dmitry
3bb9a4db7e WIP: passers 2021-03-02 19:46:27 +03:00
dmitry
ae7ece2cb2 Names -> InOutAcc refactoring 2021-03-01 15:50:15 +03:00
dmitry
5fb96efbaf FuncOp progress 2021-02-24 18:57:41 +03:00
dmitry
ea17b56a05 progress 2021-02-18 16:49:39 +03:00
dmitry
f6ca9f85ff kad pseudocode 2021-02-17 16:30:45 +03:00
dmitry
8c3b6d291a First experiments with Aqua HLL 2021-02-01 16:17:46 +03:00