Commit Graph

142 Commits

Author SHA1 Message Date
renovate[bot]
bbc521ce53
fix(deps): update all non-major rust dependencies (#338)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-15 21:08:46 +03:00
renovate[bot]
fb32f33154
chore(deps): update rust crate pretty_assertions to v1 (#361)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-14 12:40:12 +03:00
Mike Voronov
8c3f9a3090
feat(interpreter-data): add interpreter version in data (#367) 2022-10-13 12:50:32 +03:00
Ivan Boldyrev
22fac9329e
feat(testing-framework): prevalidate AIR script (#365)
Try to parse the annotated AIR script with the standard parser to catch
to catch errors early with better error messages.

We do it in the `TestExecutor` only to make testing framwork parser
tests simplier.  For user experience, it doesn't matter.
2022-10-12 13:44:59 +07:00
Mike Voronov
bf8aee7f15
fix(execution-engine): fix invalid iteration over stream (#362)
This PR is mostly a revertion of #357, that is needed to make stream work correctly in fold itrerations.

Closes #363.
2022-10-11 01:41:22 +03:00
Ivan Boldyrev
076045124c
feat(testing) Testing framework chapter 1, asserts and comments (#342)
* seq_result` -> `seq_ok`; add `seq_err`

`seq_ok` and `seq_err` are consistent with `ok` and `err`, but produce
results sequentially.

* Accept `;;` and longer comments in the sexp parser

Currently they are just dropped, and resulting AIR has different
character positions in the error messages.

* Add "map" assertion

Lookup result in a map by service's first argument.
2022-10-11 01:05:20 +07:00
Mike Voronov
910f1665eb
fix(trace-handler): fix fold and canon compatibility (#357)
Fixes bug of traces divergence when `canon` is used inside `fold`.

Closes #356.
2022-10-09 12:56:12 +03:00
renovate[bot]
35a4fe4451
fix(deps): update rust crate clap to v4 (#344)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-29 03:45:06 +03:00
Ivan Boldyrev
4a2e8be178
refactor(parser): use AirPos type for AIR script position (#341)
Use a dedicated wrapper type for better type safety and self-documented code.
2022-09-29 00:16:37 +03:00
Mike Voronov
c85b2e2fbf
feat(execution-engine): change behaviour of fold over streams (#340)
feat(execution-engine): change behaviour of fold over streams

Change behaviour of fold over streams to make it more similar to pi-calculus channels/names (for more info see #333).

Closes #333.

BREAKING CHANGE:

The new stream behaviour is not compatible with old one, such as
```
(fold $stream iterator
   (seq
       (call ...)
       (next iterator)))
```
will never end after this change (for more info again see #333).
2022-09-28 22:03:54 +03:00
renovate[bot]
ad504bce8b
Update all non-major Rust dependencies (#330)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-19 14:07:34 +03:00
Anatoly Laskaris
ca62bd6066
chore: release (#329) 2022-09-13 19:08:47 +03:00
renovate[bot]
40bb3c843f
Update all non-major Rust dependencies (#323)
* Update all non-major Rust dependencies

* bump fluence-app-service version

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Valery Antopol <valery.antopol@gmail.com>
2022-09-13 19:03:18 +03:00
Ivan Boldyrev
89355d9da3
style: Misc clippy fixes (#327)
* Add warn(rust_2018_idioms) to remaining crates
 air-beautifier, air-beautify and air-trace now have this lint too.

* Fix more warnings
2022-09-13 20:54:57 +07:00
Valery Antopol
204b2be44d
Bump avm-server version to 0.26.0 (#317) 2022-09-09 16:56:03 +03:00
renovate[bot]
a77fb3395c
Update all non-major Rust dependencies (#321) 2022-09-09 13:36:19 +03:00
Mike Voronov
a4011ef038
Introduce length functor (#314) 2022-09-08 16:58:04 +03:00
Mike Voronov
626796b299
fix clippy warnings (#319) 2022-09-08 16:32:28 +03:00
Mike Voronov
2784d8a51f
bump wasm-bindgen (#316) 2022-09-07 11:38:49 +03:00
Anatoly Laskaris
2d400b4028
Bump marine-runtime to 0.20.0 (#299) 2022-09-02 14:32:04 +03:00
Ivan Boldyrev
513eb0e126
Testing framework, chapter I (#293)
Testing framework for AquaVM

Its primary features are:
1. It generates services declaratively by annotation in the comments inserted just after calls.
2. Ephemeral network keeps each node's data and incoming data queue.  The network can be also generated based on peer IDs featured in the script.
3. One can explicitly add additional peers and services.

The example of the script annotations:
```
(seq
  (call "peer_1" ("service" "func") [] var) ; ok=42
  (call "peer_2" ("service" "func") [var]) ; err={"ret_code": 1, "result":"no towel"}
)
```

Passing this script to `air_test_framework::TestExecutor::new(...)` will create a virtual network with peers "peer_1" and "peer_2" (and any peer you provide in the `TestRunParameters`), and the particular calls will return respective values.

Please note that autogenerated services use modified service name as a side channel for finding a correct value: "..{N}" is added to each service name (two dots and serial number).  Be careful with service names taken from a variable.
2022-09-01 18:12:55 +07:00
Mike Voronov
5072fba9d6
Introduce canon instruction (#292) 2022-08-26 00:43:43 +03:00
Ivan Boldyrev
5c7e88e0f2
Refactor avm-server interface mod to new crate (#294)
* Refactor `avm-server` interface mod to new crate (#294)

The new crate name is `avm-interface`.

It allows to build fully native air-trace, including pure WASM build.

* Make fully native air-trace build

Unless `wasm` feature is enabled (default), fully native build is
produced.  You may build WASM air-trace binary with

`cargo build --target wasm32-wasi --no-default-features --release -p air-trace`

* Fix tracing output on native air-trace build

Wrong option was used.
2022-08-19 16:29:21 +07:00
Mike Voronov
e884210d35
remove jsonpath filter option (#290) 2022-08-09 00:30:33 +03:00
Valery Antopol
52f0390eb8
Update marine-rs-sdk to 0.7.0 to fix memory leak (#287) 2022-07-27 16:40:27 +03:00
Ivan Boldyrev
c3cea695c8
air-trace util for measuring AquaVM performance with tracing crate.
`air-trace run` subcommand allows to run AquaVM on any data, it allows to define most AquaVM inputs, providing defaults for most of them, and sets up either human-readable or JSON tracing output, the latter can be later processed by `air-trace stats`.

Anomaly data input is also supported, that is useful for slow data investigation.

Native execution mode can be used for native profiling.  Please note, however, that current version cannot be built natively on Apple Sillicon processor yet, as invariably depends on the `avm-server` because of leaking types that should be refactored or hidden.  The `--repeat` option can repeat the execution several times for the execution to dominate on input data reading and output.

High-level or rare calls have "info" trace level, instructions are "debug", and sub-instruction calls are "tracing".  Over-detailed tracing can induce overhead that spoils timing data.
2022-07-07 18:44:58 +07:00
Ivan Boldyrev
4acfb19e08
Add AIR script to the AquaVM's anomaly data (#280)
Save AIR script to AnomlalyData struct.

Increments versions of `avm-data-store` to 0.3.0 and `avm-server` to 0.22.0.
2022-06-30 16:26:37 +07:00
Mike Voronov
3a84ceb863
Add API to save anomaly data (#277)
This PR adds two new methods in DataStore to determine anomaly and collect necessary data. Additionally
    - a generic parameter of DataStore turned to be associative
    - AVMOutcome contains additionally memory_delta and execution_time
2022-06-23 15:24:00 +03:00
Ivan Boldyrev
1c0ff2c979
air-beautifier lib and air-beautify binary (#266)
The `air-beautify` util takes an AIR script input with Lisp-like syntax
and transforms it into experimental indentation-based syntax.

Closing #184.
2022-05-20 21:07:22 +07:00
Ivan Boldyrev
ec3d3a4e6f Fix Display of Value::LastError with lambda
There was a small typo in the `fn display_last_error`.

Closes #263
2022-05-17 12:57:27 +07:00
Ivan Boldyrev
dcfa51c756 Use pooled AVMRunner for tests
Use pooled `avm::server::AVMRunner` instances of
air_iterpreter_server.wasm to reduce tests' running time.  It avoids
repeated WASM loading and compilation.

On my hardware, `cargo test --release` execution time (precompiled)
decreases from almost 6 minutes to 1.5 minutes.
2022-05-16 13:16:28 +07:00
Valery Antopol
74ddf26b6a
update faas (#259) 2022-04-26 16:54:24 +03:00
Valery Antopol
44c87097c7
remove patch (#258) 2022-04-26 13:29:16 +03:00
Valery Antopol
298d796c09
update faas & app-service (#257) 2022-04-26 13:12:10 +03:00
Mike Voronov
3f510e1581
Improve scope error handling (#251) 2022-04-21 18:01:06 +03:00
Mike Voronov
7e0c87d72a
Introduce %ttl% (#253) 2022-04-21 11:44:18 +03:00
Mike Voronov
490791b177
introduce %timestamp% (#250) 2022-04-20 23:05:37 +03:00
Mike Voronov
5c2b9d442b
Expose max memory size (#242) 2022-04-20 20:21:07 +03:00
Mike Voronov
69a42cf111
Introduce new for non iterable scalars (#248) 2022-04-20 11:43:46 +03:00
Mike Voronov
06d275ea16
Improve non iterable scalar scoping (#243) 2022-04-15 22:25:03 +03:00
Valery Antopol
5f0e295073
update faas (#240) 2022-04-07 00:18:49 +03:00
Valery Antopol
7f3b44fb9b
bump faas version (#235)
* bump faas version

* bump avm-server-version
2022-03-25 21:53:15 +03:00
Mike Voronov
b29883e990
Refactor tests (#231) 2022-03-10 16:06:43 +03:00
Mike Voronov
c00b453a48
Remove RefCell from streams (#227) 2022-03-03 19:09:48 +03:00
Mike Voronov
3219570006
switch to marine without mem limits (#213) 2022-01-31 18:46:15 +03:00
Mike Voronov
4f90f194c7
Implement scalars in lambda for streams (#212) 2022-01-26 17:16:59 +03:00
Mike Voronov
58aef82b1e
Add API for returning interpreter memory size (#210) 2022-01-26 13:37:22 +03:00
Mike Voronov
6df4e470d3
Bump AquaVM to 0.20.0 (#208) 2021-12-29 21:24:03 +03:00
Mike Voronov
bde7193747
bump avm-server (#199) 2021-12-21 14:33:20 +03:00
vms
54e383cdaf introduce farewell step; reafactoring 2021-12-17 22:02:16 +03:00