Commit Graph

152 Commits

Author SHA1 Message Date
Dima
217613321b
fix (#308) 2021-09-21 11:51:38 +03:00
Dima
7362b46384
Fix incorrect resolving pushing stream from func to a value (#275) (#297) 2021-09-10 14:36:01 +03:00
Dima
d881f5bdbe
Upper cased constants (#260) 2021-09-07 11:09:48 +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
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
Dmitry Kurinskiy
6c498b029b
Updating compiler backends (#243)
* Updating compiler backends: add FuncRes

* TypeScriptService

* ServiceRes
2021-08-16 16:59:36 +03:00
Dima
e2da2e90d7
Crossprojects for JVM and JS platforms (#237) 2021-08-11 19:53:36 +03:00
Dmitry Kurinskiy
f7aa118006
Multireturn bugfix (#238) 2021-08-11 10:55:25 +03:00
Dmitry Kurinskiy
3eb3ecc221
Return many values from a single function (#229) 2021-08-09 21:33:55 +03:00
Dmitry Kurinskiy
cd30ff8e8c
Introducing Product type (#225)
* Introducing Product type

* Main codebase compiles with Arrow(domain, codomain)

* Tests compile

* Tests passed

* Tiny fixes: use argument labels in js/ts generators

* Fix for return type in .ts

* Typescript fix

* Fix for option return in JS

* Arrow variance fix

* separated CompareTypes

* Added deprecation notices to ArrowType functions

* Compile error fixed

* Types doc comments

* Multi-value return is supported in the model

* Tests compilation fixes wip

* Test compiles

* Bugfix

* Bugfix
2021-08-06 16:31:47 +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
81cd3a2c71
200 202 stream resolving (#213) 2021-07-27 09:58:33 +03:00
Dima
f683a6b3cf
Fix incorrect compilation with arguments duplication (#211) 2021-07-22 12:08:55 +03:00
Dima
f455716548
Bug fix (#198) 2021-07-14 16:09:10 +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
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
8586d70364
148 topology fix (#169) 2021-06-17 17:32:38 +03:00
Dima
29af3e7875
170 pass constants as arguments (#171) 2021-06-15 20:44:55 +03:00
Dmitry Kurinskiy
ee23ffeb9e
Introduce Catch espression (#162) 2021-06-10 16:33:01 +03:00
Dmitry Kurinskiy
4696e95129
Model refactoring to isolate imports, exports (#156)
* Model refactoring to isolate imports, exports

* Filter duplicate errors

* Do not export imports

* Add types to ServiceModel, AquaContext

* Print compiler version in AquaCli
2021-06-08 15:55:06 +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
0e2ea88934
Support options for via clause in on expression (#153)
* Support options for `via` clause in `on` expression

* Remove the generated comment

* Fix: provide stream as an argument

Co-authored-by: Dima <dmitry.shakhtarin@fluence.ai>
2021-06-03 17:43:58 +03:00
Dmitry Kurinskiy
6f6299e035
Simple opt-as-an-array fix (#149)
* Simple opt-as-an-array fix

* Last error model

* Test fixed
2021-06-03 10:16:07 +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
Dmitry Kurinskiy
450fe4e142
Fixes #86 (#107) 2021-05-04 12:09:27 +03:00
Dmitry Kurinskiy
85cc40fa5e
Wrap every OnTag (topological shift) with Xor (#109) 2021-05-04 11:58:25 +03:00
Dmitry Kurinskiy
231cd2a9d0
Fixes #99: use impossible name for relay (#103) 2021-04-30 11:51:55 +03:00
Dmitry Kurinskiy
53ad29ab31
Config options to omit xor wrapper, relay passing (#105) 2021-04-30 11:43:48 +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
Dmitry Kurinskiy
27f2912c5f
Streams support (#87)
* #29 going to support streams

* Added StreamName

* StreamName removed

* Streams support works

* Debug println removed

Co-authored-by: Dima <dmitry.shakhtarin@fluence.ai>
2021-04-27 16:59:12 +03:00
Dmitry Kurinskiy
d88b3a561c
Fix using par after xor: xor handled first now (#93)
* Script with crazy wrong output

* Xor can be combined with Par
2021-04-23 17:49:26 +03:00
Dmitry Kurinskiy
7991ab0b4d
Fixes bug with loosing a callback (#92)
* Fixes bug with loosing a callback

* Avoid passing unneeded arrows
2021-04-23 17:15:27 +03:00
Dmitry Kurinskiy
453b95b8ae
Better topology resolution (#89)
* Better topology resolution

* error example

* par added

* revert

* Test fixed
2021-04-23 14:04:21 +03:00
Dmitry Kurinskiy
a5afe1c6fa
Bugfix for ScriptModel (#88)
* Bugfix for ScriptModel

* Println error for unresolved functions
2021-04-23 12:25:21 +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
7512648cd0
69 wrong varnames (#74)
* Bug #69 reproduced in test

* Bug #69 reproduced in a test

* Fixes #47 (allow arg names in service function definitions)

* ServiceModel

* AbilityModel is removed, as it's unused

* Fixes #65: expose %init_peer_id% as a literal

* Removed FuncResolved, as it's not resolved actually

* Fixes #69

* Helpers for func op showing & building

* Compile bug fixed

* Comments

* Removed ScriptModel.enqueue
2021-04-19 16:22:45 +03:00
Dmitry Kurinskiy
e2621f0008
Fixes #68 :fix return using relay (#72)
* Added test & some test routines

* Test usability improvements

* Failing script

* Failing test for #68

* Fix topology in case of a sequence of calls

* Formatting

* Formatting
2021-04-16 20:15:45 +03:00
Dima
c8869eb2b4
Add header to .ts files that this is generated files (#70)
* add header

* rewrite
2021-04-16 20:13:56 +03:00
Dima
8e04348ffa
Fix release, add xor wrap (#51) 2021-04-13 13:37:03 +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