Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce canon instruction #292

Merged
merged 23 commits into from
Aug 25, 2022
Merged

Conversation

mikevoronov
Copy link
Member

@mikevoronov mikevoronov commented Aug 15, 2022

Closes #158.

@mikevoronov mikevoronov self-assigned this Aug 15, 2022
@linear
Copy link

linear bot commented Aug 15, 2022

VM-22 Stream canonicalization

There are some instructions that behaviour is highly depended on a stream content (such as match, mismatch, and call). And since our streams are CRDT-like, to make execution deterministic it's needed to introduce a way to fix (or "to pin") a stream content during a script execution. This could be achieved with so-called canonicalization, a procedure that turn a stream to be a scalar.

@mikevoronov mikevoronov marked this pull request as draft August 15, 2022 06:19
@mikevoronov mikevoronov changed the title Introduce canon instrucition Introduce canon instruction Aug 15, 2022
@mikevoronov mikevoronov marked this pull request as ready for review August 17, 2022 12:45
/// A canonicalized stream with lambda.
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
pub struct CanonStreamWithLambda<'i> {
pub name: &'i str,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic question not quite related to this PR: Deserialize without Cow is very limited. What is its propose on the AST types?

@monoid
Copy link
Contributor

monoid commented Aug 18, 2022

utACK

Copy link
Collaborator

@ValeryAntopol ValeryAntopol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

air/src/execution_step/air/ap/apply_to_arguments.rs Outdated Show resolved Hide resolved
air/src/execution_step/air/call.rs Show resolved Hide resolved
air/src/execution_step/air/canon.rs Show resolved Hide resolved
air/src/execution_step/air/canon.rs Show resolved Hide resolved
air/src/execution_step/air/fold_scalar.rs Show resolved Hide resolved
air/src/execution_step/boxed_value/stream.rs Outdated Show resolved Hide resolved
crates/air-lib/air-parser/src/parser/tests/canon.rs Outdated Show resolved Hide resolved
crates/air-lib/interpreter-data/Cargo.toml Show resolved Hide resolved
crates/air-lib/trace-handler/src/merger/errors.rs Outdated Show resolved Hide resolved
@mikevoronov mikevoronov added A-new-instruction area: a new instruction issue or PR C-feature category: a new feature request A-execution-engine area: execution engine of AquaVM A-air-parser area: air-parser labels Aug 25, 2022
@mikevoronov mikevoronov merged commit 5072fba into master Aug 25, 2022
@mikevoronov mikevoronov deleted the feat/VM-22-introduce-canon-instr branch August 25, 2022 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-air-parser area: air-parser A-execution-engine area: execution engine of AquaVM A-new-instruction area: a new instruction issue or PR C-feature category: a new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stream canonicalization
3 participants