diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9538a1ec3cb8..e76f29eca24e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,7 +86,7 @@ jobs: --no-changelog-preview --allow-fully-generated-changelogs --bump ${{ inputs.bump }} --bump-dependencies auto ${{ inputs.execute && '--execute' || '--no-publish' }} - hydroflow hydroflow_lang hydroflow_macro hydroflow_plus + hydroflow hydroflow_lang dfir_macro hydroflow_plus hydroflow_plus_std hydroflow_datalog hydroflow_datalog_core hydro_deploy hydro_cli hydroflow_deploy_integration stageleft stageleft_macro stageleft_tool diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4bd6001702fb..72e68172e9d0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ The Hydroflow repo is set up as a monorepo and [Cargo workspace](https://doc.rus Relative to the repository root: * `hydroflow` is the main Hydroflow package, containing the Hydroflow runtime. It re-exports the - surface syntax macros in `hydroflow_macro` and `hydroflow_lang`. The runtime is the "scheduled + surface syntax macros in `dfir_macro` and `hydroflow_lang`. The runtime is the "scheduled layer" while the surface syntax compiler is the "compiled layer". * `hydro_lang` and related (hydro_*) packages contain Hydro, which is a functional syntax built on top of `hydroflow`. diff --git a/Cargo.lock b/Cargo.lock index 9b91d9b97125..5656b8f17600 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -871,6 +871,19 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "dfir_macro" +version = "0.10.0" +dependencies = [ + "hydroflow_lang", + "itertools", + "proc-macro-crate", + "proc-macro2", + "quote", + "rustc_version 0.4.1", + "syn 2.0.75", +] + [[package]] name = "differential-dataflow-master" version = "0.13.0-dev.1" @@ -1553,12 +1566,12 @@ dependencies = [ "clap", "colored", "criterion", + "dfir_macro", "futures", "getrandom", "hydroflow_datalog", "hydroflow_deploy_integration", "hydroflow_lang", - "hydroflow_macro", "insta", "itertools", "lattices", @@ -1651,19 +1664,6 @@ dependencies = [ "webbrowser", ] -[[package]] -name = "hydroflow_macro" -version = "0.10.0" -dependencies = [ - "hydroflow_lang", - "itertools", - "proc-macro-crate", - "proc-macro2", - "quote", - "rustc_version 0.4.1", - "syn 2.0.75", -] - [[package]] name = "hyper" version = "0.14.31" diff --git a/Cargo.toml b/Cargo.toml index da5b718076f3..dffdfe86171e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ "hydroflow_datalog", "hydroflow_datalog_core", "hydroflow_lang", - "hydroflow_macro", + "dfir_macro", "hydro_lang", "hydro_std", "hydro_test", diff --git a/RELEASING.md b/RELEASING.md index 88832a6e6608..a582de7e13c8 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -28,7 +28,7 @@ To (dry) run the command locally to spot-check for errors and warnings: cargo smart-release --update-crates-index \ --no-changelog-preview --allow-fully-generated-changelogs \ --bump-dependencies auto --bump minor \ # or `patch`, `major`, `keep`, `auto` - hydroflow hydroflow_lang hydroflow_macro hydro_lang \ + hydroflow hydroflow_lang dfir_macro hydro_lang \ hydroflow_datalog hydroflow_datalog_core \ hydro_deploy hydro_cli hydroflow_cli_integration \ hydroflow_plus_cli_integration \ diff --git a/benches/benches/arithmetic.rs b/benches/benches/arithmetic.rs index cde87cce81ff..f6e4b8067352 100644 --- a/benches/benches/arithmetic.rs +++ b/benches/benches/arithmetic.rs @@ -2,7 +2,7 @@ use std::sync::mpsc::channel; use std::thread; use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use static_assertions::const_assert; use timely::dataflow::operators::{Inspect, Map, ToStream}; @@ -172,7 +172,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) { c.bench_function("arithmetic/hydroflow/surface", |b| { b.iter_batched( || { - hydroflow_syntax! { + dfir_syntax! { source_iter(black_box(0..NUM_INTS)) -> map(|x| black_box(x + 1)) diff --git a/benches/benches/fan_in.rs b/benches/benches/fan_in.rs index bd532179d4b3..88dfe1253b6e 100644 --- a/benches/benches/fan_in.rs +++ b/benches/benches/fan_in.rs @@ -1,5 +1,5 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::handoff::Iter; use hydroflow::scheduled::query::Query as Q; use static_assertions::const_assert; @@ -40,7 +40,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) { const_assert!(NUM_OPS == 20); // This benchmark is hardcoded for 20 ops, so assert that NUM_OPS is 20. c.bench_function("fan_in/hydroflow/surface", |b| { b.iter(|| { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_union = union(); diff --git a/benches/benches/fan_out.rs b/benches/benches/fan_out.rs index 4f32186e1a8a..8fe5c6707f7f 100644 --- a/benches/benches/fan_out.rs +++ b/benches/benches/fan_out.rs @@ -1,5 +1,5 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::handoff::Iter; use hydroflow::scheduled::query::Query as Q; use static_assertions::const_assert; @@ -32,7 +32,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) { const_assert!(NUM_OPS == 20); // This benchmark is hardcoded for 20 ops, so assert that NUM_OPS is 20. c.bench_function("fan_out/hydroflow/surface", |b| { b.iter(|| { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_tee = tee(); source_iter(black_box(0..NUM_INTS)) -> my_tee; diff --git a/benches/benches/fork_join.rs b/benches/benches/fork_join.rs index 4e3ba4c776de..ce402811c134 100644 --- a/benches/benches/fork_join.rs +++ b/benches/benches/fork_join.rs @@ -1,5 +1,5 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::scheduled::graph_ext::GraphExt; use hydroflow::scheduled::handoff::{Iter, VecHandoff}; diff --git a/benches/benches/identity.rs b/benches/benches/identity.rs index 5bb28588e644..13c60af37db2 100644 --- a/benches/benches/identity.rs +++ b/benches/benches/identity.rs @@ -2,7 +2,7 @@ use std::sync::mpsc::channel; use std::thread; use criterion::{black_box, criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph_ext::GraphExt; use static_assertions::const_assert; use timely::dataflow::operators::{Inspect, Map, ToStream}; @@ -190,7 +190,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) { const_assert!(NUM_OPS == 20); // This benchmark is hardcoded for 20 ops, so assert that NUM_OPS is 20. c.bench_function("identity/hydroflow/surface", |b| { b.iter(|| { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(black_box(0..NUM_INTS)) -> map(black_box) diff --git a/benches/benches/micro_ops.rs b/benches/benches/micro_ops.rs index 9f6d6c55711b..62eb73e162ed 100644 --- a/benches/benches/micro_ops.rs +++ b/benches/benches/micro_ops.rs @@ -1,5 +1,5 @@ use criterion::{black_box, criterion_group, criterion_main, BatchSize, Criterion}; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use rand::distributions::{Distribution, Uniform}; use rand::rngs::StdRng; use rand::SeedableRng; @@ -14,7 +14,7 @@ fn ops(c: &mut Criterion) { let dist = Uniform::new(0, 100); let data: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); - hydroflow_syntax! { + dfir_syntax! { source_iter(black_box(data)) -> identity() -> for_each(|x| { black_box(x); }); } }, @@ -32,7 +32,7 @@ fn ops(c: &mut Criterion) { let dist = Uniform::new(0, 100); let data: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); - hydroflow_syntax! { + dfir_syntax! { source_iter(data) -> unique() -> for_each(|x| { black_box(x); }); } }, @@ -50,7 +50,7 @@ fn ops(c: &mut Criterion) { let dist = Uniform::new(0, 100); let data: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); - hydroflow_syntax! { + dfir_syntax! { source_iter(black_box(data)) -> map(|x| x + 1) -> for_each(|x| { black_box(x); }); } }, @@ -68,7 +68,7 @@ fn ops(c: &mut Criterion) { let dist = Uniform::new(0, 100); let data: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); - hydroflow_syntax! { + dfir_syntax! { source_iter(black_box(data)) -> flat_map(|x| [x]) -> for_each(|x| { black_box(x); }); } }, @@ -89,7 +89,7 @@ fn ops(c: &mut Criterion) { let input1: Vec<(usize, ())> = (0..NUM_INTS).map(|_| (dist.sample(&mut rng), ())).collect(); - hydroflow_syntax! { + dfir_syntax! { my_join = join(); source_iter(black_box(input0)) -> [0]my_join; @@ -115,7 +115,7 @@ fn ops(c: &mut Criterion) { let input1: Vec<(usize, ())> = (0..NUM_INTS).map(|_| (dist.sample(&mut rng), ())).collect(); - hydroflow_syntax! { + dfir_syntax! { my_difference = difference(); source_iter(black_box(input0)) -> [pos]my_difference; @@ -139,7 +139,7 @@ fn ops(c: &mut Criterion) { let input0: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); let input1: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); - hydroflow_syntax! { + dfir_syntax! { my_union = union(); source_iter(black_box(input0)) -> my_union; @@ -162,7 +162,7 @@ fn ops(c: &mut Criterion) { let dist = Uniform::new(0, 100); let input0: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); - hydroflow_syntax! { + dfir_syntax! { my_tee = tee(); source_iter(black_box(input0)) -> my_tee; @@ -186,7 +186,7 @@ fn ops(c: &mut Criterion) { let input0: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); { - hydroflow_syntax! { + dfir_syntax! { source_iter(black_box(input0)) -> fold::<'tick>(|| 0, |accum: &mut _, elem| { *accum += elem }) -> for_each(|x| { black_box(x); }); } } @@ -205,7 +205,7 @@ fn ops(c: &mut Criterion) { let dist = Uniform::new(0, 100); let input0: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); - hydroflow_syntax! { + dfir_syntax! { source_iter(black_box(input0)) -> sort() -> for_each(|x| { black_box(x); }); } }, @@ -227,7 +227,7 @@ fn ops(c: &mut Criterion) { let input0: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); let input1: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); - hydroflow_syntax! { + dfir_syntax! { my_crossjoin = cross_join(); source_iter(black_box(input0)) -> [0]my_crossjoin; @@ -252,7 +252,7 @@ fn ops(c: &mut Criterion) { (0..NUM_INTS).map(|_| (dist.sample(&mut rng), ())).collect(); let input1: Vec = (0..NUM_INTS).map(|_| dist.sample(&mut rng)).collect(); - hydroflow_syntax! { + dfir_syntax! { my_antijoin = anti_join(); source_iter(black_box(input0)) -> [pos]my_antijoin; @@ -271,7 +271,7 @@ fn ops(c: &mut Criterion) { c.bench_function("micro/ops/next_tick/small", |b| { const DATA: [u64; 1024] = [0; 1024]; - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(black_box(DATA)) -> persist::<'static>() -> map(black_box) -> defer_tick() @@ -305,7 +305,7 @@ fn ops(c: &mut Criterion) { c.bench_function("micro/ops/next_tick/big", |b| { const DATA: [[u8; 8192]; 1] = [[0; 8192]; 1]; - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(black_box(DATA)) -> persist::<'static>() -> defer_tick() -> map(black_box) @@ -345,7 +345,7 @@ fn ops(c: &mut Criterion) { .map(|_| (dist.sample(&mut rng), dist.sample(&mut rng))) .collect(); - hydroflow_syntax! { + dfir_syntax! { source_iter(black_box(input0)) -> fold_keyed(|| 0, |x: &mut usize, n: usize| { *x += n; diff --git a/benches/benches/reachability.rs b/benches/benches/reachability.rs index 57919ca8a28a..a6aef98698cb 100644 --- a/benches/benches/reachability.rs +++ b/benches/benches/reachability.rs @@ -7,7 +7,7 @@ use std::sync::LazyLock; use criterion::{criterion_group, criterion_main, Criterion}; use differential_dataflow::input::Input; use differential_dataflow::operators::{Iterate, Join, Threshold}; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph_ext::GraphExt; static EDGES: LazyLock>> = LazyLock::new(|| { @@ -298,7 +298,7 @@ fn benchmark_hydroflow_surface_cheating(c: &mut Criterion) { let df = { let reachable_inner = reachable_verts.clone(); - hydroflow_syntax! { + dfir_syntax! { origin = source_iter([1]); reached_vertices = union(); origin -> reached_vertices; @@ -334,7 +334,7 @@ fn benchmark_hydroflow_surface(c: &mut Criterion) { let edges = edges.clone(); let reachable_inner = reachable_verts.clone(); - hydroflow_syntax! { + dfir_syntax! { origin = source_iter(vec![1]); stream_of_edges = source_iter(edges); reached_vertices = union(); diff --git a/benches/benches/words_diamond.rs b/benches/benches/words_diamond.rs index c3c4c1e133b7..120da48c0765 100644 --- a/benches/benches/words_diamond.rs +++ b/benches/benches/words_diamond.rs @@ -3,7 +3,7 @@ use std::path::PathBuf; use std::sync::LazyLock; use criterion::{criterion_group, criterion_main, Criterion}; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::itertools::Itertools; use nameof::name_of; @@ -35,7 +35,7 @@ fn hydroflow_diamond(c: &mut Criterion) { c.bench_function(name_of!(hydroflow_diamond), |b| { b.iter(|| { let words = words(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_tee = source_iter(words) -> tee(); my_tee -> flat_map(|s| [format!("hi {}", s), format!("bye {}", s)]) -> my_union; my_tee -> filter(|s| 0 == s.len() % 5) -> my_union; diff --git a/benches/build.rs b/benches/build.rs index fecfaec86744..9c0bf20b60b8 100644 --- a/benches/build.rs +++ b/benches/build.rs @@ -19,7 +19,7 @@ pub fn fork_join() -> std::io::Result<()> { let file = File::create(path)?; let mut write = BufWriter::new(file); - writeln!(write, "hydroflow_syntax! {{")?; + writeln!(write, "dfir_syntax! {{")?; writeln!(write, "a0 = source_iter(0..NUM_INTS) -> tee();")?; for i in 0..NUM_OPS { if i > 0 { diff --git a/datastores/gossip_kv/cli/main.rs b/datastores/gossip_kv/cli/main.rs index 8834da9ce459..5cf5919bb737 100644 --- a/datastores/gossip_kv/cli/main.rs +++ b/datastores/gossip_kv/cli/main.rs @@ -3,7 +3,7 @@ use std::net::SocketAddr; use clap::{CommandFactory, Parser, Subcommand}; use gossip_kv::{ClientRequest, ClientResponse, Key}; use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; -use hydroflow::{hydroflow_syntax, tokio, DemuxEnum}; +use hydroflow::{dfir_syntax, tokio, DemuxEnum}; use tracing::error; /// CLI program to interact with Layer 0 gossip store. @@ -98,7 +98,7 @@ async fn main() { // Setup UDP sockets for communication. let (outbound, inbound, _) = bind_udp_bytes(address).await; - let mut cli = hydroflow_syntax! { + let mut cli = dfir_syntax! { inbound_messages = source_stream_serde(inbound) -> map(Result::unwrap) -> for_each(|(response, _addr): (ClientResponse, SocketAddr)| println!("{:?}", response)); outbound_messages = union() -> dest_sink_serde(outbound); diff --git a/datastores/gossip_kv/kv/server.rs b/datastores/gossip_kv/kv/server.rs index a36d89013c40..c491a5d3dcea 100644 --- a/datastores/gossip_kv/kv/server.rs +++ b/datastores/gossip_kv/kv/server.rs @@ -2,8 +2,8 @@ use std::collections::{HashMap, HashSet}; use std::fmt::Debug; use std::hash::Hash; +use hydroflow::dfir_syntax; use hydroflow::futures::{Sink, Stream}; -use hydroflow::hydroflow_syntax; use hydroflow::itertools::Itertools; use hydroflow::lattices::map_union::{KeyedBimorphism, MapUnionHashMap, MapUnionSingletonMap}; use hydroflow::lattices::set_union::SetUnionHashSet; @@ -102,7 +102,7 @@ where let member_id_5 = my_member_id.clone(); let member_id_6 = my_member_id.clone(); - hydroflow_syntax! { + dfir_syntax! { on_start = initialize() -> tee(); on_start -> for_each(|_| info!("{:?}: Transducer {} started.", context.current_tick(), member_id_6)); @@ -413,7 +413,7 @@ mod tests { let client_tx = ctx.new_outbox::("client".to_string()); let client_rx = ctx.new_inbox::("client".to_string()); - hydroflow_syntax! { + dfir_syntax! { client_output = dest_sink(client_tx); @@ -520,7 +520,7 @@ mod tests { fleet.add_host(writer_name.clone(), |ctx| { let client_tx = ctx.new_outbox::("client".to_string()); - hydroflow_syntax! { + dfir_syntax! { client_output = dest_sink(client_tx); source_stream(writer_trigger_rx) @@ -557,7 +557,7 @@ mod tests { let client_tx = ctx.new_outbox::("client".to_string()); let client_rx = ctx.new_inbox::("client".to_string()); - hydroflow_syntax! { + dfir_syntax! { client_output = dest_sink(client_tx); source_stream(reader_trigger_rx) @@ -703,7 +703,7 @@ mod tests { fleet.add_host(writer_name.clone(), |ctx| { let client_tx = ctx.new_outbox::("client".to_string()); - hydroflow_syntax! { + dfir_syntax! { client_output = dest_sink(client_tx); source_stream(writer_trigger_rx) @@ -724,7 +724,7 @@ mod tests { let client_tx = ctx.new_outbox::("client".to_string()); let client_rx = ctx.new_inbox::("client".to_string()); - hydroflow_syntax! { + dfir_syntax! { client_output = dest_sink(client_tx); source_stream(reader_trigger_rx) diff --git a/hydroflow_macro/CHANGELOG.md b/dfir_macro/CHANGELOG.md similarity index 100% rename from hydroflow_macro/CHANGELOG.md rename to dfir_macro/CHANGELOG.md diff --git a/hydroflow_macro/Cargo.toml b/dfir_macro/Cargo.toml similarity index 82% rename from hydroflow_macro/Cargo.toml rename to dfir_macro/Cargo.toml index 4581adb99608..605c5f10bdc9 100644 --- a/hydroflow_macro/Cargo.toml +++ b/dfir_macro/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "hydroflow_macro" +name = "dfir_macro" publish = true version = "0.10.0" edition = "2021" license = "Apache-2.0" -documentation = "https://docs.rs/hydroflow_macro/" -description = "Macro for using Hydroflow's Surface Syntax" +documentation = "https://docs.rs/dfir_macro/" +description = "Macro for using Hydro's Data Flow Intermediate Representation (DFIR)." [lints] workspace = true diff --git a/hydroflow_macro/build.rs b/dfir_macro/build.rs similarity index 99% rename from hydroflow_macro/build.rs rename to dfir_macro/build.rs index 3fa4cb3c6f8e..18f89a1e5762 100644 --- a/hydroflow_macro/build.rs +++ b/dfir_macro/build.rs @@ -218,7 +218,7 @@ fn main() { if Err(VarError::NotPresent) != std::env::var("CARGO_CFG_HYDROFLOW_GENERATE_DOCS") { if let Err(err) = update_book() { - eprintln!("hydroflow_macro/build.rs error: {:?}", err); + eprintln!("dfir_macro/build.rs error: {:?}", err); } } } diff --git a/hydroflow_macro/src/lib.rs b/dfir_macro/src/lib.rs similarity index 94% rename from hydroflow_macro/src/lib.rs rename to dfir_macro/src/lib.rs index f03ae0dc87e0..c957b1baf0f3 100644 --- a/hydroflow_macro/src/lib.rs +++ b/dfir_macro/src/lib.rs @@ -20,16 +20,16 @@ use syn::{ /// in the [Hydroflow repo](https://github.com/hydro-project/hydroflow). // TODO(mingwei): rustdoc examples inline. #[proc_macro] -pub fn hydroflow_syntax(input: proc_macro::TokenStream) -> proc_macro::TokenStream { - hydroflow_syntax_internal(input, Some(Level::Help)) +pub fn dfir_syntax(input: proc_macro::TokenStream) -> proc_macro::TokenStream { + dfir_syntax_internal(input, Some(Level::Help)) } -/// [`hydroflow_syntax!`] but will not emit any diagnostics (errors, warnings, etc.). +/// [`dfir_syntax!`] but will not emit any diagnostics (errors, warnings, etc.). /// -/// Used for testing, users will want to use [`hydroflow_syntax!`] instead. +/// Used for testing, users will want to use [`dfir_syntax!`] instead. #[proc_macro] -pub fn hydroflow_syntax_noemit(input: proc_macro::TokenStream) -> proc_macro::TokenStream { - hydroflow_syntax_internal(input, None) +pub fn dfir_syntax_noemit(input: proc_macro::TokenStream) -> proc_macro::TokenStream { + dfir_syntax_internal(input, None) } fn root() -> proc_macro2::TokenStream { @@ -57,7 +57,7 @@ fn root() -> proc_macro2::TokenStream { } } -fn hydroflow_syntax_internal( +fn dfir_syntax_internal( input: proc_macro::TokenStream, min_diagnostic_level: Option, ) -> proc_macro::TokenStream { @@ -86,9 +86,9 @@ fn hydroflow_syntax_internal( /// Parse Hydroflow "surface syntax" without emitting code. /// -/// Used for testing, users will want to use [`hydroflow_syntax!`] instead. +/// Used for testing, users will want to use [`dfir_syntax!`] instead. #[proc_macro] -pub fn hydroflow_parser(input: proc_macro::TokenStream) -> proc_macro::TokenStream { +pub fn dfir_parser(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input = parse_macro_input!(input as HfCode); let flat_graph_builder = FlatGraphBuilder::from_hfcode(input); @@ -177,7 +177,7 @@ pub fn monotonic_fn(item: proc_macro::TokenStream) -> proc_macro::TokenStream { } #[proc_macro_attribute] -pub fn hydroflow_test( +pub fn dfir_test( args: proc_macro::TokenStream, item: proc_macro::TokenStream, ) -> proc_macro::TokenStream { @@ -193,7 +193,7 @@ pub fn hydroflow_test( } #[proc_macro_attribute] -pub fn hydroflow_main( +pub fn dfir_main( _: proc_macro::TokenStream, item: proc_macro::TokenStream, ) -> proc_macro::TokenStream { diff --git a/docs/docs/deploy/your-first-deploy.md b/docs/docs/deploy/your-first-deploy.md index 1c727172341d..50af5e059726 100644 --- a/docs/docs/deploy/your-first-deploy.md +++ b/docs/docs/deploy/your-first-deploy.md @@ -78,7 +78,7 @@ Returning briefly to our Hydroflow code, we can then load these ports and use th ```rust use hydroflow_deploy_integration::ConnectedDirect; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; #[hydroflow::main] async fn main() { @@ -97,7 +97,7 @@ async fn main() { .await .into_sink(); - hydroflow::util::deploy::launch_flow(hydroflow_syntax! { + hydroflow::util::deploy::launch_flow(dfir_syntax! { source_iter(["hello".to_string()]) -> dest_sink(output_send); input = source_stream(input_recv) -> tee(); input -> dest_sink(output_send); diff --git a/docs/docs/hydroflow/quickstart/example_1_simplest.mdx b/docs/docs/hydroflow/quickstart/example_1_simplest.mdx index 394367386a0d..3cd72eb7d9e2 100644 --- a/docs/docs/hydroflow/quickstart/example_1_simplest.mdx +++ b/docs/docs/hydroflow/quickstart/example_1_simplest.mdx @@ -58,7 +58,7 @@ This import gives you the macro you need from Hydroflow to write code in Hydrofl [_surface syntax_](../syntax). Next, inside the main method we specify a flow by calling the -`hydroflow_syntax!` macro. We assign the resulting `Hydroflow` instance to +`dfir_syntax!` macro. We assign the resulting `Hydroflow` instance to a mutable variable `flow`––mutable because we will be changing its status when we run it. {getLines(exampleCode, 'macro_call')} diff --git a/docs/docs/hydroflow/quickstart/example_3_stream.mdx b/docs/docs/hydroflow/quickstart/example_3_stream.mdx index 8ec6856c8766..77ea925cb993 100644 --- a/docs/docs/hydroflow/quickstart/example_3_stream.mdx +++ b/docs/docs/hydroflow/quickstart/example_3_stream.mdx @@ -17,10 +17,10 @@ In our previous examples, data came from within the Hydroflow spec, via Rust ite For discussion, we start with a skeleton much like before: ```rust showLineNumbers -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { - let mut hydroflow = hydroflow_syntax! { + let mut hydroflow = dfir_syntax! { // code will go here }; diff --git a/hydro_deploy/hydro_cli_examples/examples/stdout_receiver/main.rs b/hydro_deploy/hydro_cli_examples/examples/stdout_receiver/main.rs index e92794c4d5ba..d5123a7b7f8d 100644 --- a/hydro_deploy/hydro_cli_examples/examples/stdout_receiver/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/stdout_receiver/main.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::deploy::{ConnectedDirect, ConnectedSource}; #[hydroflow::main] @@ -10,7 +10,7 @@ async fn main() { .await .into_source(); - let df = hydroflow_syntax! { + let df = dfir_syntax! { source_stream(echo_recv) -> map(|x| String::from_utf8(x.unwrap().to_vec()).unwrap()) -> for_each(|x| println!("echo {:?}", x)); diff --git a/hydro_deploy/hydro_cli_examples/examples/tagged_stdout_receiver/main.rs b/hydro_deploy/hydro_cli_examples/examples/tagged_stdout_receiver/main.rs index 36c0dc19154b..4fd01223ce5a 100644 --- a/hydro_deploy/hydro_cli_examples/examples/tagged_stdout_receiver/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/tagged_stdout_receiver/main.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::deploy::{ConnectedDirect, ConnectedSource, ConnectedTagged}; #[hydroflow::main] @@ -10,7 +10,7 @@ async fn main() { .await .into_source(); - let df = hydroflow_syntax! { + let df = dfir_syntax! { source_stream(echo_recv) -> map(|x| { let x = x.unwrap(); diff --git a/hydro_deploy/hydro_cli_examples/examples/ws_chat_server/main.rs b/hydro_deploy/hydro_cli_examples/examples/ws_chat_server/main.rs index 3525c81f1428..b99e3124851f 100644 --- a/hydro_deploy/hydro_cli_examples/examples/ws_chat_server/main.rs +++ b/hydro_deploy/hydro_cli_examples/examples/ws_chat_server/main.rs @@ -1,5 +1,5 @@ use hydroflow::compiled::pull::HalfMultisetJoinState; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::deploy::{ConnectedSink, ConnectedSource}; use hydroflow::util::{deserialize_from_bytes, serialize_to_bytes}; use serde::{Deserialize, Serialize}; @@ -53,7 +53,7 @@ async fn main() { let (clients_connect, clients_disconnect, from_client, to_client) = util::ws_server(ws_port).await; - let df = hydroflow_syntax! { + let df = dfir_syntax! { all_peers = source_iter((0..number_of_nodes).filter(move |&i| i != self_node_id)) -> persist::<'static>(); // networking diff --git a/hydroflow/Cargo.toml b/hydroflow/Cargo.toml index 319bf0ae243d..941b0742566f 100644 --- a/hydroflow/Cargo.toml +++ b/hydroflow/Cargo.toml @@ -14,8 +14,8 @@ workspace = true default = [ "macros", "debugging", "meta" ] meta = [ "dep:hydroflow_lang" ] -macros = [ "hydroflow_macro", "hydroflow_datalog" ] -hydroflow_macro = [ "dep:hydroflow_macro" ] +macros = [ "dfir_macro", "hydroflow_datalog" ] +dfir_macro = [ "dep:dfir_macro" ] hydroflow_datalog = [ "dep:hydroflow_datalog" ] deploy_integration = [ "dep:hydroflow_deploy_integration" ] python = [ "dep:pyo3" ] @@ -37,7 +37,7 @@ futures = "0.3.0" hydroflow_deploy_integration = { optional = true, path = "../hydro_deploy/hydroflow_deploy_integration", version = "^0.10.0" } hydroflow_datalog = { optional = true, path = "../hydroflow_datalog", version = "^0.10.0" } hydroflow_lang = { path = "../hydroflow_lang", version = "^0.10.0", optional = true } -hydroflow_macro = { optional = true, path = "../hydroflow_macro", version = "^0.10.0" } +dfir_macro = { optional = true, path = "../dfir_macro", version = "^0.10.0" } itertools = "0.10.0" lattices = { path = "../lattices", version = "^0.5.8", features = [ "serde" ] } pusherator = { path = "../pusherator", version = "^0.0.9" } diff --git a/hydroflow/examples/chat/client.rs b/hydroflow/examples/chat/client.rs index c926054459b4..25f7e892fda4 100644 --- a/hydroflow/examples/chat/client.rs +++ b/hydroflow/examples/chat/client.rs @@ -1,6 +1,6 @@ use chrono::prelude::*; use colored::Colorize; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; use crate::protocol::Message; @@ -34,7 +34,7 @@ pub(crate) async fn run_client(opts: Opts) { allocated_client_addr, server_addr ); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { // set up channels outbound_chan = union() -> dest_sink_serde(outbound); inbound_chan = source_stream_serde(inbound) diff --git a/hydroflow/examples/chat/protocol.rs b/hydroflow/examples/chat/protocol.rs index ea14986f6077..bb21242b4cf7 100644 --- a/hydroflow/examples/chat/protocol.rs +++ b/hydroflow/examples/chat/protocol.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow_macro::DemuxEnum; +use dfir_macro::DemuxEnum; use serde::{Deserialize, Serialize}; #[derive(PartialEq, Eq, Clone, Serialize, Deserialize, Debug, DemuxEnum)] diff --git a/hydroflow/examples/chat/randomized_gossiping_server.rs b/hydroflow/examples/chat/randomized_gossiping_server.rs index 8b7d21736b74..3b7434f6d5bc 100644 --- a/hydroflow/examples/chat/randomized_gossiping_server.rs +++ b/hydroflow/examples/chat/randomized_gossiping_server.rs @@ -3,9 +3,9 @@ use std::net::SocketAddr; use std::time::Duration; use chrono::{DateTime, Utc}; +use dfir_macro::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; -use hydroflow_macro::hydroflow_syntax; use rand::seq::SliceRandom; use rand::thread_rng; use serde::{Deserialize, Serialize}; @@ -90,7 +90,7 @@ pub(crate) async fn run_gossiping_server(opts: Opts) { "Server is live! Listening on {:?}. Gossiping On: {:?}", actual_server_addr, gossip_listening_addr ); - let mut hf: Hydroflow = hydroflow_syntax! { + let mut hf: Hydroflow = dfir_syntax! { // Define shared inbound and outbound channels client_out = union() -> dest_sink_serde(client_outbound); client_in = source_stream_serde(client_inbound) diff --git a/hydroflow/examples/chat/server.rs b/hydroflow/examples/chat/server.rs index f4cc07fea06f..98f8b57f9e17 100644 --- a/hydroflow/examples/chat/server.rs +++ b/hydroflow/examples/chat/server.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::bind_udp_bytes; @@ -18,7 +18,7 @@ pub(crate) async fn run_server(opts: Opts) { println!("Server is live! Listening on {:?}", actual_server_addr); - let mut hf: Hydroflow = hydroflow_syntax! { + let mut hf: Hydroflow = dfir_syntax! { // Define shared inbound and outbound channels outbound_chan = union() -> dest_sink_serde(outbound); inbound_chan = source_stream_serde(inbound) diff --git a/hydroflow/examples/deadlock_detector/peer.rs b/hydroflow/examples/deadlock_detector/peer.rs index ef0416b725b2..818446ad268c 100644 --- a/hydroflow/examples/deadlock_detector/peer.rs +++ b/hydroflow/examples/deadlock_detector/peer.rs @@ -1,7 +1,7 @@ use std::convert::identity; use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use tokio::io::AsyncBufReadExt; use tokio::net::UdpSocket; @@ -21,7 +21,7 @@ pub(crate) async fn run_detector(opts: Opts, peer_list: Vec) { let stdin_lines = LinesStream::new(reader.lines()); #[expect(clippy::map_identity, reason = "helps type inference?")] - let mut hf: Hydroflow = hydroflow_syntax! { + let mut hf: Hydroflow = dfir_syntax! { // fetch peers from file, convert ip:port to a SocketAddr, and tee peers = source_iter(peer_list) -> map(|s| s.parse::().unwrap()) diff --git a/hydroflow/examples/echo_serde_json/client.rs b/hydroflow/examples/echo_serde_json/client.rs index 5926a1e3442d..dbac59c8264f 100644 --- a/hydroflow/examples/echo_serde_json/client.rs +++ b/hydroflow/examples/echo_serde_json/client.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::{UdpLinesSink, UdpLinesStream}; use crate::helpers::{deserialize_json, serialize_json}; @@ -15,7 +15,7 @@ pub(crate) async fn run_client( println!("Attempting to connect to server at {:?}", server_addr); println!("Client live!"); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { // take stdin and send to server as an Echo::Message source_stdin() -> map(|l| (EchoMsg{ payload: l.unwrap(), ts: Utc::now(), }, server_addr) ) -> map(|(msg, addr)| (serialize_json(msg), addr)) diff --git a/hydroflow/examples/echo_serde_json/server.rs b/hydroflow/examples/echo_serde_json/server.rs index 1e34ea4913fa..eb1773359afa 100644 --- a/hydroflow/examples/echo_serde_json/server.rs +++ b/hydroflow/examples/echo_serde_json/server.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{UdpLinesSink, UdpLinesStream}; @@ -11,7 +11,7 @@ use crate::protocol::EchoMsg; pub(crate) async fn run_server(outbound: UdpLinesSink, inbound: UdpLinesStream) { println!("Server live!"); - let mut flow: Hydroflow = hydroflow_syntax! { + let mut flow: Hydroflow = dfir_syntax! { // Inbound channel sharing inbound_chan = source_stream(inbound) -> map(deserialize_json) -> tee(); diff --git a/hydroflow/examples/echoserver/client.rs b/hydroflow/examples/echoserver/client.rs index 1304867fc7fb..a15a0b529bfc 100644 --- a/hydroflow/examples/echoserver/client.rs +++ b/hydroflow/examples/echoserver/client.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::{UdpSink, UdpStream}; use crate::protocol::EchoMsg; @@ -12,7 +12,7 @@ pub(crate) async fn run_client(outbound: UdpSink, inbound: UdpStream, opts: Opts let server_addr = opts.server_addr.expect("Client requires a server address"); println!("Client live!"); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { // Define shared inbound and outbound channels inbound_chan = source_stream_serde(inbound) // -> tee() // commented out since we only use this once in the client template diff --git a/hydroflow/examples/echoserver/server.rs b/hydroflow/examples/echoserver/server.rs index 4f8dcebe3690..68d9da52fcb5 100644 --- a/hydroflow/examples/echoserver/server.rs +++ b/hydroflow/examples/echoserver/server.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{UdpSink, UdpStream}; @@ -10,7 +10,7 @@ use crate::protocol::EchoMsg; pub(crate) async fn run_server(outbound: UdpSink, inbound: UdpStream, _opts: crate::Opts) { println!("Server live!"); - let mut flow: Hydroflow = hydroflow_syntax! { + let mut flow: Hydroflow = dfir_syntax! { // Define a shared inbound channel inbound_chan = source_stream_serde(inbound) -> map(Result::unwrap) -> tee(); diff --git a/hydroflow/examples/example_1_simplest.rs b/hydroflow/examples/example_1_simplest.rs index 8f7b84b46140..96ac5f6ee55c 100644 --- a/hydroflow/examples/example_1_simplest.rs +++ b/hydroflow/examples/example_1_simplest.rs @@ -1,10 +1,10 @@ //[use]// -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; //[/use]// //[macro_call]// pub fn main() { - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_iter(0..10) -> for_each(|n| println!("Hello {}", n)); }; //[/macro_call]// diff --git a/hydroflow/examples/example_2_simple_1.rs b/hydroflow/examples/example_2_simple_1.rs index 1fe53455e995..33252a4625aa 100644 --- a/hydroflow/examples/example_2_simple_1.rs +++ b/hydroflow/examples/example_2_simple_1.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_iter(0..10) -> map(|n| n * n) -> filter(|n| *n > 10) diff --git a/hydroflow/examples/example_2_simple_2.rs b/hydroflow/examples/example_2_simple_2.rs index 843c14ae603c..961d29f97eae 100644 --- a/hydroflow/examples/example_2_simple_2.rs +++ b/hydroflow/examples/example_2_simple_2.rs @@ -1,6 +1,6 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_iter(0..10) -> filter_map(|n| { let n2 = n * n; diff --git a/hydroflow/examples/example_3_stream.rs b/hydroflow/examples/example_3_stream.rs index 7cf9694e5511..274b2cb78b8e 100644 --- a/hydroflow/examples/example_3_stream.rs +++ b/hydroflow/examples/example_3_stream.rs @@ -1,10 +1,10 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { // Create our channel input let (input_example, example_recv) = hydroflow::util::unbounded_channel::(); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_stream(example_recv) -> filter_map(|n: usize| { let n2 = n * n; diff --git a/hydroflow/examples/example_4_neighbors.rs b/hydroflow/examples/example_4_neighbors.rs index ac298c02b0f1..ade7f171c7d2 100644 --- a/hydroflow/examples/example_4_neighbors.rs +++ b/hydroflow/examples/example_4_neighbors.rs @@ -1,10 +1,10 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { // An edge in the input data = a pair of `usize` vertex IDs. let (edges_send, edges_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { // inputs: the origin vertex (vertex 0) and stream of input edges origin = source_iter(vec![0]); stream_of_edges = source_stream(edges_recv); diff --git a/hydroflow/examples/example_5_reachability.rs b/hydroflow/examples/example_5_reachability.rs index 116df5ac5ef3..8626e9d0ea10 100644 --- a/hydroflow/examples/example_5_reachability.rs +++ b/hydroflow/examples/example_5_reachability.rs @@ -1,10 +1,10 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { // An edge in the input data = a pair of `usize` vertex IDs. let (edges_send, edges_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { // inputs: the origin vertex (vertex 0) and stream of input edges origin = source_iter(vec![0]); stream_of_edges = source_stream(edges_recv); diff --git a/hydroflow/examples/example_6_unreachability.rs b/hydroflow/examples/example_6_unreachability.rs index 66656acf621c..186b9bb050ea 100644 --- a/hydroflow/examples/example_6_unreachability.rs +++ b/hydroflow/examples/example_6_unreachability.rs @@ -1,10 +1,10 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { // An edge in the input data = a pair of `usize` vertex IDs. let (pairs_send, pairs_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { // inputs: the origin vertex (vertex 0) and stream of input edges origin = source_iter(vec![0]); stream_of_edges = source_stream(pairs_recv) -> tee(); diff --git a/hydroflow/examples/example_naturals.rs b/hydroflow/examples/example_naturals.rs index e9d723709757..b5410e71f1cc 100644 --- a/hydroflow/examples/example_naturals.rs +++ b/hydroflow/examples/example_naturals.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { - let mut _flow = hydroflow_syntax! { + let mut _flow = dfir_syntax! { base = source_iter(vec![1]) -> cycle; cycle = union() -> map(|i| i + 1) diff --git a/hydroflow/examples/example_surface_flows_1_basic.rs b/hydroflow/examples/example_surface_flows_1_basic.rs index af13b5816f2b..e3e486662e72 100644 --- a/hydroflow/examples/example_surface_flows_1_basic.rs +++ b/hydroflow/examples/example_surface_flows_1_basic.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_iter(vec!["Hello", "world"]) -> map(|x| x.to_uppercase()) -> for_each(|x| println!("{}", x)); }; diff --git a/hydroflow/examples/example_surface_flows_2_varname.rs b/hydroflow/examples/example_surface_flows_2_varname.rs index c8871d4e853f..5142e28a2719 100644 --- a/hydroflow/examples/example_surface_flows_2_varname.rs +++ b/hydroflow/examples/example_surface_flows_2_varname.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_iter(vec!["Hello", "world"]) -> upper_print; upper_print = map(|x| x.to_uppercase()) -> for_each(|x| println!("{}", x)); }; diff --git a/hydroflow/examples/example_surface_flows_3_ports.rs b/hydroflow/examples/example_surface_flows_3_ports.rs index 3cdd887a22e2..4a8913c79e34 100644 --- a/hydroflow/examples/example_surface_flows_3_ports.rs +++ b/hydroflow/examples/example_surface_flows_3_ports.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { my_tee = source_iter(vec!["Hello", "world"]) -> tee(); my_tee -> map(|x| x.to_uppercase()) -> [low_road]my_union; my_tee -> map(|x| x.to_lowercase()) -> [high_road]my_union; diff --git a/hydroflow/examples/example_surface_flows_4_context.rs b/hydroflow/examples/example_surface_flows_4_context.rs index 6650a3564d0b..8f1b1ce088e8 100644 --- a/hydroflow/examples/example_surface_flows_4_context.rs +++ b/hydroflow/examples/example_surface_flows_4_context.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_iter([()]) -> for_each(|()| println!("Current tick: {}, stratum: {}", context.current_tick(), context.current_stratum())); }; diff --git a/hydroflow/examples/example_syntax_empty.rs b/hydroflow/examples/example_syntax_empty.rs index 13010ddc39dc..249bbfcd6cdc 100644 --- a/hydroflow/examples/example_syntax_empty.rs +++ b/hydroflow/examples/example_syntax_empty.rs @@ -1,9 +1,9 @@ #![expect(unused_mut, unused_variables, reason = "example code")] -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { // Hydroflow Surface Syntax goes here }; } diff --git a/hydroflow/examples/example_syntax_hello_world.rs b/hydroflow/examples/example_syntax_hello_world.rs index 5c289d79a1a4..a0c580dc045c 100644 --- a/hydroflow/examples/example_syntax_hello_world.rs +++ b/hydroflow/examples/example_syntax_hello_world.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(["Hello", "World"]) -> map(|s| s.to_uppercase()) -> for_each(|s| println!("{}", s)); diff --git a/hydroflow/examples/example_syntax_input.rs b/hydroflow/examples/example_syntax_input.rs index 6c1d0c31e5db..5e654f2f497e 100644 --- a/hydroflow/examples/example_syntax_input.rs +++ b/hydroflow/examples/example_syntax_input.rs @@ -1,8 +1,8 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { let (input_send, input_recv) = hydroflow::util::unbounded_channel::<&str>(); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_stream(input_recv) -> map(|x| x.to_uppercase()) -> for_each(|x| println!("{}", x)); }; diff --git a/hydroflow/examples/example_syntax_output.rs b/hydroflow/examples/example_syntax_output.rs index 29632d20fe58..99e0dd7eccdb 100644 --- a/hydroflow/examples/example_syntax_output.rs +++ b/hydroflow/examples/example_syntax_output.rs @@ -1,8 +1,8 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_iter("Hello World".chars()) -> map(|c| c.to_ascii_uppercase()) -> for_each(|c| output_send.send(c).unwrap()); }; diff --git a/hydroflow/examples/hello_world/main.rs b/hydroflow/examples/hello_world/main.rs index 7b70f9daf2b9..21f033fee0d3 100644 --- a/hydroflow/examples/hello_world/main.rs +++ b/hydroflow/examples/hello_world/main.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; pub fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(["Hello World"]) -> assert_eq(["Hello World"]); }; diff --git a/hydroflow/examples/kvs/client.rs b/hydroflow/examples/kvs/client.rs index c090c753b3df..ce46ddc9b644 100644 --- a/hydroflow/examples/kvs/client.rs +++ b/hydroflow/examples/kvs/client.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::{UdpSink, UdpStream}; use crate::helpers::parse_command; @@ -15,7 +15,7 @@ pub(crate) async fn run_client( ) { println!("Client live!"); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { // set up channels outbound_chan = dest_sink_serde(outbound); inbound_chan = source_stream_serde(inbound) -> map(Result::unwrap); diff --git a/hydroflow/examples/kvs/protocol.rs b/hydroflow/examples/kvs/protocol.rs index eccf2cc84df5..087956b332d2 100644 --- a/hydroflow/examples/kvs/protocol.rs +++ b/hydroflow/examples/kvs/protocol.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use hydroflow_macro::DemuxEnum; +use dfir_macro::DemuxEnum; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Serialize, Deserialize, DemuxEnum)] diff --git a/hydroflow/examples/kvs/server.rs b/hydroflow/examples/kvs/server.rs index 845e85b36265..fec7477c8376 100644 --- a/hydroflow/examples/kvs/server.rs +++ b/hydroflow/examples/kvs/server.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{UdpSink, UdpStream}; @@ -8,7 +8,7 @@ use crate::Opts; pub(crate) async fn run_server(outbound: UdpSink, inbound: UdpStream, opts: Opts) { println!("Server live!"); - let mut hf: Hydroflow = hydroflow_syntax! { + let mut hf: Hydroflow = dfir_syntax! { // Setup network channels. network_send = dest_sink_serde(outbound); network_recv = source_stream_serde(inbound) diff --git a/hydroflow/examples/kvs_bench/server.rs b/hydroflow/examples/kvs_bench/server.rs index 30687f20692c..4646a6957a25 100644 --- a/hydroflow/examples/kvs_bench/server.rs +++ b/hydroflow/examples/kvs_bench/server.rs @@ -7,7 +7,7 @@ use bincode::options; use bytes::{BufMut, Bytes, BytesMut}; use futures::Stream; use hydroflow::compiled::pull::HalfMultisetJoinState; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::ticks::TickInstant; use hydroflow_lang::graph::{WriteConfig, WriteGraphType}; use lattices::map_union::{MapUnionHashMap, MapUnionSingletonMap}; @@ -138,7 +138,7 @@ pub fn run_server( let mut throughput_internal = 0usize; - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { simulated_put_requests = spin() -> flat_map(|_| { let buffer_pool = buffer_pool.clone(); diff --git a/hydroflow/examples/kvs_mut/client.rs b/hydroflow/examples/kvs_mut/client.rs index c090c753b3df..ce46ddc9b644 100644 --- a/hydroflow/examples/kvs_mut/client.rs +++ b/hydroflow/examples/kvs_mut/client.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::{UdpSink, UdpStream}; use crate::helpers::parse_command; @@ -15,7 +15,7 @@ pub(crate) async fn run_client( ) { println!("Client live!"); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { // set up channels outbound_chan = dest_sink_serde(outbound); inbound_chan = source_stream_serde(inbound) -> map(Result::unwrap); diff --git a/hydroflow/examples/kvs_mut/protocol.rs b/hydroflow/examples/kvs_mut/protocol.rs index 3df1a7d5001a..25b57453908f 100644 --- a/hydroflow/examples/kvs_mut/protocol.rs +++ b/hydroflow/examples/kvs_mut/protocol.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use hydroflow_macro::DemuxEnum; +use dfir_macro::DemuxEnum; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Serialize, Deserialize, DemuxEnum)] diff --git a/hydroflow/examples/kvs_mut/server.rs b/hydroflow/examples/kvs_mut/server.rs index 61f0d6e1181d..df1b3a4692d2 100644 --- a/hydroflow/examples/kvs_mut/server.rs +++ b/hydroflow/examples/kvs_mut/server.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{PersistenceKeyed, UdpSink, UdpStream}; @@ -8,7 +8,7 @@ use crate::Opts; pub(crate) async fn run_server(outbound: UdpSink, inbound: UdpStream, opts: Opts) { println!("Server live!"); - let mut hf: Hydroflow = hydroflow_syntax! { + let mut hf: Hydroflow = dfir_syntax! { // Setup network channels. network_send = dest_sink_serde(outbound); network_recv = source_stream_serde(inbound) diff --git a/hydroflow/examples/kvs_replicated/client.rs b/hydroflow/examples/kvs_replicated/client.rs index eb4f2c882d5e..e799a486e98a 100644 --- a/hydroflow/examples/kvs_replicated/client.rs +++ b/hydroflow/examples/kvs_replicated/client.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::{UdpSink, UdpStream}; use crate::helpers::parse_command; @@ -9,7 +9,7 @@ pub(crate) async fn run_client(outbound: UdpSink, inbound: UdpStream, opts: Opts println!("Client live!"); let server_addr = opts.server_addr.unwrap(); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { // set up channels outbound_chan = dest_sink_serde(outbound); inbound_chan = source_stream_serde(inbound) -> map(Result::unwrap); diff --git a/hydroflow/examples/kvs_replicated/protocol.rs b/hydroflow/examples/kvs_replicated/protocol.rs index 93c7a541d6dc..f0f869c699be 100644 --- a/hydroflow/examples/kvs_replicated/protocol.rs +++ b/hydroflow/examples/kvs_replicated/protocol.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use hydroflow_macro::DemuxEnum; +use dfir_macro::DemuxEnum; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Serialize, Deserialize, DemuxEnum)] diff --git a/hydroflow/examples/kvs_replicated/server.rs b/hydroflow/examples/kvs_replicated/server.rs index 82a0d98257dd..75efc44ed9d5 100644 --- a/hydroflow/examples/kvs_replicated/server.rs +++ b/hydroflow/examples/kvs_replicated/server.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{UdpSink, UdpStream}; @@ -10,7 +10,7 @@ pub(crate) async fn run_server(outbound: UdpSink, inbound: UdpStream, opts: Opts let peer_server = opts.server_addr; - let mut hf: Hydroflow = hydroflow_syntax! { + let mut hf: Hydroflow = dfir_syntax! { // Setup network channels. network_send = union() -> dest_sink_serde(outbound); network_recv = source_stream_serde(inbound) diff --git a/hydroflow/examples/lamport_clock/client.rs b/hydroflow/examples/lamport_clock/client.rs index 680ca15b5b12..0747325cea2a 100644 --- a/hydroflow/examples/lamport_clock/client.rs +++ b/hydroflow/examples/lamport_clock/client.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::{Max, Merge}; use hydroflow::util::{UdpSink, UdpStream}; @@ -15,7 +15,7 @@ pub(crate) async fn run_client(outbound: UdpSink, inbound: UdpStream, opts: Opts println!("Client live!"); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { // Define shared inbound and outbound channels inbound_chan = source_stream_serde(inbound) -> map(Result::unwrap) -> tee(); outbound_chan = // union() -> // commented out since we only use this once in the client template diff --git a/hydroflow/examples/lamport_clock/server.rs b/hydroflow/examples/lamport_clock/server.rs index 76ae73dbb572..7cae5b29035d 100644 --- a/hydroflow/examples/lamport_clock/server.rs +++ b/hydroflow/examples/lamport_clock/server.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::{Max, Merge}; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{UdpSink, UdpStream}; @@ -13,7 +13,7 @@ pub(crate) async fn run_server(outbound: UdpSink, inbound: UdpStream, opts: Opts let bot: Max = Max::new(0); println!("Server live!"); - let mut flow: Hydroflow = hydroflow_syntax! { + let mut flow: Hydroflow = dfir_syntax! { // Define a shared inbound channel inbound_chan = source_stream_serde(inbound) -> map(Result::unwrap) -> tee(); diff --git a/hydroflow/examples/python_udf/main.rs b/hydroflow/examples/python_udf/main.rs index fb32af5649af..1dcd4f7c2c30 100644 --- a/hydroflow/examples/python_udf/main.rs +++ b/hydroflow/examples/python_udf/main.rs @@ -1,4 +1,4 @@ -use hydroflow_macro::hydroflow_syntax; +use dfir_macro::dfir_syntax; use pyo3::{Py, PyAny, PyResult, Python}; #[hydroflow::main] @@ -7,7 +7,7 @@ async fn main() { let v = vec![1, 2, 3, 4, 5]; - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(v) -> inspect( |x| println!("input:\t{:?}", x) ) diff --git a/hydroflow/examples/rga/adjacency.rs b/hydroflow/examples/rga/adjacency.rs index 5f8d0e74a4ae..a354b5d6b7b6 100644 --- a/hydroflow/examples/rga/adjacency.rs +++ b/hydroflow/examples/rga/adjacency.rs @@ -1,6 +1,6 @@ use std::collections::VecDeque; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use tokio::sync::mpsc::UnboundedSender; use tokio_stream::wrappers::UnboundedReceiverStream; @@ -12,7 +12,7 @@ pub(crate) fn rga_adjacency( rga_send: UnboundedSender<(Token, Timestamp)>, list_send: UnboundedSender<(Timestamp, Timestamp)>, ) -> Hydroflow<'static> { - hydroflow_syntax! { + dfir_syntax! { insertAfter = source_stream(input_recv) -> tee(); // adjacency(parent:Timestamp, kids:VecDeque, sibs:Vec<(Timestamp,Timestamp>)) tuples diff --git a/hydroflow/examples/rga/datalog.rs b/hydroflow/examples/rga/datalog.rs index 787a6df93f1a..f0a52e3e6b4a 100644 --- a/hydroflow/examples/rga/datalog.rs +++ b/hydroflow/examples/rga/datalog.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use tokio::sync::mpsc::UnboundedSender; use tokio_stream::wrappers::UnboundedReceiverStream; @@ -10,7 +10,7 @@ pub(crate) fn rga_datalog( rga_send: UnboundedSender<(Token, Timestamp)>, list_send: UnboundedSender<(Timestamp, Timestamp)>, ) -> Hydroflow<'static> { - hydroflow_syntax! { + dfir_syntax! { edges = source_stream(input_recv) -> tee(); insertAfter = edges -> map(|(c, p): (Token, Timestamp) | (c.ts, p)) -> tee(); diff --git a/hydroflow/examples/rga/datalog_agg.rs b/hydroflow/examples/rga/datalog_agg.rs index 3455351f7054..a3fcd0b51466 100644 --- a/hydroflow/examples/rga/datalog_agg.rs +++ b/hydroflow/examples/rga/datalog_agg.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use tokio::sync::mpsc::UnboundedSender; use tokio_stream::wrappers::UnboundedReceiverStream; @@ -10,7 +10,7 @@ pub(crate) fn rga_datalog_agg( rga_send: UnboundedSender<(Token, Timestamp)>, list_send: UnboundedSender<(Timestamp, Timestamp)>, ) -> Hydroflow<'static> { - hydroflow_syntax! { + dfir_syntax! { edges = source_stream(input_recv) -> tee(); insertAfter = edges -> map(|(c, p): (Token, Timestamp)| (c.ts, p)) -> tee(); diff --git a/hydroflow/examples/rga/minimal.rs b/hydroflow/examples/rga/minimal.rs index 23b3583fa5c1..5f70c40ea6c0 100644 --- a/hydroflow/examples/rga/minimal.rs +++ b/hydroflow/examples/rga/minimal.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use tokio::sync::mpsc::UnboundedSender; use tokio_stream::wrappers::UnboundedReceiverStream; @@ -10,7 +10,7 @@ pub(crate) fn rga_minimal( rga_send: UnboundedSender<(Token, Timestamp)>, _list_send: UnboundedSender<(Timestamp, Timestamp)>, ) -> Hydroflow<'static> { - hydroflow_syntax! { + dfir_syntax! { insertAfter = source_stream(input_recv); insertAfter -> for_each(|(c, p): (Token, Timestamp)| rga_send.send((c, p)).unwrap()); diff --git a/hydroflow/examples/shopping/flows/bp_flow.rs b/hydroflow/examples/shopping/flows/bp_flow.rs index 960dfffca803..0506e39bebcd 100644 --- a/hydroflow/examples/shopping/flows/bp_flow.rs +++ b/hydroflow/examples/shopping/flows/bp_flow.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use bytes::Bytes; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::Merge; use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; @@ -27,7 +27,7 @@ pub(crate) async fn bp_flow( // For each Request in "shopping_bp" we look up its "client_class" (basic or prime) // via a join operator, then we group by (client, class), and for each such pair // we grow a BP lattice. - hydroflow_syntax! { + dfir_syntax! { // BP, two customer classes source_iter(shopping_bp) -> [0]lookup_class; source_iter(client_class) -> [1]lookup_class; diff --git a/hydroflow/examples/shopping/flows/client_state_flow.rs b/hydroflow/examples/shopping/flows/client_state_flow.rs index 8d4cdb511b91..59f4fbde1fdc 100644 --- a/hydroflow/examples/shopping/flows/client_state_flow.rs +++ b/hydroflow/examples/shopping/flows/client_state_flow.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use bytes::Bytes; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::Merge; use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; @@ -32,7 +32,7 @@ pub(crate) async fn client_state_flow( // This is like server_state_flow, but we split it into two transducers at a different spot. // Here, the first transducer takes in shopping_ssiv requests and runs a stateful fold_keyed, persisting all the shopping requests in ssiv's. // The second transducer listens on reqs_in and runs the lookup join. - hydroflow_syntax! { + dfir_syntax! { source_iter(shopping_ssiv) -> fold_keyed::<'static>(SSIV_BOT, ssiv_merge) -> map(|pair| (pair, remote_addr)) -> dest_sink_serde(carts_out); diff --git a/hydroflow/examples/shopping/flows/listener_flow.rs b/hydroflow/examples/shopping/flows/listener_flow.rs index 0ab38af0b8cc..6b79e7cae7ed 100644 --- a/hydroflow/examples/shopping/flows/listener_flow.rs +++ b/hydroflow/examples/shopping/flows/listener_flow.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::UdpStream; @@ -13,7 +13,7 @@ pub(crate) async fn listener_flow( ssiv_input: UdpStream, ) -> Hydroflow<'static> { // Simply print what we receive. - hydroflow_syntax! { + dfir_syntax! { source_stream_serde(tuple_input) -> map(Result::unwrap) -> for_each(|(cart, _): (((usize, ClientClass), Vec), SocketAddr)| println!("{:?}", cart)); diff --git a/hydroflow/examples/shopping/flows/orig_flow.rs b/hydroflow/examples/shopping/flows/orig_flow.rs index c92f080c8138..a1c3be04c701 100644 --- a/hydroflow/examples/shopping/flows/orig_flow.rs +++ b/hydroflow/examples/shopping/flows/orig_flow.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use bytes::Bytes; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; use tokio_util::udp::UdpFramed; @@ -21,7 +21,7 @@ pub(crate) async fn orig_flow( // For each Request in "shopping" we look up its "client_class" (basic or prime) // via a join operator, then we group by (client, class), and for each such pair // we grow a separate vector of ClLineItems. No seal is needed in the sequential case. - hydroflow_syntax! { + dfir_syntax! { // the original flow source_iter(shopping) -> [0]lookup_class; source_iter(client_class) -> [1]lookup_class; diff --git a/hydroflow/examples/shopping/flows/push_group_flow.rs b/hydroflow/examples/shopping/flows/push_group_flow.rs index 210f567a8ddc..7e9b3bb09ce7 100644 --- a/hydroflow/examples/shopping/flows/push_group_flow.rs +++ b/hydroflow/examples/shopping/flows/push_group_flow.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use bytes::Bytes; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::Merge; use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; @@ -29,7 +29,7 @@ pub(crate) async fn push_group_flow( // For each Request in "shopping_ssiv" we group by client, and for each client // we grow a SSIV lattice. Then for each SSIV lattice we look up its client_class // (basic or prime) via a join operator, and generate the output. - hydroflow_syntax! { + dfir_syntax! { // push fold_keyed through join source_iter(shopping_ssiv) -> fold_keyed::<'static>(SSIV_BOT, ssiv_merge) -> [0]lookup_class; source_iter(client_class) -> [1]lookup_class; diff --git a/hydroflow/examples/shopping/flows/rep_server_flow.rs b/hydroflow/examples/shopping/flows/rep_server_flow.rs index 8b62825b7a6b..9291e699c819 100644 --- a/hydroflow/examples/shopping/flows/rep_server_flow.rs +++ b/hydroflow/examples/shopping/flows/rep_server_flow.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use bytes::Bytes; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::Merge; use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; @@ -31,7 +31,7 @@ pub(crate) async fn rep_server_flow( // Set up the Udp socket for proxy-server communication let (reqs_out, reqs_in, _) = hydroflow::util::bind_udp_bytes(local_addr).await; - hydroflow_syntax! { + dfir_syntax! { // Client Proxy source_iter(shopping_ssiv) -> map(|pair| (pair, remote_addr)) -> dest_sink_serde(reqs_out); diff --git a/hydroflow/examples/shopping/flows/server_state_flow.rs b/hydroflow/examples/shopping/flows/server_state_flow.rs index 9b1bcde86405..aef557af4b9c 100644 --- a/hydroflow/examples/shopping/flows/server_state_flow.rs +++ b/hydroflow/examples/shopping/flows/server_state_flow.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use bytes::Bytes; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::Merge; use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; @@ -32,7 +32,7 @@ pub(crate) async fn server_state_flow( // This is like push_group_flow, but we split it into two transducers that communicate via reqs_out and reqs_in. // The first transducer takes in shopping_ssiv requests, and forwards them via reqs_out to the second transducer. // The second transducer listens on reqs_in and runs the stateful logic of fold_keyed and join. - hydroflow_syntax! { + dfir_syntax! { // Networked: Server-Side State source_iter(shopping_ssiv) -> map(|pair| (pair, remote_addr)) -> dest_sink_serde(reqs_out); diff --git a/hydroflow/examples/shopping/flows/ssiv_flow.rs b/hydroflow/examples/shopping/flows/ssiv_flow.rs index 34ddfefc5163..c8f5ced5ce9c 100644 --- a/hydroflow/examples/shopping/flows/ssiv_flow.rs +++ b/hydroflow/examples/shopping/flows/ssiv_flow.rs @@ -2,7 +2,7 @@ use std::net::SocketAddr; use bytes::Bytes; use futures::stream::SplitSink; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::Merge; use hydroflow::scheduled::graph::Hydroflow; use tokio_util::codec::LengthDelimitedCodec; @@ -28,7 +28,7 @@ pub(crate) async fn ssiv_flow( // For each Request in "shopping_ssiv" we look up its "client_class" (basic or prime) // via a join operator, then we group by (client, class), and for each such pair // we grow a SSIV lattice. - hydroflow_syntax! { + dfir_syntax! { source_iter(shopping_ssiv) -> [0]lookup_class; source_iter(client_class) -> [1]lookup_class; lookup_class = join::<'static>() diff --git a/hydroflow/examples/three_clique/main.rs b/hydroflow/examples/three_clique/main.rs index deacc379d19a..b52f872439a5 100644 --- a/hydroflow/examples/three_clique/main.rs +++ b/hydroflow/examples/three_clique/main.rs @@ -1,5 +1,5 @@ use clap::Parser; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow_lang::graph::{WriteConfig, WriteGraphType}; // This example detects size three cliques in a graph. Size three cliques are also known as triangles. @@ -19,7 +19,7 @@ pub fn main() { let (edges_send, edges_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); #[expect(clippy::map_identity, reason = "code symmetry")] - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { edges = source_stream(edges_recv) -> tee(); // set up the two joins diff --git a/hydroflow/examples/two_pc_hf/coordinator.rs b/hydroflow/examples/two_pc_hf/coordinator.rs index c71b68d0f516..203a8638ca13 100644 --- a/hydroflow/examples/two_pc_hf/coordinator.rs +++ b/hydroflow/examples/two_pc_hf/coordinator.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{UdpSink, UdpStream}; @@ -12,7 +12,7 @@ pub(crate) async fn run_coordinator(outbound: UdpSink, inbound: UdpStream, opts: println!("Coordinator live!"); let path = opts.path(); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { // fetch subordinates from file, convert ip:port to a SocketAddr, and tee subords = source_json(path) -> flat_map(|json: Addresses| json.subordinates) diff --git a/hydroflow/examples/two_pc_hf/subordinate.rs b/hydroflow/examples/two_pc_hf/subordinate.rs index 52a1e703fa1b..ecc69a22b47d 100644 --- a/hydroflow/examples/two_pc_hf/subordinate.rs +++ b/hydroflow/examples/two_pc_hf/subordinate.rs @@ -1,6 +1,6 @@ use std::net::SocketAddr; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{UdpSink, UdpStream}; @@ -12,7 +12,7 @@ pub(crate) async fn run_subordinate(outbound: UdpSink, inbound: UdpStream, opts: println!("Subordinate live!"); let path = opts.path(); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { // Outbound address server_addr = source_json(path) -> map(|json: Addresses| json.coordinator) diff --git a/hydroflow/examples/vector_clock/client.rs b/hydroflow/examples/vector_clock/client.rs index 7a172a870a74..2d32204f5f83 100644 --- a/hydroflow/examples/vector_clock/client.rs +++ b/hydroflow/examples/vector_clock/client.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::{UdpSink, UdpStream}; use lattices::map_union::MapUnionSingletonMap; use lattices::{Max, Merge}; @@ -20,7 +20,7 @@ pub(crate) async fn run_client( println!("Client live!"); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { // Define shared inbound and outbound channels inbound_chan = source_stream_serde(inbound) -> map(Result::unwrap) -> tee(); outbound_chan = // union() -> // commented out since we only use this once in the client template diff --git a/hydroflow/examples/vector_clock/server.rs b/hydroflow/examples/vector_clock/server.rs index 6b97600f8043..f29bf7f08b2a 100644 --- a/hydroflow/examples/vector_clock/server.rs +++ b/hydroflow/examples/vector_clock/server.rs @@ -1,7 +1,7 @@ use std::net::SocketAddr; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{UdpSink, UdpStream}; use lattices::map_union::MapUnionSingletonMap; @@ -12,7 +12,7 @@ use crate::protocol::{EchoMsg, VecClock}; pub(crate) async fn run_server(outbound: UdpSink, inbound: UdpStream, opts: crate::Opts) { println!("Server live!"); - let mut flow: Hydroflow = hydroflow_syntax! { + let mut flow: Hydroflow = dfir_syntax! { // Define a shared inbound channel inbound_chan = source_stream_serde(inbound) -> map(Result::unwrap) -> tee(); diff --git a/hydroflow/src/declarative_macro.rs b/hydroflow/src/declarative_macro.rs index 12f8d3ece978..07f169873658 100644 --- a/hydroflow/src/declarative_macro.rs +++ b/hydroflow/src/declarative_macro.rs @@ -65,7 +65,7 @@ macro_rules! hydroflow_expect_warnings { let __file = ::std::file!(); let __line = ::std::line!() as usize; - let __hf = $crate::hydroflow_syntax_noemit! $hf; + let __hf = $crate::dfir_syntax_noemit! $hf; let actuals = __hf.diagnostics().expect("Expected `diagnostics()` to be set."); let actuals_len = actuals.len(); diff --git a/hydroflow/src/lib.rs b/hydroflow/src/lib.rs index 63c6c2f48360..0f403208e6a7 100644 --- a/hydroflow/src/lib.rs +++ b/hydroflow/src/lib.rs @@ -4,11 +4,11 @@ //! //! The primary item in this crate is the [`Hydroflow`](crate::scheduled::graph::Hydroflow) struct, //! representing a Hydroflow dataflow graph. Although this graph can be manually constructed, the -//! easiest way to instantiate a `Hydroflow` instance is with the [`hydroflow_syntax!`] macro using +//! easiest way to instantiate a `Hydroflow` instance is with the [`dfir_syntax!`] macro using //! Hydroflow's custom "surface syntax." //! //! ```rust -//! let mut hf = hydroflow::hydroflow_syntax! { +//! let mut hf = hydroflow::dfir_syntax! { //! source_iter(["hello", "world"]) -> for_each(|s| println!("{}", s)); //! }; //! hf.run_available(); @@ -32,13 +32,13 @@ pub use { /// `#[macro_use]` automagically brings the declarative macro export to the crate-level. mod declarative_macro; +#[cfg(feature = "dfir_macro")] +pub use dfir_macro::{ + dfir_main as main, dfir_parser, dfir_syntax, dfir_syntax_noemit, dfir_test as test, + monotonic_fn, morphism, DemuxEnum, +}; #[cfg(feature = "hydroflow_datalog")] pub use hydroflow_datalog::*; -#[cfg(feature = "hydroflow_macro")] -pub use hydroflow_macro::{ - hydroflow_main as main, hydroflow_parser, hydroflow_syntax, hydroflow_syntax_noemit, - hydroflow_test as test, monotonic_fn, morphism, DemuxEnum, -}; // TODO(mingwei): Use the [nightly "never" type `!`](https://doc.rust-lang.org/std/primitive.never.html) /// Stand-in for the [nightly "never" type `!`](https://doc.rust-lang.org/std/primitive.never.html) @@ -47,6 +47,6 @@ pub type Never = std::convert::Infallible; #[cfg(doctest)] mod booktest { mod surface_ops { - hydroflow_macro::surface_booktest_operators!(); + dfir_macro::surface_booktest_operators!(); } } diff --git a/hydroflow/src/util/demux_enum.rs b/hydroflow/src/util/demux_enum.rs index d9ef820dcd63..4cce125b304d 100644 --- a/hydroflow/src/util/demux_enum.rs +++ b/hydroflow/src/util/demux_enum.rs @@ -1,6 +1,6 @@ //! Trait for the `demux_enum` derive and operator. -pub use hydroflow_macro::DemuxEnum; +pub use dfir_macro::DemuxEnum; /// Trait for use with the `demux_enum` operator. /// diff --git a/hydroflow/src/util/mod.rs b/hydroflow/src/util/mod.rs index 4dd2332d4f36..831be8bab9ee 100644 --- a/hydroflow/src/util/mod.rs +++ b/hydroflow/src/util/mod.rs @@ -2,7 +2,7 @@ //! Helper utilities for the Hydroflow surface syntax. pub mod clear; -#[cfg(feature = "hydroflow_macro")] +#[cfg(feature = "dfir_macro")] pub mod demux_enum; pub mod monotonic_map; pub mod multiset; diff --git a/hydroflow/src/util/simulation.rs b/hydroflow/src/util/simulation.rs index 86b2bc785644..989aee1b1a37 100644 --- a/hydroflow/src/util/simulation.rs +++ b/hydroflow/src/util/simulation.rs @@ -370,15 +370,15 @@ impl Default for Fleet { #[cfg(test)] mod tests { + use dfir_macro::{dfir_syntax, dfir_test}; use futures::StreamExt; - use hydroflow_macro::{hydroflow_syntax, hydroflow_test}; use crate::util::simulation::{Address, Fleet, Hostname}; use crate::util::unbounded_channel; /// A simple test to demonstrate use of the simulation framework. Implements an echo server /// and client. - #[hydroflow_test] + #[dfir_test] async fn test_echo() { let mut fleet = Fleet::new(); @@ -395,7 +395,7 @@ mod tests { fleet.add_host(server.clone(), |ctx| { let network_input = ctx.new_inbox::(interface.clone()); let network_output = ctx.new_outbox::(interface.clone()); - hydroflow_syntax! { + dfir_syntax! { out = dest_sink(network_output); source_stream(network_input) @@ -413,7 +413,7 @@ mod tests { let network_out = ctx.new_outbox::(interface.clone()); let network_in = ctx.new_inbox::(interface.clone()); - hydroflow_syntax! { + dfir_syntax! { out = dest_sink(network_out); source_stream(client_trigger_rx) diff --git a/hydroflow/tests/compile-fail/surface_anti_join_badtypes.rs b/hydroflow/tests/compile-fail/surface_anti_join_badtypes.rs index 344dca0a8859..fbe83c139bd9 100644 --- a/hydroflow/tests/compile-fail/surface_anti_join_badtypes.rs +++ b/hydroflow/tests/compile-fail/surface_anti_join_badtypes.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { j = anti_join() -> for_each(std::mem::drop); source_iter(0..10) -> map(|x| (x, x)) -> [pos]j; source_iter(0..10) -> map(|_| "string") -> [neg]j; diff --git a/hydroflow/tests/compile-fail/surface_badgeneric_both.rs b/hydroflow/tests/compile-fail/surface_badgeneric_both.rs index 47073c41bce6..e1aae34a4e88 100644 --- a/hydroflow/tests/compile-fail/surface_badgeneric_both.rs +++ b/hydroflow/tests/compile-fail/surface_badgeneric_both.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> identity::<'static, usize>() -> for_each(std::mem::drop); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_badgeneric_extra.rs b/hydroflow/tests/compile-fail/surface_badgeneric_extra.rs index 5e8e7a209d27..39873842da04 100644 --- a/hydroflow/tests/compile-fail/surface_badgeneric_extra.rs +++ b/hydroflow/tests/compile-fail/surface_badgeneric_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { // Due to the TODO the `usize` is not caught, but that is ok. source_iter(0..10) -> identity::<'a, usize>() -> for_each(std::mem::drop); }; diff --git a/hydroflow/tests/compile-fail/surface_badgeneric_lifetime.rs b/hydroflow/tests/compile-fail/surface_badgeneric_lifetime.rs index ec7bc9bc41cc..67a13b2b2754 100644 --- a/hydroflow/tests/compile-fail/surface_badgeneric_lifetime.rs +++ b/hydroflow/tests/compile-fail/surface_badgeneric_lifetime.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> identity::<'static>() -> for_each(std::mem::drop); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_badgeneric_nocolon.rs b/hydroflow/tests/compile-fail/surface_badgeneric_nocolon.rs index 89641b7935a1..204f4761f904 100644 --- a/hydroflow/tests/compile-fail/surface_badgeneric_nocolon.rs +++ b/hydroflow/tests/compile-fail/surface_badgeneric_nocolon.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> identity() -> for_each(std::mem::drop); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_badgeneric_type.rs b/hydroflow/tests/compile-fail/surface_badgeneric_type.rs index ef2c290c63bc..9627ef1eaab9 100644 --- a/hydroflow/tests/compile-fail/surface_badgeneric_type.rs +++ b/hydroflow/tests/compile-fail/surface_badgeneric_type.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { // no generic arguments for `inspect`. source_iter(0..10) -> inspect::(std::mem::drop) -> for_each(std::mem::drop); }; diff --git a/hydroflow/tests/compile-fail/surface_conflicting_name.rs b/hydroflow/tests/compile-fail/surface_conflicting_name.rs index 7cf398e6d1fa..8135fb2b0e02 100644 --- a/hydroflow/tests/compile-fail/surface_conflicting_name.rs +++ b/hydroflow/tests/compile-fail/surface_conflicting_name.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { a = null() -> null(); a = null() -> null(); }; diff --git a/hydroflow/tests/compile-fail/surface_degenerate_merge.rs b/hydroflow/tests/compile-fail/surface_degenerate_merge.rs index c7f27c2eda13..e9ae5ace4b8c 100644 --- a/hydroflow/tests/compile-fail/surface_degenerate_merge.rs +++ b/hydroflow/tests/compile-fail/surface_degenerate_merge.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { union(); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_degenerate_null.rs b/hydroflow/tests/compile-fail/surface_degenerate_null.rs index 9d88f37211b5..a02a97c516bb 100644 --- a/hydroflow/tests/compile-fail/surface_degenerate_null.rs +++ b/hydroflow/tests/compile-fail/surface_degenerate_null.rs @@ -1,8 +1,8 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; /// Technically this should/could compile, but it is a completely useless edge case. fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { null(); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_degenerate_tee.rs b/hydroflow/tests/compile-fail/surface_degenerate_tee.rs index 5b7f4ee067b6..428d5dad5c98 100644 --- a/hydroflow/tests/compile-fail/surface_degenerate_tee.rs +++ b/hydroflow/tests/compile-fail/surface_degenerate_tee.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { tee(); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_demux_badarg.rs b/hydroflow/tests/compile-fail/surface_demux_badarg.rs index 1d4e5444aed6..66855090bc1b 100644 --- a/hydroflow/tests/compile-fail/surface_demux_badarg.rs +++ b/hydroflow/tests/compile-fail/surface_demux_badarg.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter(0..10) -> demux(std::mem::drop); my_demux[a] -> for_each(std::mem::drop); my_demux[b] -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_demux_badclosure.rs b/hydroflow/tests/compile-fail/surface_demux_badclosure.rs index b9ddcd990d4d..53cc194b32a8 100644 --- a/hydroflow/tests/compile-fail/surface_demux_badclosure.rs +++ b/hydroflow/tests/compile-fail/surface_demux_badclosure.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use hydroflow::{dfir_syntax, var_args}; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter(0..10) -> demux(|var_args!(a, b, c)| { match item % 3 { 0 => a.give(item), diff --git a/hydroflow/tests/compile-fail/surface_demux_badclosure.stderr b/hydroflow/tests/compile-fail/surface_demux_badclosure.stderr index 0384823a88bb..ca97d8828426 100644 --- a/hydroflow/tests/compile-fail/surface_demux_badclosure.stderr +++ b/hydroflow/tests/compile-fail/surface_demux_badclosure.stderr @@ -5,9 +5,9 @@ error: Closure provided to `demux(..)` must have two arguments: the first argume | ^^^^^^^^^^^^^^^^^^ warning: unused import: `var_args` - --> tests/compile-fail/surface_demux_badclosure.rs:1:35 + --> tests/compile-fail/surface_demux_badclosure.rs:1:30 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use hydroflow::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demux_port_duplicate.rs b/hydroflow/tests/compile-fail/surface_demux_port_duplicate.rs index 9a357ed2c54b..5711f4e861e5 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_duplicate.rs +++ b/hydroflow/tests/compile-fail/surface_demux_port_duplicate.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use hydroflow::{dfir_syntax, var_args}; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter(0..10) -> demux(|item, var_args!(a, b, c)| { match item % 3 { 0 => a.give(item), diff --git a/hydroflow/tests/compile-fail/surface_demux_port_duplicate.stderr b/hydroflow/tests/compile-fail/surface_demux_port_duplicate.stderr index c787b85cd55c..e714f2d10425 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_duplicate.stderr +++ b/hydroflow/tests/compile-fail/surface_demux_port_duplicate.stderr @@ -11,9 +11,9 @@ error: Output connection conflicts with above ($DIR/tests/compile-fail/surface_d | ^ warning: unused import: `var_args` - --> tests/compile-fail/surface_demux_port_duplicate.rs:1:35 + --> tests/compile-fail/surface_demux_port_duplicate.rs:1:30 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use hydroflow::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demux_port_elided.rs b/hydroflow/tests/compile-fail/surface_demux_port_elided.rs index f5d9954a4ff3..8dad86fae063 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_elided.rs +++ b/hydroflow/tests/compile-fail/surface_demux_port_elided.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use hydroflow::{dfir_syntax, var_args}; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter(0..10) -> demux(|item, var_args!(evens, odds)| { if 0 == item % 2 { evens.give(item); diff --git a/hydroflow/tests/compile-fail/surface_demux_port_elided.stderr b/hydroflow/tests/compile-fail/surface_demux_port_elided.stderr index 5d7dce2d2bf4..456d66c9812d 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_elided.stderr +++ b/hydroflow/tests/compile-fail/surface_demux_port_elided.stderr @@ -11,9 +11,9 @@ error: `demux(..)` closure argument `odds` missing corresponding output port. | ^^^^ warning: unused import: `var_args` - --> tests/compile-fail/surface_demux_port_elided.rs:1:35 + --> tests/compile-fail/surface_demux_port_elided.rs:1:30 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use hydroflow::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demux_port_extra.rs b/hydroflow/tests/compile-fail/surface_demux_port_extra.rs index c7fc9ef68061..ebfd9ac5cb85 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_extra.rs +++ b/hydroflow/tests/compile-fail/surface_demux_port_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use hydroflow::{dfir_syntax, var_args}; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter(0..10) -> demux(|item, var_args!(a, b, c)| { match item % 3 { 0 => a.give(item), diff --git a/hydroflow/tests/compile-fail/surface_demux_port_extra.stderr b/hydroflow/tests/compile-fail/surface_demux_port_extra.stderr index 5cfefddc5d50..02569577b99a 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_extra.stderr +++ b/hydroflow/tests/compile-fail/surface_demux_port_extra.stderr @@ -11,9 +11,9 @@ error: Port `d` not found in the arguments specified in `demux(..)`'s closure: ( | ^ warning: unused import: `var_args` - --> tests/compile-fail/surface_demux_port_extra.rs:1:35 + --> tests/compile-fail/surface_demux_port_extra.rs:1:30 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use hydroflow::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demux_port_extramissing.rs b/hydroflow/tests/compile-fail/surface_demux_port_extramissing.rs index 6631fc868ccb..f97cd81363aa 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_extramissing.rs +++ b/hydroflow/tests/compile-fail/surface_demux_port_extramissing.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use hydroflow::{dfir_syntax, var_args}; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter(0..10) -> demux(|item, var_args!(a, b, c)| { match item % 3 { 0 => a.give(item), diff --git a/hydroflow/tests/compile-fail/surface_demux_port_extramissing.stderr b/hydroflow/tests/compile-fail/surface_demux_port_extramissing.stderr index cf52067779c7..8d576f4b7c74 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_extramissing.stderr +++ b/hydroflow/tests/compile-fail/surface_demux_port_extramissing.stderr @@ -17,9 +17,9 @@ error: `demux(..)` closure argument `a` missing corresponding output port. | ^ warning: unused import: `var_args` - --> tests/compile-fail/surface_demux_port_extramissing.rs:1:35 + --> tests/compile-fail/surface_demux_port_extramissing.rs:1:30 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use hydroflow::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demux_port_missing.rs b/hydroflow/tests/compile-fail/surface_demux_port_missing.rs index 185de09847f9..0eeef03a51b7 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_missing.rs +++ b/hydroflow/tests/compile-fail/surface_demux_port_missing.rs @@ -1,7 +1,7 @@ -use hydroflow::{hydroflow_syntax, var_args}; +use hydroflow::{dfir_syntax, var_args}; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter(0..10) -> demux(|item, var_args!(a, b, c)| { match item % 3 { 0 => a.give(item), diff --git a/hydroflow/tests/compile-fail/surface_demux_port_missing.stderr b/hydroflow/tests/compile-fail/surface_demux_port_missing.stderr index 7f7be970d102..cbc7021f6eef 100644 --- a/hydroflow/tests/compile-fail/surface_demux_port_missing.stderr +++ b/hydroflow/tests/compile-fail/surface_demux_port_missing.stderr @@ -5,9 +5,9 @@ error: `demux(..)` closure argument `c` missing corresponding output port. | ^ warning: unused import: `var_args` - --> tests/compile-fail/surface_demux_port_missing.rs:1:35 + --> tests/compile-fail/surface_demux_port_missing.rs:1:30 | -1 | use hydroflow::{hydroflow_syntax, var_args}; - | ^^^^^^^^ +1 | use hydroflow::{dfir_syntax, var_args}; + | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_missingtypeparam.rs b/hydroflow/tests/compile-fail/surface_demuxenum_missingtypeparam.rs index a8540f94d3ba..9632cae3f340 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_missingtypeparam.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_missingtypeparam.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -9,7 +9,7 @@ fn main() { Circle { r: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Rectangle { w: 10.0, h: 8.0 }, Shape::Square(9.0), diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_notenum.rs b/hydroflow/tests/compile-fail/surface_demuxenum_notenum.rs index d000a03dad16..dd0e2cd7943a 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_notenum.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_notenum.rs @@ -1,11 +1,11 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { struct Shape { area: f64, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape { area: 10.0 }, Shape { area: 9.0 }, diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate.rs b/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate.rs index 28d9d7b3bdcd..19321d419ad8 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -9,7 +9,7 @@ fn main() { Circle { r: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Rectangle { w: 10.0, h: 8.0 }, Shape::Square(9.0), diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs b/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs index 0b193eaba6e8..93c40fd491af 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_port_duplicate_one.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::demux_enum::DemuxEnum; fn main() { @@ -7,7 +7,7 @@ fn main() { Square(f64), } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Square(9.0), ]) -> demux_enum::(); diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_elided.rs b/hydroflow/tests/compile-fail/surface_demuxenum_port_elided.rs index 6f6ed8c0718b..6905a8eebc62 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_elided.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_port_elided.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -10,7 +10,7 @@ fn main() { } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Rectangle { w: 10.0, h: 8.0 }, Shape::Square(9.0), diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_extra.rs b/hydroflow/tests/compile-fail/surface_demuxenum_port_extra.rs index 1d25a92b58b3..0dc82ade7f81 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_extra.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_port_extra.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -9,7 +9,7 @@ fn main() { Circle { r: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Rectangle { w: 10.0, h: 8.0 }, Shape::Square(9.0), diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_extra_zero.rs b/hydroflow/tests/compile-fail/surface_demuxenum_port_extra_zero.rs index 8317420f9cb1..b6b06c2de48d 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_extra_zero.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_port_extra_zero.rs @@ -1,12 +1,12 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] enum Shape { } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([]) -> demux_enum::(); my_demux[Square] -> for_each(std::mem::drop); }; diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_extramissing.rs b/hydroflow/tests/compile-fail/surface_demuxenum_port_extramissing.rs index fcde4a73a020..9842b2a863a1 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_extramissing.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_port_extramissing.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -9,7 +9,7 @@ fn main() { Circle { r: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Rectangle { w: 10.0, h: 8.0 }, Shape::Square(9.0), diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_missing.rs b/hydroflow/tests/compile-fail/surface_demuxenum_port_missing.rs index 84856d1df77d..e6679a604766 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_missing.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_port_missing.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -9,7 +9,7 @@ fn main() { Circle { r: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Rectangle { w: 10.0, h: 8.0 }, Shape::Square(9.0), diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_missing_one.rs b/hydroflow/tests/compile-fail/surface_demuxenum_port_missing_one.rs index 7cf98339ada3..f4e3e1b015fc 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_missing_one.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_port_missing_one.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -8,7 +8,7 @@ fn main() { Rectangle { w: f64, h: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Rectangle { w: 10.0, h: 8.0 }, Shape::Square(9.0), diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_port_wrong_one.rs b/hydroflow/tests/compile-fail/surface_demuxenum_port_wrong_one.rs index 293a4b66a748..0947e8ed5161 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_port_wrong_one.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_port_wrong_one.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -7,7 +7,7 @@ fn main() { Square(f64), } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Square(9.0), ]) -> demux_enum::(); diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_wrongenum.rs b/hydroflow/tests/compile-fail/surface_demuxenum_wrongenum.rs index 71ef0b72edc5..864b820d6e85 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_wrongenum.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_wrongenum.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -9,7 +9,7 @@ fn main() { Circle { r: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Rectangle { w: 10.0, h: 8.0 }, Shape::Square(9.0), diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_1.rs b/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_1.rs index 7f0025f42ef6..6a673418dacd 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_1.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_1.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -9,7 +9,7 @@ fn main() { Circle { r: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Rectangle { w: 10.0, h: 8.0 }, Shape::Square(9.0), diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_2.rs b/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_2.rs index f350c4bf8a07..e2428cff96b6 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_2.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_wrongfields_2.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -9,7 +9,7 @@ fn main() { Circle { r: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Rectangle { w: 10.0, h: 8.0 }, Shape::Square(9.0), diff --git a/hydroflow/tests/compile-fail/surface_demuxenum_wrongtype.rs b/hydroflow/tests/compile-fail/surface_demuxenum_wrongtype.rs index 12431cf527dc..58b06d8f3272 100644 --- a/hydroflow/tests/compile-fail/surface_demuxenum_wrongtype.rs +++ b/hydroflow/tests/compile-fail/surface_demuxenum_wrongtype.rs @@ -1,5 +1,5 @@ use hydroflow::util::demux_enum::DemuxEnum; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { #[derive(DemuxEnum)] @@ -9,7 +9,7 @@ fn main() { Circle { r: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter(0..5) -> demux_enum::(); my_demux[Rectangle] -> for_each(std::mem::drop); my_demux[Circle] -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_dest_sink_baditem.rs.ignore b/hydroflow/tests/compile-fail/surface_dest_sink_baditem.rs.ignore index b7246f469194..42aa586b9f3d 100644 --- a/hydroflow/tests/compile-fail/surface_dest_sink_baditem.rs.ignore +++ b/hydroflow/tests/compile-fail/surface_dest_sink_baditem.rs.ignore @@ -1,6 +1,6 @@ use std::net::{Ipv4Addr, SocketAddr}; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::bind_udp_bytes; #[hydroflow::main] @@ -8,7 +8,7 @@ async fn main() { let socket_addr: SocketAddr = (Ipv4Addr::LOCALHOST, 0).into(); let (outbound, _inbound, _) = bind_udp_bytes(socket_addr).await; - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> map(|i| bytes::Bytes::from_static(&b"hello world!"[i..(i + 2)])) -> dest_sink(outbound); diff --git a/hydroflow/tests/compile-fail/surface_dest_sink_badsink.rs.ignore b/hydroflow/tests/compile-fail/surface_dest_sink_badsink.rs.ignore index 08cea0ef0c70..fe96cdba060d 100644 --- a/hydroflow/tests/compile-fail/surface_dest_sink_badsink.rs.ignore +++ b/hydroflow/tests/compile-fail/surface_dest_sink_badsink.rs.ignore @@ -1,8 +1,8 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { let sink = "not a sink"; - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> dest_sink(sink); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_dest_sink_badsink.stderr b/hydroflow/tests/compile-fail/surface_dest_sink_badsink.stderr index 025ef369bcdb..28f1c8183594 100644 --- a/hydroflow/tests/compile-fail/surface_dest_sink_badsink.stderr +++ b/hydroflow/tests/compile-fail/surface_dest_sink_badsink.stderr @@ -20,9 +20,9 @@ error[E0277]: the trait bound `&str: hydroflow::futures::Sink<_>` is not satisfi note: required by a bound in `sink_feed_flush` --> tests/compile-fail/surface_dest_sink_badsink.rs:5:18 | -5 | let mut df = hydroflow_syntax! { +5 | let mut df = dfir_syntax! { | __________________^ 6 | | source_iter(0..10) -> dest_sink(sink); 7 | | }; | |_____^ required by this bound in `sink_feed_flush` - = note: this error originates in the macro `hydroflow_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `dfir_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_int.rs b/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_int.rs index 7329d81414d5..b8f19068e7ba 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_int.rs +++ b/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_int.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_iter(0..1) -> reduce_keyed(|old: &mut u32, val: u32| { *old += val; }) -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_option.rs b/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_option.rs index ad83a995ee12..854ec73a3f08 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_option.rs +++ b/hydroflow/tests/compile-fail/surface_fold_keyed_badtype_option.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_iter([ Some(5), None, Some(12) ]) -> reduce_keyed(|old: &mut u32, val: u32| { *old += val; }) -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr b/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr index 155c756cf094..8ed7f2cfa054 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr +++ b/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.ci.stderr @@ -1,7 +1,7 @@ -warning: unused import: `hydroflow::hydroflow_syntax` +warning: unused import: `hydroflow::dfir_syntax` --> tests/compile-fail/surface_fold_keyed_generics_bad.rs:1:5 | -1 | use hydroflow::hydroflow_syntax; +1 |use hydroflow::dfir_syntax; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore b/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore index 1061491f6393..63913ef21d9e 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore +++ b/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.rs.ignore @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_iter(["hello", "world"]) -> fold_keyed::<'tick, &str, usize>(String::new, |old: &mut _, val| { *old += val; diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.stderr b/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.stderr index ba06dbb33eb1..f1e085ac4c70 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.stderr +++ b/hydroflow/tests/compile-fail/surface_fold_keyed_generics_bad.stderr @@ -1,7 +1,7 @@ -warning: unused import: `hydroflow::hydroflow_syntax` +warning: unused import: `hydroflow::dfir_syntax` --> tests/compile-fail/surface_fold_keyed_generics_bad.rs:1:5 | -1 | use hydroflow::hydroflow_syntax; +1 |use hydroflow::dfir_syntax; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.rs b/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.rs index 0154d1f7ec41..09893be7694c 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.rs +++ b/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_iter(["hello", "world"]) -> fold_keyed::<'tick, &str, String, ()>(String::new, |old: &mut _, val| { *old += val; diff --git a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.stderr b/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.stderr index c4d2d3011c46..8e663f8f32f9 100644 --- a/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.stderr +++ b/hydroflow/tests/compile-fail/surface_fold_keyed_generics_extra.stderr @@ -4,10 +4,10 @@ error: `fold_keyed` should have at least 0 and at most 2 generic type arguments, 6 | -> fold_keyed::<'tick, &str, String, ()>(String::new, |old: &mut _, val| { | ^^^^^^^^^^^^^^^^^^^^^^^ -warning: unused import: `hydroflow::hydroflow_syntax` +warning: unused import: `hydroflow::dfir_syntax` --> tests/compile-fail/surface_fold_keyed_generics_extra.rs:1:5 | -1 | use hydroflow::hydroflow_syntax; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 | use hydroflow::dfir_syntax; + | ^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default diff --git a/hydroflow/tests/compile-fail/surface_forwardref_chain_double.rs b/hydroflow/tests/compile-fail/surface_forwardref_chain_double.rs index 612cb04d2a5b..0394ecb07fe3 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_chain_double.rs +++ b/hydroflow/tests/compile-fail/surface_forwardref_chain_double.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { a = b -> k; b = c; diff --git a/hydroflow/tests/compile-fail/surface_forwardref_chain_single.rs b/hydroflow/tests/compile-fail/surface_forwardref_chain_single.rs index b7b95482d00b..ba2d26d51e3a 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_chain_single.rs +++ b/hydroflow/tests/compile-fail/surface_forwardref_chain_single.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { a = b; b = c; c = d; diff --git a/hydroflow/tests/compile-fail/surface_forwardref_self1.rs b/hydroflow/tests/compile-fail/surface_forwardref_self1.rs index 2db338e481e8..1bc374448a95 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_self1.rs +++ b/hydroflow/tests/compile-fail/surface_forwardref_self1.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { f = f -> f; }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_forwardref_self2.rs b/hydroflow/tests/compile-fail/surface_forwardref_self2.rs index 23a2b6740339..c921aca66a66 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_self2.rs +++ b/hydroflow/tests/compile-fail/surface_forwardref_self2.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { f = f -> map(|x: usize| x) -> f; }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_forwardref_self2_indirect.rs b/hydroflow/tests/compile-fail/surface_forwardref_self2_indirect.rs index 1c1ba5b1703e..213ee2d12acd 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_self2_indirect.rs +++ b/hydroflow/tests/compile-fail/surface_forwardref_self2_indirect.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { g = f -> map(|x: usize| x) -> f; f = g; }; diff --git a/hydroflow/tests/compile-fail/surface_forwardref_self3.rs b/hydroflow/tests/compile-fail/surface_forwardref_self3.rs index 7c44ee5b0242..7f0f34003d65 100644 --- a/hydroflow/tests/compile-fail/surface_forwardref_self3.rs +++ b/hydroflow/tests/compile-fail/surface_forwardref_self3.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { f = f; f -> for_each(std::mem::drop); }; diff --git a/hydroflow/tests/compile-fail/surface_identity_wronggeneric.rs b/hydroflow/tests/compile-fail/surface_identity_wronggeneric.rs index 20ee8ba91aac..4de2fb7bef0e 100644 --- a/hydroflow/tests/compile-fail/surface_identity_wronggeneric.rs +++ b/hydroflow/tests/compile-fail/surface_identity_wronggeneric.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> identity::() -> for_each(std::mem::drop); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_join_badtypes.rs b/hydroflow/tests/compile-fail/surface_join_badtypes.rs index 3d3ba588dbbb..d64ced9b19d1 100644 --- a/hydroflow/tests/compile-fail/surface_join_badtypes.rs +++ b/hydroflow/tests/compile-fail/surface_join_badtypes.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { j = join() -> for_each(std::mem::drop); source_iter(0..10) -> map(|x| (x, x)) -> [0]j; source_iter(0..10) -> [1]j; diff --git a/hydroflow/tests/compile-fail/surface_join_generics_extra.rs b/hydroflow/tests/compile-fail/surface_join_generics_extra.rs index 9722319bbeb7..a81c883f098c 100644 --- a/hydroflow/tests/compile-fail/surface_join_generics_extra.rs +++ b/hydroflow/tests/compile-fail/surface_join_generics_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { j = join::() -> for_each(std::mem::drop); source_iter(0..10) -> map(|x| (x, x)) -> [0]j; source_iter(0..10) -> map(|x| (x, x)) -> [1]j; diff --git a/hydroflow/tests/compile-fail/surface_join_persistence_bad.rs b/hydroflow/tests/compile-fail/surface_join_persistence_bad.rs index 0144b0f3084f..8e1b2e51d7ef 100644 --- a/hydroflow/tests/compile-fail/surface_join_persistence_bad.rs +++ b/hydroflow/tests/compile-fail/surface_join_persistence_bad.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { j = join::<'a>() -> for_each(std::mem::drop); source_iter(0..10) -> map(|x| (x, x)) -> [0]j; source_iter(0..10) -> map(|x| (x, x)) -> [1]j; diff --git a/hydroflow/tests/compile-fail/surface_join_persistence_extra.rs b/hydroflow/tests/compile-fail/surface_join_persistence_extra.rs index dae9b813bf98..9c7f3ca603e9 100644 --- a/hydroflow/tests/compile-fail/surface_join_persistence_extra.rs +++ b/hydroflow/tests/compile-fail/surface_join_persistence_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { j = join::<'static, 'static, 'static>() -> for_each(std::mem::drop); source_iter(0..10) -> map(|x| (x, x)) -> [0]j; source_iter(0..10) -> map(|x| (x, x)) -> [1]j; diff --git a/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore b/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore index 5bc9e6af3b53..eb35f08441f0 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore +++ b/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.rs.ignore @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1,2,3,4,5]) -> lattice_fold::<'static, usize>(Default::default()) -> for_each(|x| println!("Least upper bound: {:?}", x)); diff --git a/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.stderr b/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.stderr index a92cdebecbb7..267d6e811238 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.stderr +++ b/hydroflow/tests/compile-fail/surface_lattice_fold_badgeneric.stderr @@ -17,14 +17,14 @@ error[E0277]: the trait bound `usize: Merge` is not satisfied note: required by a bound in `check_inputs` --> tests/compile-fail/surface_lattice_fold_badgeneric.rs:4:18 | -4 | let mut df = hydroflow_syntax! { +4 | let mut df = dfir_syntax! { | __________________^ 5 | | source_iter([1,2,3,4,5]) 6 | | -> lattice_fold::<'static, usize>() 7 | | -> for_each(|x| println!("Least upper bound: {:?}", x)); 8 | | }; | |_____^ required by this bound in `check_inputs` - = note: this error originates in the macro `hydroflow_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `dfir_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `usize: Merge` is not satisfied --> tests/compile-fail/surface_lattice_fold_badgeneric.rs:5:9 @@ -47,7 +47,7 @@ error[E0277]: the trait bound `usize: Merge` is not satisfied error[E0277]: the trait bound `usize: Merge` is not satisfied --> tests/compile-fail/surface_lattice_fold_badgeneric.rs:4:18 | -4 | let mut df = hydroflow_syntax! { +4 | let mut df = dfir_syntax! { | __________________^ 5 | | source_iter([1,2,3,4,5]) 6 | | -> lattice_fold::<'static, usize>() @@ -65,4 +65,4 @@ error[E0277]: the trait bound `usize: Merge` is not satisfied as Merge>> as Merge>> and $N others - = note: this error originates in the macro `hydroflow_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `dfir_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/hydroflow/tests/compile-fail/surface_lattice_fold_noarg.rs b/hydroflow/tests/compile-fail/surface_lattice_fold_noarg.rs index 2ca27026c3f4..ecc40e045cd1 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_fold_noarg.rs +++ b/hydroflow/tests/compile-fail/surface_lattice_fold_noarg.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1,2,3,4,5]) -> lattice_fold::>() -> for_each(|x| println!("Least upper bound: {:?}", x)); diff --git a/hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.rs b/hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.rs index 8e97934e293f..a2fa207c71d3 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.rs +++ b/hydroflow/tests/compile-fail/surface_lattice_fold_wronggeneric.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1,2,3,4,5]) -> lattice_fold::<'static, hydroflow::lattices::set_union::SetUnionHashSet>(hydroflow::lattices::set_union::SetUnionHashSet::::default()) -> for_each(|x| println!("Least upper bound: {:?}", x)); diff --git a/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore b/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore index 1fad32e06857..7b842cdad15a 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore +++ b/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.rs.ignore @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1,2,3,4,5]) -> lattice_reduce::<'static, usize>() -> for_each(|x| println!("Least upper bound: {:?}", x)); diff --git a/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.stderr b/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.stderr index 29bb4627a538..56c29d354aac 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.stderr +++ b/hydroflow/tests/compile-fail/surface_lattice_reduce_badgeneric.stderr @@ -17,14 +17,14 @@ error[E0277]: the trait bound `usize: Merge` is not satisfied note: required by a bound in `check_inputs` --> tests/compile-fail/surface_lattice_reduce_badgeneric.rs:4:18 | -4 | let mut df = hydroflow_syntax! { +4 | let mut df = dfir_syntax! { | __________________^ 5 | | source_iter([1,2,3,4,5]) 6 | | -> lattice_reduce::<'static, usize>() 7 | | -> for_each(|x| println!("Least upper bound: {:?}", x)); 8 | | }; | |_____^ required by this bound in `check_inputs` - = note: this error originates in the macro `hydroflow_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `dfir_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `usize: Merge` is not satisfied --> tests/compile-fail/surface_lattice_reduce_badgeneric.rs:5:9 @@ -47,7 +47,7 @@ error[E0277]: the trait bound `usize: Merge` is not satisfied error[E0277]: the trait bound `usize: Merge` is not satisfied --> tests/compile-fail/surface_lattice_reduce_badgeneric.rs:4:18 | -4 | let mut df = hydroflow_syntax! { +4 | let mut df = dfir_syntax! { | __________________^ 5 | | source_iter([1,2,3,4,5]) 6 | | -> lattice_reduce::<'static, usize>() @@ -65,4 +65,4 @@ error[E0277]: the trait bound `usize: Merge` is not satisfied as Merge>> as Merge>> and $N others - = note: this error originates in the macro `hydroflow_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `dfir_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs b/hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs index 08306055ea8b..c88e29a24d28 100644 --- a/hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs +++ b/hydroflow/tests/compile-fail/surface_lattice_reduce_wronggeneric.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1,2,3,4,5]) -> lattice_reduce::<'static, hydroflow::lattices::set_union::SetUnionHashSet>() -> for_each(|x| println!("Least upper bound: {:?}", x)); diff --git a/hydroflow/tests/compile-fail/surface_loop_cycle.rs b/hydroflow/tests/compile-fail/surface_loop_cycle.rs index 0ddf384b4564..247d24656309 100644 --- a/hydroflow/tests/compile-fail/surface_loop_cycle.rs +++ b/hydroflow/tests/compile-fail/surface_loop_cycle.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { loop { a = identity() -> identity() -> identity() -> identity(); a -> a; diff --git a/hydroflow/tests/compile-fail/surface_loop_missing_unwindowing.rs b/hydroflow/tests/compile-fail/surface_loop_missing_unwindowing.rs index 808bfae7a0e2..bc71a180223a 100644 --- a/hydroflow/tests/compile-fail/surface_loop_missing_unwindowing.rs +++ b/hydroflow/tests/compile-fail/surface_loop_missing_unwindowing.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { a = source_iter(0..10); loop { b = a -> batch(); diff --git a/hydroflow/tests/compile-fail/surface_loop_missing_windowing.rs b/hydroflow/tests/compile-fail/surface_loop_missing_windowing.rs index 2177d2ad0e8c..808d192b4154 100644 --- a/hydroflow/tests/compile-fail/surface_loop_missing_windowing.rs +++ b/hydroflow/tests/compile-fail/surface_loop_missing_windowing.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { a = source_iter(0..10); loop { a -> null(); diff --git a/hydroflow/tests/compile-fail/surface_loop_multiple_window.rs b/hydroflow/tests/compile-fail/surface_loop_multiple_window.rs index eb0eb775bf29..6ae283d4b449 100644 --- a/hydroflow/tests/compile-fail/surface_loop_multiple_window.rs +++ b/hydroflow/tests/compile-fail/surface_loop_multiple_window.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { a = source_iter(0..10); loop { loop { diff --git a/hydroflow/tests/compile-fail/surface_loop_source.rs b/hydroflow/tests/compile-fail/surface_loop_source.rs index edea1a7ad958..e7ee4467d99c 100644 --- a/hydroflow/tests/compile-fail/surface_loop_source.rs +++ b/hydroflow/tests/compile-fail/surface_loop_source.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { loop { source_iter(0..10) -> null(); } diff --git a/hydroflow/tests/compile-fail/surface_map_badtypes.rs b/hydroflow/tests/compile-fail/surface_map_badtypes.rs index 07a6a72c36b9..7886d454b305 100644 --- a/hydroflow/tests/compile-fail/surface_map_badtypes.rs +++ b/hydroflow/tests/compile-fail/surface_map_badtypes.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> map(|(a, b)| a + b) -> for_each(std::mem::drop); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_merge_badtypes.rs b/hydroflow/tests/compile-fail/surface_merge_badtypes.rs index bb5a6438fa9d..9e48170f28f3 100644 --- a/hydroflow/tests/compile-fail/surface_merge_badtypes.rs +++ b/hydroflow/tests/compile-fail/surface_merge_badtypes.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { m = union() -> for_each(std::mem::drop); source_iter(0..10) -> m; source_iter("hello".chars()) -> m; diff --git a/hydroflow/tests/compile-fail/surface_missing_args.rs b/hydroflow/tests/compile-fail/surface_missing_args.rs index 9d2200c46285..f48502b9b69e 100644 --- a/hydroflow/tests/compile-fail/surface_missing_args.rs +++ b/hydroflow/tests/compile-fail/surface_missing_args.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter() -> for_each(); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_negative_loop.rs b/hydroflow/tests/compile-fail/surface_negative_loop.rs index 4aeb9501eddd..8be5c04e9eab 100644 --- a/hydroflow/tests/compile-fail/surface_negative_loop.rs +++ b/hydroflow/tests/compile-fail/surface_negative_loop.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { diff = difference(); source_iter([1]) -> [pos]diff; diff -> [neg]diff; diff --git a/hydroflow/tests/compile-fail/surface_null.rs b/hydroflow/tests/compile-fail/surface_null.rs index b19dd8aa333e..bc3eec041faf 100644 --- a/hydroflow/tests/compile-fail/surface_null.rs +++ b/hydroflow/tests/compile-fail/surface_null.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { null(); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_partition_badarg.rs b/hydroflow/tests/compile-fail/surface_partition_badarg.rs index 524bcde38291..f0f18e869297 100644 --- a/hydroflow/tests/compile-fail/surface_partition_badarg.rs +++ b/hydroflow/tests/compile-fail/surface_partition_badarg.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(0..10) -> partition(std::mem::drop); my_partition[a] -> for_each(std::mem::drop); my_partition[b] -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_partition_badclosure.rs b/hydroflow/tests/compile-fail/surface_partition_badclosure.rs index 925aa694300f..57e03d6d7b19 100644 --- a/hydroflow/tests/compile-fail/surface_partition_badclosure.rs +++ b/hydroflow/tests/compile-fail/surface_partition_badclosure.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(0..10) -> partition(|[a, b, c]| { match item % 3 { 0 => a, diff --git a/hydroflow/tests/compile-fail/surface_partition_port_duplicate.rs b/hydroflow/tests/compile-fail/surface_partition_port_duplicate.rs index c7afe955aae4..d957de5ae7c3 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_duplicate.rs +++ b/hydroflow/tests/compile-fail/surface_partition_port_duplicate.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(0..10) -> partition(|item, [a, b, c]| { match item % 3 { 0 => a, diff --git a/hydroflow/tests/compile-fail/surface_partition_port_elided.rs b/hydroflow/tests/compile-fail/surface_partition_port_elided.rs index f321a41e4b3c..69228fa3d1b4 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_elided.rs +++ b/hydroflow/tests/compile-fail/surface_partition_port_elided.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(0..10) -> partition(|item, [evens, odds]| { if 0 == item % 2 { evens diff --git a/hydroflow/tests/compile-fail/surface_partition_port_extra.rs b/hydroflow/tests/compile-fail/surface_partition_port_extra.rs index 4527062c70db..c357ea78d492 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_extra.rs +++ b/hydroflow/tests/compile-fail/surface_partition_port_extra.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(0..10) -> partition(|item, [a, b, c]| { match item % 3 { 0 => a, diff --git a/hydroflow/tests/compile-fail/surface_partition_port_extramissing.rs b/hydroflow/tests/compile-fail/surface_partition_port_extramissing.rs index 2ca2226319a0..e2eabc4159f3 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_extramissing.rs +++ b/hydroflow/tests/compile-fail/surface_partition_port_extramissing.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(0..10) -> partition(|item, [a, b, c]| { match item % 3 { 0 => a, diff --git a/hydroflow/tests/compile-fail/surface_partition_port_inconsistent.rs b/hydroflow/tests/compile-fail/surface_partition_port_inconsistent.rs index feb2f89fb24b..647a9b50f0fc 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_inconsistent.rs +++ b/hydroflow/tests/compile-fail/surface_partition_port_inconsistent.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(0..10) -> partition(|item, [evens, _0]| { if 0 == item % 2 { evens diff --git a/hydroflow/tests/compile-fail/surface_partition_port_indexgap.rs b/hydroflow/tests/compile-fail/surface_partition_port_indexgap.rs index 6f6de1401a82..349162984bc8 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_indexgap.rs +++ b/hydroflow/tests/compile-fail/surface_partition_port_indexgap.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(0..10) -> partition(|item, n| item % n); my_partition[0] -> for_each(std::mem::drop); my_partition[1] -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_partition_port_missing.rs b/hydroflow/tests/compile-fail/surface_partition_port_missing.rs index 8e03ec0d8ec6..cf5a133742e9 100644 --- a/hydroflow/tests/compile-fail/surface_partition_port_missing.rs +++ b/hydroflow/tests/compile-fail/surface_partition_port_missing.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(0..10) -> partition(|item, [a, b, c]| { match item % 3 { 0 => a, diff --git a/hydroflow/tests/compile-fail/surface_port_conflict.rs b/hydroflow/tests/compile-fail/surface_port_conflict.rs index da351a482a6f..21a0f9868142 100644 --- a/hydroflow/tests/compile-fail/surface_port_conflict.rs +++ b/hydroflow/tests/compile-fail/surface_port_conflict.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { t = source_iter([1]) -> tee(); t[1] -> for_each(std::mem::drop); t[1] -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_port_join.rs b/hydroflow/tests/compile-fail/surface_port_join.rs index 2df6eebe4cf4..c29c104a2238 100644 --- a/hydroflow/tests/compile-fail/surface_port_join.rs +++ b/hydroflow/tests/compile-fail/surface_port_join.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { j = join() -> for_each(std::mem::drop); source_iter([(1, 1), (2, 2)]) -> j; source_iter([(3, 3), (4, 4)]) -> j; diff --git a/hydroflow/tests/compile-fail/surface_port_join_forwardref.rs b/hydroflow/tests/compile-fail/surface_port_join_forwardref.rs index c89bb4ff16a6..6fea3bfe1bb4 100644 --- a/hydroflow/tests/compile-fail/surface_port_join_forwardref.rs +++ b/hydroflow/tests/compile-fail/surface_port_join_forwardref.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(1, 1), (2, 2)]) -> j; source_iter([(3, 3), (4, 4)]) -> j; j = join() -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs b/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs index d9b7f782b949..925b4a4837e1 100644 --- a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs +++ b/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { pivot = union() -> tee(); inn_0 = [0]pivot; diff --git a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs b/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs index 302e3af1d7a9..54c1928a6de6 100644 --- a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs +++ b/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_a_forwardref.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { out_1 -> inn_1; out_0[0] -> inn_0; // Error: `pivot[0][0]` diff --git a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs b/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs index 0d4c8a978b25..5b80d538c3df 100644 --- a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs +++ b/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_inn.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { pivot = union() -> tee(); x_0 = [0]pivot; diff --git a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs b/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs index 0489c6572485..49c4d2500420 100644 --- a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs +++ b/hydroflow/tests/compile-fail/surface_port_naked_overwrite_knot_b_out.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { pivot = union() -> tee(); x_0 = pivot[0]; diff --git a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_simple.rs b/hydroflow/tests/compile-fail/surface_port_naked_overwrite_simple.rs index 611ec16c4c2b..4a4f698a05e6 100644 --- a/hydroflow/tests/compile-fail/surface_port_naked_overwrite_simple.rs +++ b/hydroflow/tests/compile-fail/surface_port_naked_overwrite_simple.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { id = identity(); inn = [0]id; out = id[0]; diff --git a/hydroflow/tests/compile-fail/surface_port_unused_both.rs b/hydroflow/tests/compile-fail/surface_port_unused_both.rs index 5afcf7ab60b2..36499647db22 100644 --- a/hydroflow/tests/compile-fail/surface_port_unused_both.rs +++ b/hydroflow/tests/compile-fail/surface_port_unused_both.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { src = source_iter(0..10); dst = for_each(drop); [0]src -> dst[0]; diff --git a/hydroflow/tests/compile-fail/surface_port_unused_both_indirect.rs b/hydroflow/tests/compile-fail/surface_port_unused_both_indirect.rs index c5a6ab9131fc..5e83ace012e6 100644 --- a/hydroflow/tests/compile-fail/surface_port_unused_both_indirect.rs +++ b/hydroflow/tests/compile-fail/surface_port_unused_both_indirect.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { src = source_iter(0..10); dst = for_each(drop); src_0 = [0]src; diff --git a/hydroflow/tests/compile-fail/surface_port_unused_both_parens.rs b/hydroflow/tests/compile-fail/surface_port_unused_both_parens.rs index 5a07cf07491c..09b34a6320d8 100644 --- a/hydroflow/tests/compile-fail/surface_port_unused_both_parens.rs +++ b/hydroflow/tests/compile-fail/surface_port_unused_both_parens.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { src = [0](source_iter(0..10)); dst = (for_each(drop))[0]; src -> dst; diff --git a/hydroflow/tests/compile-fail/surface_port_unused_in.rs b/hydroflow/tests/compile-fail/surface_port_unused_in.rs index 24a54093a6ed..0a5fbd5bcd6c 100644 --- a/hydroflow/tests/compile-fail/surface_port_unused_in.rs +++ b/hydroflow/tests/compile-fail/surface_port_unused_in.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { src = source_iter(0..10); [0]src -> for_each(drop); }; diff --git a/hydroflow/tests/compile-fail/surface_port_unused_out.rs b/hydroflow/tests/compile-fail/surface_port_unused_out.rs index cdb75c51229c..c5d8cfdb6329 100644 --- a/hydroflow/tests/compile-fail/surface_port_unused_out.rs +++ b/hydroflow/tests/compile-fail/surface_port_unused_out.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> dst[0]; dst = for_each(drop); }; diff --git a/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_int.rs b/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_int.rs index 995fa5c09bb6..3b3d57ca9327 100644 --- a/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_int.rs +++ b/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_int.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_iter(0..1) -> fold_keyed(|| 0, |old: &mut u32, val: u32| { *old += val; }) -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_option.rs b/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_option.rs index 82f30d2aa8f6..18f3c0e5abe8 100644 --- a/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_option.rs +++ b/hydroflow/tests/compile-fail/surface_reduce_keyed_badtype_option.rs @@ -1,5 +1,5 @@ fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_iter([ Some(5), None, Some(12) ]) -> fold_keyed(|| 0, |old: &mut u32, val: u32| { *old += val; }) -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_singleton_badexpr.rs b/hydroflow/tests/compile-fail/surface_singleton_badexpr.rs index a29d0151d082..93b5dced6e7d 100644 --- a/hydroflow/tests/compile-fail/surface_singleton_badexpr.rs +++ b/hydroflow/tests/compile-fail/surface_singleton_badexpr.rs @@ -1,6 +1,6 @@ /// Correct reference but using it wrong (bad expression). fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { my_ref = source_iter(15_u32..=25) -> fold(|| 0, |a, b| *a = std::cmp::max(*a, b)); source_iter(10_u32..=30) -> persist() diff --git a/hydroflow/tests/compile-fail/surface_singleton_nostate.rs b/hydroflow/tests/compile-fail/surface_singleton_nostate.rs index 1f9de7e17dbd..e95a74e33ec0 100644 --- a/hydroflow/tests/compile-fail/surface_singleton_nostate.rs +++ b/hydroflow/tests/compile-fail/surface_singleton_nostate.rs @@ -1,6 +1,6 @@ /// Reference an operator that doesn't have singleton state. pub fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { my_ref = source_iter(15..=25) -> null(); source_iter(10..=30) -> persist::<'static>() diff --git a/hydroflow/tests/compile-fail/surface_singleton_nostate_undefined.rs b/hydroflow/tests/compile-fail/surface_singleton_nostate_undefined.rs index 97731ca3a7d4..d9c5a0a6b9ff 100644 --- a/hydroflow/tests/compile-fail/surface_singleton_nostate_undefined.rs +++ b/hydroflow/tests/compile-fail/surface_singleton_nostate_undefined.rs @@ -1,5 +1,5 @@ pub fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { my_ref = source_iter(15..=25) -> null(); source_iter(10..=30) -> persist::<'static>() diff --git a/hydroflow/tests/compile-fail/surface_singleton_undefined.rs b/hydroflow/tests/compile-fail/surface_singleton_undefined.rs index f0eeacd5e7b4..5ad6896694ac 100644 --- a/hydroflow/tests/compile-fail/surface_singleton_undefined.rs +++ b/hydroflow/tests/compile-fail/surface_singleton_undefined.rs @@ -1,5 +1,5 @@ pub fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_iter(10..=30) -> persist::<'static>() -> filter(|value| value <= #unknown.as_reveal_ref()) diff --git a/hydroflow/tests/compile-fail/surface_singleton_undefined_nostate.rs b/hydroflow/tests/compile-fail/surface_singleton_undefined_nostate.rs index 93dbcdb85581..6e7d416217fe 100644 --- a/hydroflow/tests/compile-fail/surface_singleton_undefined_nostate.rs +++ b/hydroflow/tests/compile-fail/surface_singleton_undefined_nostate.rs @@ -1,5 +1,5 @@ pub fn main() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { my_ref = source_iter(15..=25) -> null(); source_iter(10..=30) -> persist::<'static>() diff --git a/hydroflow/tests/compile-fail/surface_source_interval_badarg.rs b/hydroflow/tests/compile-fail/surface_source_interval_badarg.rs index e0c1629e53b9..c38aae398a38 100644 --- a/hydroflow/tests/compile-fail/surface_source_interval_badarg.rs +++ b/hydroflow/tests/compile-fail/surface_source_interval_badarg.rs @@ -1,8 +1,8 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; #[hydroflow::main] async fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { // Should be a `Duration`. source_interval(5) -> for_each(std::mem::drop); }; diff --git a/hydroflow/tests/compile-fail/surface_source_iter_badtype.rs.ignore b/hydroflow/tests/compile-fail/surface_source_iter_badtype.rs.ignore index f97ad44dfcf2..d35367409591 100644 --- a/hydroflow/tests/compile-fail/surface_source_iter_badtype.rs.ignore +++ b/hydroflow/tests/compile-fail/surface_source_iter_badtype.rs.ignore @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(()) -> for_each(std::mem::drop); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.rs b/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.rs index 8bf5ac542013..e114d94d272b 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.stderr b/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.stderr index 7eaa1562265e..c887f33e5cd9 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.stderr +++ b/hydroflow/tests/compile-fail/surface_syntax_eol_arrow.stderr @@ -1,10 +1,10 @@ error: unexpected end of input, expected one of: square brackets, `mod`, identifier, parentheses --> tests/compile-fail/surface_syntax_eol_arrow.rs:4:18 | -4 | let mut df = hydroflow_syntax! { +4 | let mut df = dfir_syntax! { | __________________^ 5 | | source_iter(0..10) -> 6 | | }; | |_____^ | - = note: this error originates in the macro `hydroflow_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `dfir_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/hydroflow/tests/compile-fail/surface_syntax_eol_indexing.rs b/hydroflow/tests/compile-fail/surface_syntax_eol_indexing.rs index d232a24458a5..14fffeb89b3d 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_indexing.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_eol_indexing.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> [0] }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_eol_indexing.stderr b/hydroflow/tests/compile-fail/surface_syntax_eol_indexing.stderr index bbdf02f4a573..3ea5335c1836 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_indexing.stderr +++ b/hydroflow/tests/compile-fail/surface_syntax_eol_indexing.stderr @@ -1,10 +1,10 @@ error: unexpected end of input, expected one of: parentheses, identifier, `mod` --> tests/compile-fail/surface_syntax_eol_indexing.rs:4:18 | -4 | let mut df = hydroflow_syntax! { +4 | let mut df = dfir_syntax! { | __________________^ 5 | | source_iter(0..10) -> [0] 6 | | }; | |_____^ | - = note: this error originates in the macro `hydroflow_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `dfir_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/hydroflow/tests/compile-fail/surface_syntax_eol_missingop.rs b/hydroflow/tests/compile-fail/surface_syntax_eol_missingop.rs index 229787ac1005..5524178c4a40 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_missingop.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_eol_missingop.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> ; }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_eol_op.rs b/hydroflow/tests/compile-fail/surface_syntax_eol_op.rs index 28b5b7809c6b..88a3deb807a6 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_op.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_eol_op.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> for_each(std::mem::drop) }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_eol_op.stderr b/hydroflow/tests/compile-fail/surface_syntax_eol_op.stderr index 12c34360bfdd..24552a95e2d8 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_eol_op.stderr +++ b/hydroflow/tests/compile-fail/surface_syntax_eol_op.stderr @@ -1,10 +1,10 @@ error: expected `;` --> tests/compile-fail/surface_syntax_eol_op.rs:4:18 | -4 | let mut df = hydroflow_syntax! { +4 | let mut df = dfir_syntax! { | __________________^ 5 | | source_iter(0..10) -> for_each(std::mem::drop) 6 | | }; | |_____^ | - = note: this error originates in the macro `hydroflow_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `dfir_syntax` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/hydroflow/tests/compile-fail/surface_syntax_indexing_empty.rs b/hydroflow/tests/compile-fail/surface_syntax_indexing_empty.rs index 1fa55a7d164d..f4009f88b5d8 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_indexing_empty.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_indexing_empty.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> [0](); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_noarrow_indexing.rs b/hydroflow/tests/compile-fail/surface_syntax_noarrow_indexing.rs index 4905da0918e7..ea0fa7b599ec 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_noarrow_indexing.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_noarrow_indexing.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { x = for_each(std::mem::drop); source_iter(0..10) [0]x; }; diff --git a/hydroflow/tests/compile-fail/surface_syntax_noarrow_op.rs b/hydroflow/tests/compile-fail/surface_syntax_noarrow_op.rs index bf815568cde2..682d38e72670 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_noarrow_op.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_noarrow_op.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) for_each(std::mem::drop); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_noarrow_paren.rs b/hydroflow/tests/compile-fail/surface_syntax_noarrow_paren.rs index 34857dbf5de0..380808db1e37 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_noarrow_paren.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_noarrow_paren.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) (for_each(std::mem::drop)); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren.rs b/hydroflow/tests/compile-fail/surface_syntax_paren.rs index e8b1731df7b1..b40062cefe74 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_paren.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) (for_each(std::mem::drop)) }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_arrow.rs b/hydroflow/tests/compile-fail/surface_syntax_paren_arrow.rs index caa6b9df6943..e52fbcbc7fc3 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_arrow.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_paren_arrow.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { (source_iter(0..10) ->); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_indexing.rs b/hydroflow/tests/compile-fail/surface_syntax_paren_indexing.rs index 45662485bbe0..f8395c67770f 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_indexing.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_paren_indexing.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { (source_iter(0..10) -> [0]); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_missingop.rs b/hydroflow/tests/compile-fail/surface_syntax_paren_missingop.rs index 19e6bec9f186..ac81612bb4ad 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_missingop.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_paren_missingop.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { (source_iter(0..10) -> ); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_op.rs b/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_op.rs index 1ff2d2d8f705..09a6f7b63e7e 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_op.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_op.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { (source_iter(0..10) for_each(std::mem::drop)); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs b/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs index 139ca6cbf593..beaea79f7615 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_paren_noarrow_paren.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { (source_iter(0..10) (for_each(std::mem::drop))); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_syntax_paren_semicolon.rs b/hydroflow/tests/compile-fail/surface_syntax_paren_semicolon.rs index 806ac064ae27..722cdd5e31ea 100644 --- a/hydroflow/tests/compile-fail/surface_syntax_paren_semicolon.rs +++ b/hydroflow/tests/compile-fail/surface_syntax_paren_semicolon.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { (source_iter(0..10);); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_unknown_operators.rs b/hydroflow/tests/compile-fail/surface_unknown_operators.rs index a2fb0888830f..caa48c71236a 100644 --- a/hydroflow/tests/compile-fail/surface_unknown_operators.rs +++ b/hydroflow/tests/compile-fail/surface_unknown_operators.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { hydro_lab() -> for_each(std::mem::drop); }; df.run_available(); diff --git a/hydroflow/tests/compile-fail/surface_use_bad1.rs b/hydroflow/tests/compile-fail/surface_use_bad1.rs index 09a005b9ae57..756926c119c1 100644 --- a/hydroflow/tests/compile-fail/surface_use_bad1.rs +++ b/hydroflow/tests/compile-fail/surface_use_bad1.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { use x::; source_iter(0..10) -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_use_bad2.rs b/hydroflow/tests/compile-fail/surface_use_bad2.rs index 4cb2cf288f99..3d87686bd539 100644 --- a/hydroflow/tests/compile-fail/surface_use_bad2.rs +++ b/hydroflow/tests/compile-fail/surface_use_bad2.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { use source_iter(0..10) -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_use_bad3.rs b/hydroflow/tests/compile-fail/surface_use_bad3.rs index 64024c337cf7..3016af6d270e 100644 --- a/hydroflow/tests/compile-fail/surface_use_bad3.rs +++ b/hydroflow/tests/compile-fail/surface_use_bad3.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { use; source_iter(0..10) -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_use_unknown.rs b/hydroflow/tests/compile-fail/surface_use_unknown.rs index 67049c34a3d9..af11287fb2df 100644 --- a/hydroflow/tests/compile-fail/surface_use_unknown.rs +++ b/hydroflow/tests/compile-fail/surface_use_unknown.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { use x; source_iter(0..10) -> for_each(std::mem::drop); diff --git a/hydroflow/tests/compile-fail/surface_varname_undefined.rs b/hydroflow/tests/compile-fail/surface_varname_undefined.rs index 3f928c5c0a6b..670a1945cbd7 100644 --- a/hydroflow/tests/compile-fail/surface_varname_undefined.rs +++ b/hydroflow/tests/compile-fail/surface_varname_undefined.rs @@ -1,7 +1,7 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; fn main() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { hydro_lab -> for_each(std::mem::drop); }; df.run_available(); diff --git a/hydroflow/tests/surface_async.rs b/hydroflow/tests/surface_async.rs index ac18db158cb7..08ed6b5af042 100644 --- a/hydroflow/tests/surface_async.rs +++ b/hydroflow/tests/surface_async.rs @@ -10,7 +10,7 @@ use std::time::Duration; use bytes::Bytes; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{collect_ready_async, ready_iter, tcp_lines}; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax, rassert, rassert_eq}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax, rassert, rassert_eq}; use multiplatform_test::multiplatform_test; use tokio::net::{TcpListener, TcpStream, UdpSocket}; use tokio::task::LocalSet; @@ -33,7 +33,7 @@ pub async fn test_echo_udp() -> Result<(), Box> { let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { recv = source_stream(udp_recv) -> map(|r| r.unwrap()) -> tee(); @@ -67,7 +67,7 @@ pub async fn test_echo_udp() -> Result<(), Box> { let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { recv = source_stream(recv_udp) -> map(|r| r.unwrap()) -> tee(); @@ -98,7 +98,7 @@ pub async fn test_echo_udp() -> Result<(), Box> { let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { recv = source_stream(recv_udp) -> map(|r| r.unwrap()) -> tee(); @@ -145,7 +145,7 @@ pub async fn test_echo_tcp() -> Result<(), Box> { let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { rev = source_stream(server_recv) -> map(|x| x.unwrap()) -> tee(); @@ -172,7 +172,7 @@ pub async fn test_echo_tcp() -> Result<(), Box> { let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { recv = source_stream(client_recv) -> map(|x| x.unwrap()) -> tee(); @@ -213,7 +213,7 @@ pub async fn test_echo() { // LinesCodec separates each line from `lines_recv` with `\n`. let stdout_lines = FramedWrite::new(tokio::io::stdout(), LinesCodec::new()); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { source_stream(lines_recv) -> dest_sink(stdout_lines); }; assert_graphvis_snapshots!(df); @@ -240,7 +240,7 @@ pub async fn test_futures_stream_sink() { let (seen_send, seen_recv) = hydroflow::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { recv = source_stream(recv) -> tee(); recv[0] -> map(|x| x + 1) -> filter(|&x| x < MAX) @@ -265,7 +265,7 @@ async fn asynctest_dest_sink_bounded_channel() { let send = tokio_util::sync::PollSender::new(send); let mut recv = tokio_stream::wrappers::ReceiverStream::new(recv); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_iter(0..10) -> dest_sink(send); }; tokio::time::timeout(Duration::from_secs(1), flow.run_async()) @@ -296,7 +296,7 @@ async fn asynctest_dest_sink_duplex() { .length_field_length(1) .new_write(asyncwrite); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_iter([ Bytes::from_static(b"hello"), Bytes::from_static(b"world"), @@ -321,7 +321,7 @@ async fn asynctest_dest_asyncwrite_duplex() { let (asyncwrite, mut asyncread) = tokio::io::duplex(256); let sink = FramedWrite::new(asyncwrite, BytesCodec::new()); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_iter([ Bytes::from_static("hello".as_bytes()), Bytes::from_static("world".as_bytes()), @@ -344,13 +344,13 @@ async fn asynctest_source_stream() { let (c_send, c_recv) = hydroflow::util::unbounded_channel::(); let task_a = tokio::task::spawn_local(async move { - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_stream(a_recv) -> for_each(|x| { b_send.send(x).unwrap(); }); }; flow.run_async().await.unwrap(); }); let task_b = tokio::task::spawn_local(async move { - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_stream(b_recv) -> for_each(|x| { c_send.send(x).unwrap(); }); }; flow.run_async().await.unwrap(); @@ -398,7 +398,7 @@ async fn asynctest_check_state_yielding() { let task_b = tokio::task::spawn_local( async move { - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { source_stream(a_recv) -> reduce::<'static>(|a: &mut _, b| *a += b) -> for_each(|x| b_send.send(x).unwrap()); @@ -427,7 +427,7 @@ async fn asynctest_check_state_yielding() { async fn asynctest_repeat_iter() { let (b_send, b_recv) = hydroflow::util::unbounded_channel::(); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { source_iter(0..3) -> persist::<'static>() -> for_each(|x| b_send.send(x).unwrap()); }; @@ -442,7 +442,7 @@ async fn asynctest_event_repeat_iter() { let (a_send, a_recv) = hydroflow::util::unbounded_channel::(); let (b_send, b_recv) = hydroflow::util::unbounded_channel::(); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { source_iter(0..3) -> persist::<'static>() -> my_union; source_stream(a_recv) -> my_union; my_union = union() -> for_each(|x| b_send.send(x).unwrap()); @@ -475,14 +475,14 @@ async fn asynctest_tcp() { let (tx, rx, server_addr) = hydroflow::util::bind_tcp_lines("127.0.0.1:0".parse().unwrap()).await; - let mut echo_server = hydroflow_syntax! { + let mut echo_server = dfir_syntax! { source_stream(rx) -> filter_map(Result::ok) -> dest_sink(tx); }; let (tx, rx) = hydroflow::util::connect_tcp_lines(); - let mut echo_client = hydroflow_syntax! { + let mut echo_client = dfir_syntax! { source_iter([("Hello".to_owned(), server_addr)]) -> dest_sink(tx); @@ -509,14 +509,14 @@ async fn asynctest_udp() { let (tx, rx, server_addr) = hydroflow::util::bind_udp_lines("127.0.0.1:0".parse().unwrap()).await; - let mut echo_server = hydroflow_syntax! { + let mut echo_server = dfir_syntax! { source_stream(rx) -> filter_map(Result::ok) -> dest_sink(tx); }; let (tx, rx, _) = hydroflow::util::bind_udp_lines("127.0.0.1:0".parse().unwrap()).await; - let mut echo_client = hydroflow_syntax! { + let mut echo_client = dfir_syntax! { source_iter([("Hello".to_owned(), server_addr)]) -> dest_sink(tx); diff --git a/hydroflow/tests/surface_batch.rs b/hydroflow/tests/surface_batch.rs index 9837ec241675..da8820ac2eac 100644 --- a/hydroflow/tests/surface_batch.rs +++ b/hydroflow/tests/surface_batch.rs @@ -1,5 +1,5 @@ use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] @@ -7,7 +7,7 @@ pub fn test_basic_2() { let (signal_tx, signal_rx) = hydroflow::util::unbounded_channel::<()>(); let (egress_tx, mut egress_rx) = hydroflow::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { gate = defer_signal(); source_iter([1, 2, 3]) -> [input]gate; source_stream(signal_rx) -> [signal]gate; diff --git a/hydroflow/tests/surface_book.rs b/hydroflow/tests/surface_book.rs index e946f6542fa7..e32f25e4ab1a 100644 --- a/hydroflow/tests/surface_book.rs +++ b/hydroflow/tests/surface_book.rs @@ -4,7 +4,7 @@ use tokio::time::Instant; #[multiplatform_test] fn test_surface_flows_1() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { my_tee = source_iter(vec!["Hello", "world"]) -> tee(); my_tee[0] -> map(|x| x.to_uppercase()) -> [0]my_union; my_tee[1] -> map(|x| x.to_lowercase()) -> [1]my_union; @@ -18,9 +18,9 @@ fn test_surface_flows_1() { async fn test_source_interval() { use std::time::Duration; - use hydroflow::hydroflow_syntax; + use hydroflow::dfir_syntax; - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { source_interval(Duration::from_secs(1)) -> map(|_| { Instant::now() } ) -> for_each(|time| println!("This runs every second: {:?}", time)); diff --git a/hydroflow/tests/surface_codegen.rs b/hydroflow/tests/surface_codegen.rs index 09153afebad6..de95b0dfb1dd 100644 --- a/hydroflow/tests/surface_codegen.rs +++ b/hydroflow/tests/surface_codegen.rs @@ -4,7 +4,7 @@ use hydroflow::scheduled::graph::Hydroflow; use hydroflow::scheduled::ticks::TickInstant; use hydroflow::util::collect_ready; use hydroflow::util::multiset::HashMultiSet; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; // TODO(mingwei): custom operators? How to handle in syntax? How to handle state? @@ -28,7 +28,7 @@ use multiplatform_test::multiplatform_test; pub fn test_basic_2() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1]) -> for_each(|v| out_send.send(v).unwrap()); }; assert_graphvis_snapshots!(df); @@ -41,7 +41,7 @@ pub fn test_basic_2() { pub fn test_basic_3() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1]) -> map(|v| v + 1) -> for_each(|v| out_send.send(v).unwrap()); }; assert_graphvis_snapshots!(df); @@ -54,7 +54,7 @@ pub fn test_basic_3() { pub fn test_basic_union() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { m = union() -> for_each(|v| out_send.send(v).unwrap()); source_iter([1]) -> [0]m; source_iter([2]) -> [1]m; @@ -70,7 +70,7 @@ pub fn test_basic_tee() { let (out_send_a, mut out_recv) = hydroflow::util::unbounded_channel::(); let out_send_b = out_send_a.clone(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { t = source_iter([1]) -> tee(); t[0] -> for_each(|v| out_send_a.send(format!("A {}", v)).unwrap()); t[1] -> for_each(|v| out_send_b.send(format!("B {}", v)).unwrap()); @@ -91,7 +91,7 @@ pub fn test_basic_inspect_null() { let seen = Rc::new(RefCell::new(Vec::new())); let seen_inner = Rc::clone(&seen); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1, 2, 3, 4]) -> inspect(|&x| seen_inner.borrow_mut().push(x)) -> null(); }; df.run_available(); @@ -107,7 +107,7 @@ pub fn test_basic_inspect_no_null() { let seen = Rc::new(RefCell::new(Vec::new())); let seen_inner = Rc::clone(&seen); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1, 2, 3, 4]) -> inspect(|&x| seen_inner.borrow_mut().push(x)); }; df.run_available(); @@ -119,7 +119,7 @@ pub fn test_basic_inspect_no_null() { #[multiplatform_test] pub fn test_large_diamond() { #[expect(clippy::map_identity, reason = "testing topology")] - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { t = source_iter([1]) -> tee(); j = union() -> for_each(|x| println!("{}", x)); t[0] -> map(std::convert::identity) -> map(std::convert::identity) -> [0]j; @@ -133,7 +133,7 @@ pub fn test_large_diamond() { pub fn test_recv_expr() { let send_recv = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_stream(send_recv.1) -> for_each(|v| print!("{:?}", v)); }; @@ -149,12 +149,12 @@ pub fn test_recv_expr() { #[multiplatform_test] pub fn test_join_order() { - let _df_good = hydroflow_syntax! { + let _df_good = dfir_syntax! { yikes = join() -> for_each(|m: ((), (u32, String))| println!("{:?}", m)); source_iter([0,1,2]) -> map(|i| ((), i)) -> [0]yikes; source_iter(["a".to_string(),"b".to_string(),"c".to_string()]) -> map(|s| ((), s)) -> [1]yikes; }; - let _df_bad = hydroflow_syntax! { + let _df_bad = dfir_syntax! { yikes = join() -> for_each(|m: ((), (u32, String))| println!("{:?}", m)); source_iter(["a".to_string(),"b".to_string(),"c".to_string()]) -> map(|s| ((), s)) -> [1]yikes; source_iter([0,1,2]) -> map(|i| ((), i)) -> [0]yikes; @@ -169,7 +169,7 @@ pub fn test_multiset_join() { let (out_tx, mut out_rx) = hydroflow::util::unbounded_channel::<(usize, (usize, usize))>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_join = join::() -> for_each(|m| out_tx.send(m).unwrap()); source_iter([(0, 1), (0, 1)]) -> [0]my_join; source_iter([(0, 2)]) -> [1]my_join; @@ -186,7 +186,7 @@ pub fn test_multiset_join() { use hydroflow::compiled::pull::HalfMultisetJoinState; let (out_tx, mut out_rx) = hydroflow::util::unbounded_channel::<(usize, (usize, usize))>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_join = join::() -> for_each(|m| out_tx.send(m).unwrap()); source_iter([(1, 1), (1, 1), (1, 1)]) -> [0]my_join; source_iter([(1, 2), (1, 2), (1, 2), (1, 2)]) -> [1]my_join; @@ -203,7 +203,7 @@ pub fn test_multiset_join() { use hydroflow::compiled::pull::HalfMultisetJoinState; let (out_tx, mut out_rx) = hydroflow::util::unbounded_channel::<(usize, (usize, usize))>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_join = join::() -> for_each(|m| out_tx.send(m).unwrap()); source_iter([(1, 1), (1, 1), (1, 1), (1, 1)]) -> [0]my_join; source_iter([(1, 2), (1, 2), (1, 2)]) -> [1]my_join; @@ -220,7 +220,7 @@ pub fn test_multiset_join() { pub fn test_cross_join() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, &str)>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { cj = cross_join() -> for_each(|v| out_send.send(v).unwrap()); source_iter([1, 2, 2, 3]) -> [0]cj; source_iter(["a", "b", "c", "c"]) -> [1]cj; @@ -249,7 +249,7 @@ pub fn test_cross_join() { pub fn test_cross_join_multiset() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, &str)>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { cj = cross_join_multiset() -> for_each(|v| out_send.send(v).unwrap()); source_iter([1, 2, 2, 3]) -> [0]cj; source_iter(["a", "b", "c", "c"]) -> [1]cj; @@ -285,7 +285,7 @@ pub fn test_cross_join_multiset() { pub fn test_defer_tick() { let (inp_send, inp_recv) = hydroflow::util::unbounded_channel::(); let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { inp = source_stream(inp_recv) -> tee(); diff = difference() -> for_each(|x| out_send.send(x).unwrap()); inp -> [pos]diff; @@ -313,7 +313,7 @@ pub fn test_defer_tick() { pub fn test_anti_join() { let (inp_send, inp_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { inp = source_stream(inp_recv) -> tee(); diff = anti_join() -> sort() -> for_each(|x| out_send.send(x).unwrap()); inp -> [pos]diff; @@ -343,7 +343,7 @@ pub fn test_anti_join_static() { let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { pos = source_stream(pos_recv); neg = source_stream(neg_recv); pos -> [pos]diff_static; @@ -373,7 +373,7 @@ pub fn test_anti_join_tick_static() { let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { pos = source_stream(pos_recv); neg = source_stream(neg_recv); pos -> [pos]diff_static; @@ -405,7 +405,7 @@ pub fn test_anti_join_multiset_tick_static() { let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { pos = source_stream(pos_recv); neg = source_stream(neg_recv); pos -> [pos]diff_static; @@ -437,7 +437,7 @@ pub fn test_anti_join_multiset_static() { let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { pos = source_stream(pos_recv); neg = source_stream(neg_recv); pos -> [pos]diff_static; @@ -466,7 +466,7 @@ pub fn test_anti_join_multiset_static() { pub fn test_anti_join_multiset() { let (inp_send, inp_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { inp = source_stream(inp_recv) -> tee(); diff = anti_join_multiset() -> sort() -> for_each(|x| out_send.send(x).unwrap()); inp -> [pos]diff; @@ -495,7 +495,7 @@ pub fn test_anti_join_multiset() { pub fn test_sort() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_stream(items_recv) -> sort() -> for_each(|v| print!("{:?}, ", v)); @@ -524,7 +524,7 @@ pub fn test_sort() { #[multiplatform_test] pub fn test_sort_by_key() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(vec!((2, 'y'), (3, 'x'), (1, 'z'))) -> sort_by_key(|(k, _v)| k) -> for_each(|v| println!("{:?}", v)); @@ -556,7 +556,7 @@ fn test_sort_by_owned() { ]; let mut dummies_saved = dummies.clone(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(dummies) -> sort_by_key(|d| &d.x) -> for_each(|d| out_send.send(d).unwrap()); }; df.run_available(); @@ -573,11 +573,11 @@ pub fn test_channel_minimal() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df1 = hydroflow_syntax! { + let mut df1 = dfir_syntax! { source_iter([1, 2, 3]) -> for_each(|x| { send.send(x).unwrap(); }); }; - let mut df2 = hydroflow_syntax! { + let mut df2 = dfir_syntax! { source_stream(recv) -> for_each(|x| out_send.send(x).unwrap()); }; @@ -601,7 +601,7 @@ pub fn test_surface_syntax_reachability_generated() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { reached_vertices = union() -> map(|v| (v, ())); source_iter(vec![0]) -> [0]reached_vertices; @@ -655,7 +655,7 @@ pub fn test_transitive_closure() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { // edge(x,y) :- link(x,y) edge_union_tee = union() -> tee(); link_tee = tee(); @@ -719,7 +719,7 @@ pub fn test_covid_tracing() { let (out_send, mut out_recv) = unbounded_channel::(); - let mut hydroflow = hydroflow_syntax! { + let mut hydroflow = dfir_syntax! { contacts = source_stream(contacts_recv) -> flat_map(|(pid_a, pid_b, time)| [(pid_a, (pid_b, time)), (pid_b, (pid_a, time))]); exposed = union(); @@ -820,7 +820,7 @@ pub fn test_covid_tracing() { #[multiplatform_test] pub fn test_assert_eq() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1, 2, 3]) -> assert_eq([1, 2, 3]) -> assert_eq([1, 2, 3]); // one in pull, one in push source_iter([1, 2, 3]) -> assert_eq([1, 2, 3]) -> assert_eq(vec![1, 2, 3]); source_iter([1, 2, 3]) -> assert_eq(vec![1, 2, 3]) -> assert_eq([1, 2, 3]); @@ -832,7 +832,7 @@ pub fn test_assert_eq() { #[multiplatform_test(test)] pub fn test_assert_failures() { assert!(std::panic::catch_unwind(|| { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([0]) -> assert_eq([1]); }; @@ -841,7 +841,7 @@ pub fn test_assert_failures() { .is_err()); assert!(std::panic::catch_unwind(|| { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([0]) -> assert_eq([1]) -> null(); }; @@ -861,7 +861,7 @@ pub fn test_iter_stream_batches() { .map(|n| (TickInstant::new((n / BATCH).try_into().unwrap()), n)) .collect(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_stream(stream) -> map(|x| (context.current_tick(), x)) -> assert_eq(expected); diff --git a/hydroflow/tests/surface_context.rs b/hydroflow/tests/surface_context.rs index 77cdbc178610..9126fc5afacf 100644 --- a/hydroflow/tests/surface_context.rs +++ b/hydroflow/tests/surface_context.rs @@ -1,14 +1,14 @@ use std::cell::Cell; use std::rc::Rc; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; -use hydroflow_macro::hydroflow_test; +use dfir_macro::dfir_test; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; use web_time::Duration; #[multiplatform_test] pub fn test_context_ref() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([()]) -> for_each(|()| println!("Current tick: {}, stratum: {}", context.current_tick(), context.current_stratum())); }; @@ -20,7 +20,7 @@ pub fn test_context_ref() { pub fn test_context_mut() { // TODO(mingwei): Currently cannot have conflicting (mut) references to `context` in the same // subgraph - bit of a leak of the subgraphs abstraction. `next_stratum()` here so it runs. - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> map(|n| context.add_state(n)) -> next_stratum() @@ -36,7 +36,7 @@ pub async fn test_context_current_tick_start_does_not_count_time_between_ticks_a let mut df = { let time = time.clone(); - hydroflow_syntax! { + dfir_syntax! { source_iter([()]) -> persist::<'static>() -> for_each(|_| time.set(Some(context.current_tick_start().elapsed().unwrap()))); @@ -60,11 +60,11 @@ pub async fn test_context_current_tick_start_does_not_count_time_between_ticks_a assert!(time.take().unwrap() < Duration::from_millis(50)); } -#[hydroflow_test] +#[dfir_test] pub async fn test_defered_tick_and_no_io_with_run_async() { let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([()]) -> defer_tick() -> for_each(|_| tx.send(()).unwrap()); diff --git a/hydroflow/tests/surface_cross_singleton.rs b/hydroflow/tests/surface_cross_singleton.rs index 497670a28dcc..b6c107fb2cc8 100644 --- a/hydroflow/tests/surface_cross_singleton.rs +++ b/hydroflow/tests/surface_cross_singleton.rs @@ -1,5 +1,5 @@ use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test(test, wasm, env_tracing)] @@ -7,7 +7,7 @@ pub fn test_basic() { let (single_tx, single_rx) = hydroflow::util::unbounded_channel::<()>(); let (egress_tx, mut egress_rx) = hydroflow::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { join = cross_singleton(); source_iter([1, 2, 3]) -> persist::<'static>() -> [input]join; source_stream(single_rx) -> [single]join; @@ -32,7 +32,7 @@ pub fn test_union_defer_tick() { let (cross_tx, cross_rx) = hydroflow::util::unbounded_channel::(); let (egress_tx, mut egress_rx) = hydroflow::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { teed_in = source_stream(cross_rx) -> sort() -> tee(); teed_in -> [input]join; diff --git a/hydroflow/tests/surface_demux_enum.rs b/hydroflow/tests/surface_demux_enum.rs index ffbb1ac69c6f..71a893511042 100644 --- a/hydroflow/tests/surface_demux_enum.rs +++ b/hydroflow/tests/surface_demux_enum.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::demux_enum::{DemuxEnum, DemuxEnumBase}; use multiplatform_test::multiplatform_test; use pusherator::for_each::ForEach; @@ -76,7 +76,7 @@ pub fn test_demux_enum() { Circle { r: f64 }, } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Square(9.0), Shape::Rectangle { w: 10.0, h: 8.0 }, @@ -105,7 +105,7 @@ pub fn test_demux_enum_generic() { where N: 'static + Into, { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Square(s), Shape::Rectangle { w, h }, @@ -130,7 +130,7 @@ fn test_zero_variants() { enum Never {} let (_tx, rx) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_stream(rx) -> demux_enum::(); }; @@ -144,7 +144,7 @@ fn test_one_variant() { OnlyMessage(T), } - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { input = source_iter([Request::OnlyMessage("hi")]) -> demux_enum::>(); input[OnlyMessage] -> assert_eq([("hi",)]); }; diff --git a/hydroflow/tests/surface_demux_partition.rs b/hydroflow/tests/surface_demux_partition.rs index f59b3f8fbd57..ddc3d8510df0 100644 --- a/hydroflow/tests/surface_demux_partition.rs +++ b/hydroflow/tests/surface_demux_partition.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::collect_ready; use multiplatform_test::multiplatform_test; @@ -12,7 +12,7 @@ pub fn test_demux_1() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter([ Shape::Circle(5.0), Shape::Rectangle { width: 10.0, height: 8.0 }, @@ -40,7 +40,7 @@ pub fn test_demux_1() { #[multiplatform_test] pub fn test_demux_fizzbuzz_1() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter(1..=100) -> demux(|v, var_args!(fzbz, fizz, buzz, vals)| match v { @@ -60,7 +60,7 @@ pub fn test_demux_fizzbuzz_1() { #[multiplatform_test] pub fn test_demux_fizzbuzz_2() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_demux = source_iter(1..=100) -> demux(|v, var_args!(fzbz, fizz, buzz, vals)| match (v % 3, v % 5) { @@ -80,7 +80,7 @@ pub fn test_demux_fizzbuzz_2() { #[multiplatform_test] pub fn test_partition_fizzbuzz() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(1..=100) -> partition(|&v, [fzbz, fizz, buzz, vals]| match (v % 3, v % 5) { @@ -100,7 +100,7 @@ pub fn test_partition_fizzbuzz() { #[multiplatform_test] pub fn test_partition_round() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_partition = source_iter(0..100) -> partition(|v, len| v % len); my_partition[2] -> for_each(|x| println!("{} 2", x)); diff --git a/hydroflow/tests/surface_difference.rs b/hydroflow/tests/surface_difference.rs index 4630a574d245..6b52949fb90a 100644 --- a/hydroflow/tests/surface_difference.rs +++ b/hydroflow/tests/surface_difference.rs @@ -8,7 +8,7 @@ pub fn test_diff_timing() { let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::(); let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { diff = difference() -> for_each(|x| println!("diff: {:?}", x)); poss = source_stream(pos_recv); //-> tee(); @@ -50,7 +50,7 @@ pub fn test_diff_static() { let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { diff = difference::<'tick, 'static>() -> sort() -> for_each(|v| output_send.send(v).unwrap()); poss = source_stream(pos_recv); //-> tee(); @@ -91,7 +91,7 @@ pub fn test_diff_multiset_timing() { let (pos_send, pos_recv) = hydroflow::util::unbounded_channel::(); let (neg_send, neg_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { diff = difference_multiset() -> for_each(|x| println!("diff: {:?}", x)); poss = source_stream(pos_recv); //-> tee(); @@ -133,7 +133,7 @@ pub fn test_diff_multiset_static() { let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { diff = difference_multiset::<'static>() -> sort() -> for_each(|v| output_send.send(v).unwrap()); poss = source_stream(pos_recv); //-> tee(); @@ -179,7 +179,7 @@ pub fn test_diff_multiset_tick_static() { let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { diff = difference_multiset::<'tick, 'static>() -> sort() -> for_each(|v| output_send.send(v).unwrap()); poss = source_stream(pos_recv); //-> tee(); @@ -222,7 +222,7 @@ pub fn test_diff_multiset_static_tick() { let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { diff = difference_multiset::<'static, 'tick>() -> sort() -> for_each(|v| output_send.send(v).unwrap()); poss = source_stream(pos_recv); //-> tee(); diff --git a/hydroflow/tests/surface_fold.rs b/hydroflow/tests/surface_fold.rs index 3c00610e3246..4d6f052734dc 100644 --- a/hydroflow/tests/surface_fold.rs +++ b/hydroflow/tests/surface_fold.rs @@ -2,7 +2,7 @@ use std::collections::{HashMap, HashSet}; use hydroflow::scheduled::ticks::TickInstant; use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] @@ -10,7 +10,7 @@ pub fn test_fold_tick() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::>(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_stream(items_recv) -> fold::<'tick>(Vec::new, |old: &mut Vec, mut x: Vec| { old.append(&mut x); }) -> for_each(|v| result_send.send(v).unwrap()); @@ -56,7 +56,7 @@ pub fn test_fold_static() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::>(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_stream(items_recv) -> fold::<'static>(Vec::new, |old: &mut Vec, mut x: Vec| { old.append(&mut x); }) -> for_each(|v| result_send.send(v).unwrap()); @@ -102,7 +102,7 @@ pub fn test_fold_static_join() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { teed_fold = source_iter(Vec::::new()) -> fold::<'tick>(|| 0, |old: &mut usize, _: usize| { *old += 1; }) -> tee(); @@ -144,7 +144,7 @@ pub fn test_fold_static_join() { pub fn test_fold_flatten() { // test pull let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(u8, u8)>(); - let mut df_pull = hydroflow_syntax! { + let mut df_pull = dfir_syntax! { source_iter([(1,1), (1,2), (2,3), (2,4)]) -> fold::<'tick>(HashMap::::new, |ht: &mut HashMap, t: (u8,u8)| { let e = ht.entry(t.0).or_insert(0); @@ -171,7 +171,7 @@ pub fn test_fold_flatten() { // test push let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(u8, u8)>(); - let mut df_push = hydroflow_syntax! { + let mut df_push = dfir_syntax! { datagen = source_iter([(1,2), (1,2), (2,4), (2,4)]) -> tee(); datagen[0] -> fold::<'tick>(HashMap::::new, |ht: &mut HashMap, t:(u8,u8)| { let e = ht.entry(t.0).or_insert(0); @@ -204,7 +204,7 @@ pub fn test_fold_flatten() { pub fn test_fold_sort() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_stream(items_recv) -> fold::<'tick>(Vec::new, Vec::push) -> flat_map(|mut vec| { vec.sort(); vec }) @@ -254,7 +254,7 @@ pub fn test_fold_sort() { pub fn test_fold_inference() { let (_items_send, items_recv) = hydroflow::util::unbounded_channel::(); - let _ = hydroflow::hydroflow_syntax! { + let _ = hydroflow::dfir_syntax! { source_stream(items_recv) -> fold::<'tick>(|| 0, |old, s| { *old += s.len() }) -> for_each(|_| {}); diff --git a/hydroflow/tests/surface_fold_keyed.rs b/hydroflow/tests/surface_fold_keyed.rs index 18392bc3611b..ff7e1c69c635 100644 --- a/hydroflow/tests/surface_fold_keyed.rs +++ b/hydroflow/tests/surface_fold_keyed.rs @@ -13,7 +13,7 @@ pub fn test_fold_keyed_infer_basic() { let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::<(&'static str, u32)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_iter([ SubordResponse { xid: "123", mtype: 33 }, SubordResponse { xid: "123", mtype: 52 }, @@ -49,7 +49,7 @@ pub fn test_fold_keyed_tick() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::<(u32, Vec)>(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::<(u32, Vec)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_stream(items_recv) -> fold_keyed::<'tick>(Vec::new, |old: &mut Vec, mut x: Vec| old.append(&mut x)) -> for_each(|v| result_send.send(v).unwrap()); @@ -107,7 +107,7 @@ pub fn test_fold_keyed_static() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::<(u32, Vec)>(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::<(u32, Vec)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_stream(items_recv) -> fold_keyed::<'static>(Vec::new, |old: &mut Vec, mut x: Vec| old.append(&mut x)) -> for_each(|v| result_send.send(v).unwrap()); diff --git a/hydroflow/tests/surface_forwardref.rs b/hydroflow/tests/surface_forwardref.rs index c35c14620842..bcfe077b6ae0 100644 --- a/hydroflow/tests/surface_forwardref.rs +++ b/hydroflow/tests/surface_forwardref.rs @@ -1,12 +1,12 @@ use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_forwardref_basic_forward() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> forward_ref; forward_ref = for_each(|v| out_send.send(v).unwrap()); }; @@ -23,7 +23,7 @@ pub fn test_forwardref_basic_forward() { pub fn test_forwardref_basic_backward() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { forward_ref -> for_each(|v| out_send.send(v).unwrap()); forward_ref = source_iter(0..10); }; @@ -40,7 +40,7 @@ pub fn test_forwardref_basic_backward() { pub fn test_forwardref_basic_middle() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> forward_ref; forward_ref -> for_each(|v| out_send.send(v).unwrap()); forward_ref = identity(); diff --git a/hydroflow/tests/surface_join.rs b/hydroflow/tests/surface_join.rs index 5f07620bc77b..f6dc2ec6eca6 100644 --- a/hydroflow/tests/surface_join.rs +++ b/hydroflow/tests/surface_join.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use std::rc::Rc; use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; macro_rules! assert_contains_each_by_tick { @@ -27,7 +27,7 @@ pub fn tick_tick() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> [0]my_join; @@ -52,7 +52,7 @@ pub fn tick_static() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> [0]my_join; @@ -77,7 +77,7 @@ pub fn static_tick() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> [0]my_join; @@ -104,7 +104,7 @@ pub fn static_static() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> [0]my_join; @@ -134,7 +134,7 @@ pub fn replay_static() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> [0]my_join; source_iter([(7, 3), (7, 4)]) -> [1]my_join; my_join = join::<'static, 'static>() diff --git a/hydroflow/tests/surface_join_fused.rs b/hydroflow/tests/surface_join_fused.rs index fc7d5beb8b91..1724e06e5075 100644 --- a/hydroflow/tests/surface_join_fused.rs +++ b/hydroflow/tests/surface_join_fused.rs @@ -4,7 +4,7 @@ use std::rc::Rc; use hydroflow::lattices::set_union::SetUnionSingletonSet; use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use lattices::set_union::SetUnionHashSet; use lattices::Merge; use multiplatform_test::multiplatform_test; @@ -27,7 +27,7 @@ pub fn tick_tick_lhs_blocking_rhs_streaming() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> map(|(k, v)| (k, SetUnionSingletonSet::new_from(v))) -> [0]my_join; @@ -56,7 +56,7 @@ pub fn static_tick_lhs_blocking_rhs_streaming() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> map(|(k, v)| (k, SetUnionSingletonSet::new_from(v))) -> [0]my_join; @@ -95,7 +95,7 @@ pub fn static_static_lhs_blocking_rhs_streaming() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> map(|(k, v)| (k, SetUnionSingletonSet::new_from(v))) -> [0]my_join; @@ -125,7 +125,7 @@ pub fn tick_tick_lhs_streaming_rhs_blocking() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> map(|(k, v)| (k, SetUnionSingletonSet::new_from(v))) -> [1]my_join; @@ -154,7 +154,7 @@ pub fn static_tick_lhs_streaming_rhs_blocking() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> map(|(k, v)| (k, SetUnionSingletonSet::new_from(v))) -> [1]my_join; @@ -193,7 +193,7 @@ pub fn static_static_lhs_streaming_rhs_blocking() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> map(|(k, v)| (k, SetUnionSingletonSet::new_from(v))) -> [1]my_join; @@ -224,7 +224,7 @@ pub fn tick_tick_lhs_fold_rhs_reduce() { let results = Rc::new(RefCell::new(HashMap::>::new())); let results_inner = Rc::clone(&results); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([(7, 1), (7, 2)]) -> map(|(k, v)| (k, SetUnionSingletonSet::new_from(v))) -> [0]my_join; diff --git a/hydroflow/tests/surface_lattice_batch.rs b/hydroflow/tests/surface_lattice_batch.rs index c04bd0d98570..0e5a893ad564 100644 --- a/hydroflow/tests/surface_lattice_batch.rs +++ b/hydroflow/tests/surface_lattice_batch.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use multiplatform_test::multiplatform_test; #[multiplatform_test] @@ -6,7 +6,7 @@ pub fn test_lattice_batch() { type SetUnionHashSet = lattices::set_union::SetUnionHashSet; type SetUnionSingletonSet = lattices::set_union::SetUnionSingletonSet; - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { // Can release in the same tick source_iter([SetUnionSingletonSet::new_from(0), SetUnionSingletonSet::new_from(1)]) -> [input]b1; source_iter([()]) -> defer_tick() -> [signal]b1; diff --git a/hydroflow/tests/surface_lattice_bimorphism.rs b/hydroflow/tests/surface_lattice_bimorphism.rs index 9909bc0832a5..3a998c4ad877 100644 --- a/hydroflow/tests/surface_lattice_bimorphism.rs +++ b/hydroflow/tests/surface_lattice_bimorphism.rs @@ -1,7 +1,7 @@ use std::collections::{HashMap, HashSet}; use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use lattices::ght::lattice::{DeepJoinLatticeBimorphism, GhtBimorphism}; use lattices::ght::GeneralizedHashTrieNode; use lattices::map_union::{KeyedBimorphism, MapUnionHashMap, MapUnionSingletonMap}; @@ -15,7 +15,7 @@ use variadics::CloneVariadic; pub fn test_cartesian_product() { let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { lhs = source_iter(0..3) -> map(SetUnionSingletonSet::new_from) -> state::<'static, SetUnionHashSet>(); @@ -50,7 +50,7 @@ pub fn test_cartesian_product() { pub fn test_cartesian_product_1401() { let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { lhs = source_iter(0..1) -> map(SetUnionSingletonSet::new_from) -> state::<'static, SetUnionHashSet>(); @@ -77,7 +77,7 @@ pub fn test_cartesian_product_1401() { pub fn test_join() { let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { lhs = source_iter([(7, 1), (7, 2)]) -> map(|(k, v)| MapUnionSingletonMap::new_from((k, SetUnionSingletonSet::new_from(v)))) -> state::<'static, MapUnionHashMap>>(); @@ -118,7 +118,7 @@ pub fn test_cartesian_product_tick_state() { let (rhs_send, rhs_recv) = hydroflow::util::unbounded_channel::(); let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<_>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { lhs = source_stream(lhs_recv) -> map(SetUnionSingletonSet::new_from) -> state::<'tick, SetUnionHashSet>(); @@ -176,7 +176,7 @@ fn test_ght_join_bimorphism() { >>::DeepJoinLatticeBimorphism; type MyBim = GhtBimorphism; - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { lhs = source_iter([ var_expr!(123, 2, 5, "hello"), var_expr!(50, 1, 1, "hi"), diff --git a/hydroflow/tests/surface_lattice_bimorphism_persist_insertion.rs b/hydroflow/tests/surface_lattice_bimorphism_persist_insertion.rs index 25186872247b..ffbabac408a2 100644 --- a/hydroflow/tests/surface_lattice_bimorphism_persist_insertion.rs +++ b/hydroflow/tests/surface_lattice_bimorphism_persist_insertion.rs @@ -2,7 +2,7 @@ use std::collections::HashSet; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use lattices::set_union::{CartesianProductBimorphism, SetUnionHashSet, SetUnionSingletonSet}; use multiplatform_test::multiplatform_test; use tokio::sync::mpsc::UnboundedSender; @@ -47,7 +47,7 @@ pub fn test_cartesian_product_multi_tick() { let (rhs_send, rhs_recv) = hydroflow::util::unbounded_channel::<_>(); let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); - let df = hydroflow_syntax! { + let df = dfir_syntax! { lhs = source_stream(lhs_recv) -> map(SetUnionSingletonSet::new_from) -> state::<'static, SetUnionHashSet>(); @@ -73,7 +73,7 @@ pub fn test_cartesian_product_multi_tick_tee() { let (rhs_send, rhs_recv) = hydroflow::util::unbounded_channel::<_>(); let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); - let df = hydroflow_syntax! { + let df = dfir_syntax! { lhs = source_stream(lhs_recv) -> map(SetUnionSingletonSet::new_from) -> state::<'static, SetUnionHashSet>(); @@ -101,7 +101,7 @@ pub fn test_cartesian_product_multi_tick_identity() { let (rhs_send, rhs_recv) = hydroflow::util::unbounded_channel::<_>(); let (out_send, out_recv) = hydroflow::util::unbounded_channel::<_>(); - let df = hydroflow_syntax! { + let df = dfir_syntax! { lhs = source_stream(lhs_recv) -> map(SetUnionSingletonSet::new_from) -> state::<'static, SetUnionHashSet>(); diff --git a/hydroflow/tests/surface_lattice_fold.rs b/hydroflow/tests/surface_lattice_fold.rs index 9cd06ce9dd22..821a18dd1409 100644 --- a/hydroflow/tests/surface_lattice_fold.rs +++ b/hydroflow/tests/surface_lattice_fold.rs @@ -1,10 +1,10 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::{IsTop, Max, Merge}; use hydroflow::util::collect_ready; #[test] fn test_basic() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1,2,3,4,5]) -> map(Max::new) -> lattice_fold::<'static>(|| Max::::new(0)) @@ -16,7 +16,7 @@ fn test_basic() { #[test] fn test_fold_loop() { let (output_send, output_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { start = source_iter([1]) -> map(Max::new) -> folder; @@ -36,7 +36,7 @@ fn test_fold_loop() { #[test] fn test_lattice_fold_loop() { let (output_send, output_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { start = source_iter([1]) -> map(Max::::new) -> folder; diff --git a/hydroflow/tests/surface_lattice_generalized_hash_trie.rs b/hydroflow/tests/surface_lattice_generalized_hash_trie.rs index ece19b084ab9..480243dd44aa 100644 --- a/hydroflow/tests/surface_lattice_generalized_hash_trie.rs +++ b/hydroflow/tests/surface_lattice_generalized_hash_trie.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::ght::lattice::{DeepJoinLatticeBimorphism, GhtBimorphism}; use hydroflow::lattices::ght::GeneralizedHashTrieNode; use hydroflow::lattices::GhtType; @@ -21,7 +21,7 @@ fn test_basic() { merged.insert(i); } println!("merged: {:?}", merged); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(input) -> map(|t| MyGht::new_from(vec![t])) -> lattice_fold::<'static>(MyGht::default) @@ -51,7 +51,7 @@ fn test_join() { >>::DeepJoinLatticeBimorphism; type MyBim = GhtBimorphism; - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { R = source_iter(r) -> map(|t| MyGht::new_from([t])) -> state::(); diff --git a/hydroflow/tests/surface_lattice_join.rs b/hydroflow/tests/surface_lattice_join.rs index 2100a150925c..19b797e95306 100644 --- a/hydroflow/tests/surface_lattice_join.rs +++ b/hydroflow/tests/surface_lattice_join.rs @@ -1,7 +1,7 @@ use std::collections::HashSet; +use dfir_macro::dfir_syntax; use hydroflow::util::collect_ready; -use hydroflow_macro::hydroflow_syntax; use lattices::collections::SingletonMap; use lattices::DeepReveal; use multiplatform_test::multiplatform_test; @@ -10,7 +10,7 @@ use multiplatform_test::multiplatform_test; pub fn test_lattice_join_fused_join_reducing_behavior() { // lattice_fold has the following particular initialization behavior. It uses LatticeFrom to convert the first element into another lattice type to create the accumulator and then it folds the remaining elements into that accumulator. // This initialization style supports things like SetUnionSingletonSet -> SetUnionHashSet. It also helps with things like Min, where there is not obvious default value so you want reduce-like behavior. - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { use lattices::Min; use lattices::Max; @@ -29,7 +29,7 @@ pub fn test_lattice_join_fused_join_reducing_behavior() { #[multiplatform_test] pub fn test_lattice_join_fused_join_set_union() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { use lattices::set_union::SetUnionSingletonSet; use lattices::set_union::SetUnionHashSet; @@ -46,7 +46,7 @@ pub fn test_lattice_join_fused_join_set_union() { #[multiplatform_test] pub fn test_lattice_join_fused_join_map_union() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { use lattices::map_union::MapUnionSingletonMap; use lattices::map_union::MapUnionHashMap; use hydroflow::lattices::Min; @@ -81,7 +81,7 @@ pub fn test_lattice_join_fused_join() { let (lhs_tx, lhs_rx) = hydroflow::util::unbounded_channel::<(usize, Max)>(); let (rhs_tx, rhs_rx) = hydroflow::util::unbounded_channel::<(usize, Max)>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_join = _lattice_join_fused_join::<'static, 'tick, Max, Max>(); source_stream(lhs_rx) -> [0]my_join; @@ -120,7 +120,7 @@ pub fn test_lattice_join_fused_join() { let (lhs_tx, lhs_rx) = hydroflow::util::unbounded_channel::<(usize, Max)>(); let (rhs_tx, rhs_rx) = hydroflow::util::unbounded_channel::<(usize, Max)>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_join = _lattice_join_fused_join::<'static, 'static, Max, Max>(); source_stream(lhs_rx) -> [0]my_join; diff --git a/hydroflow/tests/surface_lattice_reduce.rs b/hydroflow/tests/surface_lattice_reduce.rs index 16babce11331..5824f0f86613 100644 --- a/hydroflow/tests/surface_lattice_reduce.rs +++ b/hydroflow/tests/surface_lattice_reduce.rs @@ -1,9 +1,9 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::lattices::Max; #[test] fn test_basic() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1,2,3,4,5]) -> map(Max::new) -> lattice_reduce() diff --git a/hydroflow/tests/surface_loop.rs b/hydroflow/tests/surface_loop.rs index ec026fd9d8a3..3bbf27ad8046 100644 --- a/hydroflow/tests/surface_loop.rs +++ b/hydroflow/tests/surface_loop.rs @@ -1,10 +1,10 @@ use hydroflow::util::iter_batches_stream; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_flo_syntax() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { users = source_iter(["alice", "bob"]); messages = source_stream(iter_batches_stream(0..12, 3)); loop { @@ -20,7 +20,7 @@ pub fn test_flo_syntax() { #[multiplatform_test] pub fn test_flo_nested() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { users = source_iter(["alice", "bob"]); messages = source_stream(iter_batches_stream(0..12, 3)); loop { diff --git a/hydroflow/tests/surface_multiset_delta.rs b/hydroflow/tests/surface_multiset_delta.rs index feff9c813996..00b63326bb0a 100644 --- a/hydroflow/tests/surface_multiset_delta.rs +++ b/hydroflow/tests/surface_multiset_delta.rs @@ -1,5 +1,5 @@ use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] @@ -7,7 +7,7 @@ pub fn test_multiset_delta() { let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_stream(input_recv) -> multiset_delta() -> for_each(|x| result_send.send(x).unwrap()); @@ -33,7 +33,7 @@ pub fn test_multiset_delta() { pub fn test_persist_multiset_delta() { let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { source_stream(input_recv) -> persist::<'static>() -> multiset_delta() @@ -56,7 +56,7 @@ pub fn test_multiset_delta_2() { let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_stream(input_recv) -> multiset_delta() -> for_each(|x| result_send.send(x).unwrap()); @@ -83,7 +83,7 @@ fn test_chat_app_replay() { let (messages_send, messages) = hydroflow::util::unbounded_channel::(); let (out, mut out_recv) = hydroflow::util::unbounded_channel::<(u32, String)>(); - let mut chat_server = hydroflow_syntax! { + let mut chat_server = dfir_syntax! { users = source_stream(users) -> persist::<'static>(); messages = source_stream(messages) -> persist::<'static>(); users -> [0]crossed; @@ -138,7 +138,7 @@ fn test_chat_app_replay_manual() { let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(u32, String)>(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::<(u32, String)>(); - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { source_stream(input_recv) -> multiset_delta() -> for_each(|x| result_send.send(x).unwrap()); diff --git a/hydroflow/tests/surface_parser.rs b/hydroflow/tests/surface_parser.rs index ad7a137dfd50..ea1b7d8579ea 100644 --- a/hydroflow/tests/surface_parser.rs +++ b/hydroflow/tests/surface_parser.rs @@ -1,9 +1,9 @@ -use hydroflow::hydroflow_parser; +use hydroflow::dfir_parser; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_parser_basic() { - hydroflow_parser! { + dfir_parser! { reached_vertices = (union() -> map(|v| (v, ()))); (source_iter([0]) -> [0]reached_vertices); @@ -15,7 +15,7 @@ pub fn test_parser_basic() { (my_join[1] -> for_each(|x| println!("Reached: {}", x))); } - hydroflow_parser! { + dfir_parser! { shuffle = (union() -> tee()); (shuffle[0] -> [0]shuffle); (shuffle[1] -> [1]shuffle); @@ -23,12 +23,12 @@ pub fn test_parser_basic() { (shuffle[3] -> [3]shuffle); } - hydroflow_parser! { + dfir_parser! { x = (map(a) -> map(b)); (x -> x); } - hydroflow_parser! { + dfir_parser! { a = map(a); // 0 b = (union() -> tee()); // 1 c = union(); // 2 @@ -64,21 +64,21 @@ pub fn test_parser_basic() { #[multiplatform_test] pub fn test_parser_port_reassign() { - hydroflow_parser! { + dfir_parser! { id = identity(); inn = id; out = id; out -> inn; }; - hydroflow_parser! { + dfir_parser! { id = identity(); inn = id; out = id; out[0] -> [0]inn; }; - hydroflow_parser! { + dfir_parser! { id = identity(); inn = id; out = id; @@ -88,7 +88,7 @@ pub fn test_parser_port_reassign() { #[multiplatform_test] pub fn test_parser_port_naked_basic() { - hydroflow_parser! { + dfir_parser! { id = identity(); inn = [0]id; out = id[0]; @@ -98,7 +98,7 @@ pub fn test_parser_port_naked_basic() { #[multiplatform_test] pub fn test_parser_port_naked_knot() { - hydroflow_parser! { + dfir_parser! { pivot = union() -> tee(); inn_0 = [0]pivot; @@ -111,7 +111,7 @@ pub fn test_parser_port_naked_knot() { out_1 -> inn_1; }; - hydroflow_parser! { + dfir_parser! { pivot = union() -> tee(); x_0 = [0]pivot[0]; @@ -121,7 +121,7 @@ pub fn test_parser_port_naked_knot() { x_1 -> x_1; }; - hydroflow_parser! { + dfir_parser! { pivot = union() -> tee(); x_0 = pivot[0]; @@ -131,7 +131,7 @@ pub fn test_parser_port_naked_knot() { x_1 -> [1]x_1; }; - hydroflow_parser! { + dfir_parser! { pivot = union() -> tee(); x_0 = pivot; @@ -144,7 +144,7 @@ pub fn test_parser_port_naked_knot() { #[multiplatform_test] pub fn test_parser_forwardref_basic() { - hydroflow_parser! { + dfir_parser! { source_iter(0..10) -> c; c = for_each(std::mem::drop); }; @@ -152,7 +152,7 @@ pub fn test_parser_forwardref_basic() { #[multiplatform_test] pub fn test_parser_forwardref_chain() { - hydroflow_parser! { + dfir_parser! { source_iter(0..10) -> c; c = d; d = e; @@ -168,21 +168,21 @@ pub fn test_parser_forwardref_chain() { #[multiplatform_test] pub fn test_parser_forwardref_cycle_right() { - hydroflow_parser! { + dfir_parser! { c = identity() -> c; }; } #[multiplatform_test] pub fn test_parser_forwardref_cycle_left() { - hydroflow_parser! { + dfir_parser! { c = c -> identity(); }; } #[multiplatform_test] pub fn test_parser_forwardref_mutual() { - hydroflow_parser! { + dfir_parser! { a = identity() -> b; b = identity() -> a; }; @@ -193,14 +193,14 @@ pub fn test_parser_forwardref_degen() { // TODO(mingwei): // This works because no links are created, so it does nothing. // But it would obviously be a mistake to write seriously... - hydroflow_parser! { + dfir_parser! { c = c; }; } #[multiplatform_test] pub fn test_parser_forwardref_tee() { - hydroflow_parser! { + dfir_parser! { c = c -> tee(); c -> for_each(std::mem::drop); }; @@ -208,7 +208,7 @@ pub fn test_parser_forwardref_tee() { #[multiplatform_test] pub fn test_parser_forwardref_union() { - hydroflow_parser! { + dfir_parser! { c = union() -> c; source_iter(0..10) -> c; }; @@ -216,7 +216,7 @@ pub fn test_parser_forwardref_union() { #[multiplatform_test] pub fn test_parser_forwardref_knot() { - hydroflow_parser! { + dfir_parser! { inn_0 = [0]pivot; inn_1 = [1]pivot; @@ -232,14 +232,14 @@ pub fn test_parser_forwardref_knot() { #[multiplatform_test] pub fn test_parser_forwardref_self_middle() { - hydroflow_parser! { + dfir_parser! { self_ref = map(|a: usize| a) -> [0]self_ref[1] -> map(|b: usize| b); }; } #[multiplatform_test] pub fn test_flo_syntax() { - hydroflow_parser! { + dfir_parser! { users = source_stream(0..); messages = source_stream(0..); loop { diff --git a/hydroflow/tests/surface_persist.rs b/hydroflow/tests/surface_persist.rs index ca8b2a4eee95..16158786da21 100644 --- a/hydroflow/tests/surface_persist.rs +++ b/hydroflow/tests/surface_persist.rs @@ -3,14 +3,14 @@ use std::collections::HashSet; use hydroflow::compiled::pull::HalfMultisetJoinState; use hydroflow::scheduled::ticks::TickInstant; use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_persist_basic() { let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { source_iter([1]) -> persist::<'static>() -> persist::<'static>() @@ -33,7 +33,7 @@ pub fn test_persist_basic() { pub fn test_persist_pull() { let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { // Structured to ensure `persist::<'static>()` is pull-based. source_iter([1]) -> persist::<'static>() -> m0; null() -> m0; @@ -59,7 +59,7 @@ pub fn test_persist_pull() { pub fn test_persist_push() { let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { t0 = source_iter([1]) -> persist::<'static>() -> tee(); t0 -> null(); t1 = t0 -> persist::<'static>() -> tee(); @@ -81,7 +81,7 @@ pub fn test_persist_push() { #[multiplatform_test] pub fn test_persist_join() { let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(&str, &str)>(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { source_iter([("hello", "world")]) -> persist::<'static>() -> [0]my_join; source_stream(input_recv) -> persist::<'static>() -> [1]my_join; my_join = join::<'tick>() -> for_each(|(k, (v1, v2))| println!("({}, ({}, {}))", k, v1, v2)); @@ -98,7 +98,7 @@ pub fn test_persist_replay_join() { let (other_input_send, other_input) = hydroflow::util::unbounded_channel::(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::<(u32, u32)>(); - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { source_stream(persist_input) -> persist::<'static>() -> fold::<'tick>(|| 0, |a: &mut _, b| *a += b) @@ -131,7 +131,7 @@ pub fn test_persist_double_handoff() { let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); let (input_2_send, input_2_recv) = hydroflow::util::unbounded_channel::(); let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { teed_first_sg = source_stream(input_2_recv) -> tee(); teed_first_sg -> [0] joined_second_sg; teed_first_sg -> [1] joined_second_sg; @@ -160,7 +160,7 @@ pub fn test_persist_single_handoff() { let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); let (input_2_send, input_2_recv) = hydroflow::util::unbounded_channel::(); let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { teed_first_sg = source_stream(input_2_recv) -> tee(); teed_first_sg [0] -> null(); teed_first_sg [1] -> joined_second_sg; @@ -190,7 +190,7 @@ pub fn test_persist_single_subgraph() { let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); let (input_2_send, input_2_recv) = hydroflow::util::unbounded_channel::(); let (output_send, mut output_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut flow = hydroflow::hydroflow_syntax! { + let mut flow = hydroflow::dfir_syntax! { source_stream(input_2_recv) -> joined_second_sg; source_stream(input_recv) -> persist::<'static>() @@ -216,7 +216,7 @@ pub fn test_persist() { let (pull_tx, mut pull_rx) = hydroflow::util::unbounded_channel::(); let (push_tx, mut push_rx) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_tee = source_iter([1, 2, 3]) -> persist::<'static>() // pull @@ -243,7 +243,7 @@ pub fn test_persist_mut() { let (pull_tx, mut pull_rx) = hydroflow::util::unbounded_channel::(); let (push_tx, mut push_rx) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_tee = source_iter([Persist(1), Persist(2), Persist(3), Persist(4), Delete(2)]) -> persist_mut::<'static>() // pull @@ -271,7 +271,7 @@ pub fn test_persist_mut_keyed() { let (pull_tx, mut pull_rx) = hydroflow::util::unbounded_channel::(); let (push_tx, mut push_rx) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_tee = source_iter([Persist(1, 1), Persist(2, 2), Persist(3, 3), Persist(4, 4), Delete(2)]) -> persist_mut_keyed::<'static>() // pull diff --git a/hydroflow/tests/surface_python.rs b/hydroflow/tests/surface_python.rs index 30ce37746aa6..da533c765be7 100644 --- a/hydroflow/tests/surface_python.rs +++ b/hydroflow/tests/surface_python.rs @@ -1,12 +1,12 @@ #![cfg(feature = "python")] -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; use pyo3::prelude::*; #[multiplatform_test(test)] pub fn test_python_basic() { - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { source_iter(0..10) -> map(|x| (x,)) -> py_udf(" @@ -28,7 +28,7 @@ def fib(n): #[multiplatform_test(test)] pub fn test_python_too_many_args() { - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { source_iter([(5,)]) -> py_udf(" def add(a, b): @@ -45,7 +45,7 @@ def add(a, b): #[multiplatform_test(test)] pub fn test_python_two_args() { - let mut hf = hydroflow_syntax! { + let mut hf = dfir_syntax! { source_iter([(5,1)]) -> py_udf(" def add(a, b): diff --git a/hydroflow/tests/surface_reduce.rs b/hydroflow/tests/surface_reduce.rs index e4bb460092a4..bd4316018b7b 100644 --- a/hydroflow/tests/surface_reduce.rs +++ b/hydroflow/tests/surface_reduce.rs @@ -1,5 +1,5 @@ use hydroflow::scheduled::ticks::TickInstant; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] @@ -7,7 +7,7 @@ pub fn test_reduce_tick() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_stream(items_recv) -> reduce::<'tick>(|acc: &mut u32, next: u32| *acc += next) -> for_each(|v| result_send.send(v).unwrap()); @@ -50,7 +50,7 @@ pub fn test_reduce_static() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::(); let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { source_stream(items_recv) -> reduce::<'static>(|acc: &mut u32, next: u32| *acc += next) -> for_each(|v| result_send.send(v).unwrap()); @@ -92,7 +92,7 @@ pub fn test_reduce_static() { pub fn test_reduce_sum() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_stream(items_recv) -> reduce(|a: &mut _, b| *a += b) -> for_each(|v| print!("{:?}", v)); @@ -142,7 +142,7 @@ pub fn test_reduce() { // An edge in the input data = a pair of `usize` vertex IDs. let (pairs_send, pairs_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { reached_vertices = union() -> map(|v| (v, ())); source_iter(vec![0]) -> [0]reached_vertices; diff --git a/hydroflow/tests/surface_scheduling.rs b/hydroflow/tests/surface_scheduling.rs index ef7a8f72dcf8..bf2e8ea234aa 100644 --- a/hydroflow/tests/surface_scheduling.rs +++ b/hydroflow/tests/surface_scheduling.rs @@ -2,7 +2,7 @@ use std::error::Error; use std::time::Duration; use hydroflow::scheduled::ticks::{TickDuration, TickInstant}; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax, rassert_eq}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax, rassert_eq}; use multiplatform_test::multiplatform_test; use tokio::time::timeout; @@ -10,7 +10,7 @@ use tokio::time::timeout; pub fn test_stratum_loop() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([TickInstant::new(0)]) -> union_tee; union_tee = union() -> tee(); union_tee -> map(|n| n + TickDuration::SINGLE_TICK) -> filter(|&n| n < TickInstant::new(10)) -> next_stratum() -> defer_tick() -> union_tee; @@ -44,7 +44,7 @@ pub fn test_stratum_loop() { pub fn test_tick_loop() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([TickInstant::new(0)]) -> union_tee; union_tee = union() -> tee(); union_tee -> map(|n| n + TickDuration::SINGLE_TICK) -> filter(|&n| n < TickInstant::new(10)) -> defer_tick() -> union_tee; @@ -78,7 +78,7 @@ pub fn test_tick_loop() { async fn test_persist_stratum_run_available() -> Result<(), Box> { let (out_send, out_recv) = hydroflow::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { a = source_iter([0]) -> persist::<'static>() -> next_stratum() @@ -102,7 +102,7 @@ async fn test_persist_stratum_run_available() -> Result<(), Box> { async fn test_persist_stratum_run_async() -> Result<(), Box> { let (out_send, out_recv) = hydroflow::util::unbounded_channel(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([0]) -> persist::<'static>() -> next_stratum() @@ -127,7 +127,7 @@ async fn test_persist_stratum_run_async() -> Result<(), Box> { #[multiplatform_test(test, wasm, env_tracing)] pub fn test_issue_800_1050_persist() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { in1 = source_iter(0..10) -> map(|i| (i, i)); in1 -> persist::<'static>() -> my_union_tee; @@ -141,7 +141,7 @@ pub fn test_issue_800_1050_persist() { #[multiplatform_test(test, wasm, env_tracing)] pub fn test_issue_800_1050_fold_keyed() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { in1 = source_iter(0..10) -> map(|i| (i, i)); in1 -> fold_keyed::<'static>(Vec::new, Vec::push) -> my_union_tee; @@ -155,7 +155,7 @@ pub fn test_issue_800_1050_fold_keyed() { #[multiplatform_test(test, wasm, env_tracing)] pub fn test_issue_800_1050_reduce_keyed() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { in1 = source_iter(0..10) -> map(|i| (i, i)); in1 -> reduce_keyed::<'static>(std::ops::AddAssign::add_assign) -> my_union_tee; @@ -169,7 +169,7 @@ pub fn test_issue_800_1050_reduce_keyed() { #[multiplatform_test(hydroflow, env_tracing)] async fn test_nospin_issue_961() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1]) -> next_stratum() -> persist::<'static>() @@ -185,7 +185,7 @@ async fn test_nospin_issue_961() { #[multiplatform_test(hydroflow, env_tracing)] async fn test_nospin_issue_961_complicated() { - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1]) -> items; items = union(); diff --git a/hydroflow/tests/surface_singleton.rs b/hydroflow/tests/surface_singleton.rs index eaa42dad5603..1f368e0e56de 100644 --- a/hydroflow/tests/surface_singleton.rs +++ b/hydroflow/tests/surface_singleton.rs @@ -10,7 +10,7 @@ pub fn test_state() { hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { stream1 = source_iter(1..=10); stream2 = source_iter(3..=5) -> map(Max::new); max_of_stream2 = stream2 -> state::<'static, Max<_>>(); @@ -71,7 +71,7 @@ pub fn test_state() { /// Just tests that the codegen is valid. #[multiplatform_test] pub fn test_state_unused() { - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { stream2 = source_iter(15..=25) -> map(Max::new); max_of_stream2 = stream2 -> state::<'static, Max<_>>(); }; @@ -86,7 +86,7 @@ pub fn test_state_unused() { pub fn test_state_tick() { let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { stream2 = source_stream(input_recv) -> map(Max::new); max_of_stream2 = stream2 -> state::<'tick, Max<_>>(); @@ -121,7 +121,7 @@ pub fn test_fold_cross() { hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { stream1 = source_iter(1..=10); stream2 = source_iter(3..=5) -> map(Max::new); max_of_stream2 = stream2 -> lattice_reduce() -> tee(); @@ -170,7 +170,7 @@ pub fn test_fold_singleton() { hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { stream1 = source_iter(1..=10); stream2 = source_iter(3..=5); max_of_stream2 = stream2 -> fold(|| 0, |a, b| *a = std::cmp::max(*a, b)); @@ -213,7 +213,7 @@ pub fn test_fold_singleton_push() { let (filter_send, mut filter_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { stream1 = source_iter(1..=10); stream2 = source_iter(3..=5); max_of_stream2 = stream2 -> fold(|| 0, |a, b| *a = std::cmp::max(*a, b)); @@ -250,7 +250,7 @@ pub fn test_reduce_singleton() { hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { stream1 = source_iter(1..=10); stream2 = source_iter(3..=5); max_of_stream2 = stream2 -> reduce(|a, b| *a = std::cmp::max(*a, b)); @@ -294,7 +294,7 @@ pub fn test_reduce_singleton_push() { let (filter_send, mut filter_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { stream1 = source_iter(1..=10); stream2 = source_iter(3..=5); max_of_stream2 = stream2 -> reduce(|a, b| *a = std::cmp::max(*a, b)); @@ -330,7 +330,7 @@ pub fn test_scheduling() { let (inn_send, inn_recv) = hydroflow::util::unbounded_channel::(); let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { stream1 = source_iter(1..=10); stream2 = source_stream(inn_recv); max_of_stream2 = stream2 -> fold(|| 0, |a, b| *a = std::cmp::max(*a, b)); @@ -376,7 +376,7 @@ pub fn test_multi_tick() { hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); let (max_send, mut max_recv) = hydroflow::util::unbounded_channel::<(TickInstant, usize)>(); - let mut df = hydroflow::hydroflow_syntax! { + let mut df = hydroflow::dfir_syntax! { stream1 = source_iter(1..=10); stream2 = source_iter(3..=5) -> map(Max::new); max_of_stream2 = stream2 -> state::<'static, Max<_>>(); diff --git a/hydroflow/tests/surface_state_scheduling.rs b/hydroflow/tests/surface_state_scheduling.rs index e89eb2963057..3c67fcd6b807 100644 --- a/hydroflow/tests/surface_state_scheduling.rs +++ b/hydroflow/tests/surface_state_scheduling.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::ticks::TickInstant; use hydroflow::util::collect_ready; use multiplatform_test::multiplatform_test; @@ -7,7 +7,7 @@ use multiplatform_test::multiplatform_test; pub fn test_repeat_iter() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1]) -> persist::<'static>() -> for_each(|v| out_send.send(v).unwrap()); }; assert_eq!( @@ -39,7 +39,7 @@ pub fn test_repeat_iter() { pub fn test_fold_tick() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1]) -> fold::<'tick>(|| 0, |accum: &mut _, elem| *accum += elem) -> for_each(|v| out_send.send(v).unwrap()); }; assert_eq!( @@ -71,7 +71,7 @@ pub fn test_fold_tick() { pub fn test_fold_static() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1]) -> fold::<'static>(|| 0, |accum: &mut _, elem| *accum += elem) -> for_each(|v| out_send.send(v).unwrap()); }; assert_eq!( @@ -103,7 +103,7 @@ pub fn test_fold_static() { pub fn test_reduce_tick() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1]) -> reduce::<'tick>(|a: &mut _, b| *a += b) -> for_each(|v| out_send.send(v).unwrap()); }; assert_eq!( @@ -135,7 +135,7 @@ pub fn test_reduce_tick() { pub fn test_reduce_static() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([1]) -> reduce::<'static>(|a: &mut _, b| *a += b) -> for_each(|v| out_send.send(v).unwrap()); }; assert_eq!( @@ -167,7 +167,7 @@ pub fn test_reduce_static() { pub fn test_fold_keyed_tick() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(char, usize)>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([('a', 1), ('a', 2)]) -> fold_keyed::<'tick>(|| 0, |acc: &mut usize, item| { *acc += item; }) -> for_each(|v| out_send.send(v).unwrap()); }; assert_eq!( @@ -199,7 +199,7 @@ pub fn test_fold_keyed_tick() { pub fn test_fold_keyed_static() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::<(char, usize)>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter([('a', 1), ('a', 2)]) -> fold_keyed::<'static>(|| 0, |acc: &mut usize, item| { *acc += item; }) -> for_each(|v| out_send.send(v).unwrap()); }; assert_eq!( @@ -237,7 +237,7 @@ pub fn test_resume_external_event() { let (in_send, in_recv) = hydroflow::util::unbounded_channel::(); let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_stream(in_recv) -> fold::<'static>(|| 0, |a: &mut _, b| *a += b) -> for_each(|v| out_send.send(v).unwrap()); }; diff --git a/hydroflow/tests/surface_stratum.rs b/hydroflow/tests/surface_stratum.rs index 91d88d9d4fb7..79a9678484d2 100644 --- a/hydroflow/tests/surface_stratum.rs +++ b/hydroflow/tests/surface_stratum.rs @@ -3,7 +3,7 @@ use std::rc::Rc; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::multiset::HashMultiSet; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; use tokio::sync::mpsc::error::SendError; @@ -11,7 +11,7 @@ use tokio::sync::mpsc::error::SendError; // /// Doesn't compile due to not knowing what type flows through the empty loop. // #[test] // pub fn test_loop() { -// let mut df = hydroflow_syntax! { +// let mut df = dfir_syntax! { // a = identity::(); // a -> a; // }; @@ -23,7 +23,7 @@ pub fn test_difference_a() { let output = >>>::default(); let output_inner = Rc::clone(&output); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { a = difference(); source_iter([1, 2, 3, 4]) -> [pos]a; source_iter([1, 3, 5, 7]) -> [neg]a; @@ -44,7 +44,7 @@ pub fn test_difference_b() -> Result<(), SendError<&'static str>> { let output = >>>::default(); let output_inner = Rc::clone(&output); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { a = difference(); source_stream(inp_recv) -> [pos]a; b = a -> tee(); @@ -81,7 +81,7 @@ pub fn test_tick_loop_1() { // Without `defer_tick()` this would be "unsafe" although legal. // E.g. it would spin forever in a single infinite tick/tick. - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { a = union() -> tee(); source_iter([1, 3]) -> [0]a; a[0] -> defer_tick() -> map(|x| 2 * x) -> [1]a; @@ -107,7 +107,7 @@ pub fn test_tick_loop_2() { let output = >>>::default(); let output_inner = Rc::clone(&output); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { a = union() -> tee(); source_iter([1, 3]) -> [0]a; a[0] -> defer_tick() -> defer_tick() -> map(|x| 2 * x) -> [1]a; @@ -136,7 +136,7 @@ pub fn test_tick_loop_3() { let output = >>>::default(); let output_inner = Rc::clone(&output); - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { a = union() -> tee(); source_iter([1, 3]) -> [0]a; a[0] -> defer_tick() -> defer_tick() -> defer_tick() -> map(|x| 2 * x) -> [1]a; @@ -168,7 +168,7 @@ pub fn test_surface_syntax_graph_unreachability() { let (pairs_send, pairs_recv) = hydroflow::util::unbounded_channel::<(usize, usize)>(); #[expect(clippy::map_identity, reason = "stratification topology testing")] - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { reached_vertices = union() -> map(|v| (v, ())); source_iter(vec![0]) -> [0]reached_vertices; @@ -210,7 +210,7 @@ pub fn test_subgraph_stratum_consolidation() { // Bunch of triangles generate consecutive subgraphs, but since there are // no negative edges they can all be in the same stratum. - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { a = union() -> tee(); b = union() -> tee(); c = union() -> tee(); @@ -233,7 +233,7 @@ pub fn test_defer_lazy() { let output_inner = Rc::clone(&output); // Without `defer()` this would spin forever with run_available(). - let mut df: Hydroflow = hydroflow_syntax! { + let mut df: Hydroflow = dfir_syntax! { a = union() -> tee(); source_iter([1, 3]) -> [0]a; a[0] -> defer_tick_lazy() -> map(|x| 2 * x) -> [1]a; diff --git a/hydroflow/tests/surface_unique.rs b/hydroflow/tests/surface_unique.rs index 5aa32c08590f..d2a4553f9045 100644 --- a/hydroflow/tests/surface_unique.rs +++ b/hydroflow/tests/surface_unique.rs @@ -1,12 +1,12 @@ use hydroflow::util::collect_ready; -use hydroflow::{assert_graphvis_snapshots, hydroflow_syntax}; +use hydroflow::{assert_graphvis_snapshots, dfir_syntax}; use multiplatform_test::multiplatform_test; #[multiplatform_test] pub fn test_unique() { let (items_send, items_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_stream(items_recv) -> unique() -> for_each(|v| print!("{:?}, ", v)); @@ -37,7 +37,7 @@ pub fn test_unique() { pub fn test_unique_tick_pull() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> persist::<'static>() -> m1; source_iter(5..15) -> persist::<'static>() -> m1; m1 = union() -> unique::<'tick>() -> m2; @@ -60,7 +60,7 @@ pub fn test_unique_tick_pull() { pub fn test_unique_static_pull() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> persist::<'static>() -> m1; source_iter(5..15) -> persist::<'static>() -> m1; m1 = union() -> unique::<'static>() -> m2; @@ -83,7 +83,7 @@ pub fn test_unique_static_pull() { pub fn test_unique_tick_push() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> persist::<'static>() -> pivot; source_iter(5..15) -> persist::<'static>() -> pivot; pivot = union() -> tee(); @@ -106,7 +106,7 @@ pub fn test_unique_tick_push() { pub fn test_unique_static_push() { let (out_send, mut out_recv) = hydroflow::util::unbounded_channel::(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..10) -> persist::<'static>() -> pivot; source_iter(5..15) -> persist::<'static>() -> pivot; pivot = union() -> tee(); diff --git a/hydroflow/tests/surface_zip_unzip.rs b/hydroflow/tests/surface_zip_unzip.rs index b79146fae105..5a2190c3969a 100644 --- a/hydroflow/tests/surface_zip_unzip.rs +++ b/hydroflow/tests/surface_zip_unzip.rs @@ -1,4 +1,4 @@ -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::collect_ready; use multiplatform_test::multiplatform_test; @@ -7,7 +7,7 @@ pub fn test_zip_basic() { let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::<(usize, &'static str)>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..5) -> [0]my_zip; source_iter(["Hello", "World"]) -> [1]my_zip; my_zip = zip() -> for_each(|pair| result_send.send(pair).unwrap()); @@ -22,7 +22,7 @@ pub fn test_zip_basic() { pub fn test_zip_loop() { let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::<(char, usize)>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter("Hello World".chars()) -> [0]my_zip; source_iter(0..5) -> rhs; @@ -60,7 +60,7 @@ pub fn test_zip_longest_basic() { let (result_send, mut result_recv) = hydroflow::util::unbounded_channel::>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { source_iter(0..5) -> [0]my_zip_longest; source_iter(["Hello", "World"]) -> [1]my_zip_longest; my_zip_longest = zip_longest() -> for_each(|pair| result_send.send(pair).unwrap()); @@ -84,7 +84,7 @@ pub fn test_zip_longest_basic() { pub fn test_unzip_basic() { let (send0, mut recv0) = hydroflow::util::unbounded_channel::<&'static str>(); let (send1, mut recv1) = hydroflow::util::unbounded_channel::<&'static str>(); - let mut df = hydroflow_syntax! { + let mut df = dfir_syntax! { my_unzip = source_iter(vec![("Hello", "Foo"), ("World", "Bar")]) -> unzip(); my_unzip[0] -> for_each(|v| send0.send(v).unwrap()); my_unzip[1] -> for_each(|v| send1.send(v).unwrap()); diff --git a/hydroflow_lang/build.rs b/hydroflow_lang/build.rs index fe39425917ac..e90e9fc80203 100644 --- a/hydroflow_lang/build.rs +++ b/hydroflow_lang/build.rs @@ -134,7 +134,7 @@ const DOCTEST_HYDROFLOW_PREFIX: &str = "\ # { # let __rt = ::hydroflow::tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap(); # __rt.block_on(async { ::hydroflow::tokio::task::LocalSet::new().run_until(async { -# let mut __hf = ::hydroflow::hydroflow_syntax! {"; +# let mut __hf = ::hydroflow::dfir_syntax! {"; const DOCTEST_HYDROFLOW_SUFFIX: &str = "\ # }; # __hf.run_available(); diff --git a/hydroflow_lang/src/graph/ops/cross_join.rs b/hydroflow_lang/src/graph/ops/cross_join.rs index c22d0225bc7a..f8248bc251c5 100644 --- a/hydroflow_lang/src/graph/ops/cross_join.rs +++ b/hydroflow_lang/src/graph/ops/cross_join.rs @@ -19,7 +19,7 @@ use super::{OperatorCategory, OperatorConstraints, WriteContextArgs, RANGE_1}; /// /// ```rustbook /// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<&str>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// my_join = cross_join::<'tick>(); /// source_iter(["hello", "bye"]) -> [0]my_join; /// source_stream(input_recv) -> [1]my_join; diff --git a/hydroflow_lang/src/graph/ops/defer_tick.rs b/hydroflow_lang/src/graph/ops/defer_tick.rs index 42c3d92ba8d8..81d35354a470 100644 --- a/hydroflow_lang/src/graph/ops/defer_tick.rs +++ b/hydroflow_lang/src/graph/ops/defer_tick.rs @@ -16,7 +16,7 @@ use super::{ /// /// ```rustbook /// pub fn main() { -/// let mut df = hydroflow::hydroflow_syntax! { +/// let mut df = hydroflow::dfir_syntax! { /// source_iter(vec!(true)) /// -> state; /// state = union() @@ -40,7 +40,7 @@ use super::{ /// ```rustbook /// // Outputs 1 2 3 4 5 6 (on separate lines). /// let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// inp = source_stream(input_recv) -> tee(); /// inp -> [pos]diff; /// inp -> defer_tick() -> [neg]diff; diff --git a/hydroflow_lang/src/graph/ops/demux_enum.rs b/hydroflow_lang/src/graph/ops/demux_enum.rs index 8b612c243539..06c53927e2ca 100644 --- a/hydroflow_lang/src/graph/ops/demux_enum.rs +++ b/hydroflow_lang/src/graph/ops/demux_enum.rs @@ -23,7 +23,7 @@ use crate::graph::change_spans; /// Triangle { w: f64, h: f64 } /// } /// -/// let mut df = hydroflow_syntax! { +/// let mut df = dfir_syntax! { /// my_demux = source_iter([ /// Shape::Square(9.0), /// Shape::Rectangle(10.0, 8.0), diff --git a/hydroflow_lang/src/graph/ops/dest_sink.rs b/hydroflow_lang/src/graph/ops/dest_sink.rs index ee2f5b38d610..2312486d5e2f 100644 --- a/hydroflow_lang/src/graph/ops/dest_sink.rs +++ b/hydroflow_lang/src/graph/ops/dest_sink.rs @@ -25,7 +25,7 @@ use super::{ /// // `PollSender` adapts the send half of the bounded channel into a `Sink`. /// let send = tokio_util::sync::PollSender::new(send); /// -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_iter(0..10) -> dest_sink(send); /// }; /// // Call `run_async()` to allow async events to propagate, run for one second. @@ -66,7 +66,7 @@ use super::{ /// // Now instead handle discrete byte strings by length-encoding them. /// let sink = tokio_util::codec::FramedWrite::new(asyncwrite, tokio_util::codec::BytesCodec::new()); /// -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_iter([ /// Bytes::from_static(b"hello"), /// Bytes::from_static(b"world"), diff --git a/hydroflow_lang/src/graph/ops/dest_sink_serde.rs b/hydroflow_lang/src/graph/ops/dest_sink_serde.rs index 78b8a7ceb5fb..fd8ef50749d5 100644 --- a/hydroflow_lang/src/graph/ops/dest_sink_serde.rs +++ b/hydroflow_lang/src/graph/ops/dest_sink_serde.rs @@ -16,7 +16,7 @@ use super::{ /// let addr = hydroflow::util::ipv4_resolve("localhost:9000".into()).unwrap(); /// let (outbound, inbound, _) = hydroflow::util::bind_udp_bytes(addr).await; /// let remote = hydroflow::util::ipv4_resolve("localhost:9001".into()).unwrap(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_iter(vec![("hello".to_string(), 1), ("world".to_string(), 2)]) /// -> map (|m| (m, remote)) -> dest_sink_serde(outbound); /// }; diff --git a/hydroflow_lang/src/graph/ops/fold_keyed.rs b/hydroflow_lang/src/graph/ops/fold_keyed.rs index f91e3d2deadc..4d2d6f885c8f 100644 --- a/hydroflow_lang/src/graph/ops/fold_keyed.rs +++ b/hydroflow_lang/src/graph/ops/fold_keyed.rs @@ -46,7 +46,7 @@ use super::{ /// Example using `'tick` persistence: /// ```rustbook /// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(&str, &str)>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_stream(input_recv) /// -> fold_keyed::<'tick, &str, String>(String::new, |old: &mut _, val| { /// *old += val; diff --git a/hydroflow_lang/src/graph/ops/join.rs b/hydroflow_lang/src/graph/ops/join.rs index 764dc9b8ea34..acb37f87a796 100644 --- a/hydroflow_lang/src/graph/ops/join.rs +++ b/hydroflow_lang/src/graph/ops/join.rs @@ -50,7 +50,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// /// ```rustbook /// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(&str, &str)>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_iter([("hello", "world")]) -> [0]my_join; /// source_stream(input_recv) -> [1]my_join; /// my_join = join::<'tick>() -> for_each(|(k, (v1, v2))| println!("({}, ({}, {}))", k, v1, v2)); @@ -67,7 +67,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// /// ```rustbook /// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(&str, &str)>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_iter([("hello", "world")]) -> [0]my_join; /// source_stream(input_recv) -> [1]my_join; /// my_join = join::<'static>() -> for_each(|(k, (v1, v2))| println!("({}, ({}, {}))", k, v1, v2)); diff --git a/hydroflow_lang/src/graph/ops/multiset_delta.rs b/hydroflow_lang/src/graph/ops/multiset_delta.rs index 46e34da6f33c..00d346dca73a 100644 --- a/hydroflow_lang/src/graph/ops/multiset_delta.rs +++ b/hydroflow_lang/src/graph/ops/multiset_delta.rs @@ -10,7 +10,7 @@ use super::{ /// /// ```rustbook /// let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_stream(input_recv) /// -> multiset_delta() /// -> for_each(|n| println!("{}", n)); diff --git a/hydroflow_lang/src/graph/ops/persist.rs b/hydroflow_lang/src/graph/ops/persist.rs index 4f3f41d5decf..872580d1ce48 100644 --- a/hydroflow_lang/src/graph/ops/persist.rs +++ b/hydroflow_lang/src/graph/ops/persist.rs @@ -23,7 +23,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// compiler. Equivalently, we could specify that the join has `static` persistence (`my_join = join::<'static>()`). /// ```rustbook /// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(&str, &str)>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_iter([("hello", "world")]) -> persist::<'static>() -> [0]my_join; /// source_stream(input_recv) -> persist::<'static>() -> [1]my_join; /// my_join = join::<'tick>() -> for_each(|(k, (v1, v2))| println!("({}, ({}, {}))", k, v1, v2)); diff --git a/hydroflow_lang/src/graph/ops/reduce_keyed.rs b/hydroflow_lang/src/graph/ops/reduce_keyed.rs index bf1fe2f8b4c7..bc56b55dc407 100644 --- a/hydroflow_lang/src/graph/ops/reduce_keyed.rs +++ b/hydroflow_lang/src/graph/ops/reduce_keyed.rs @@ -39,7 +39,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// Example using `'tick` persistence and type arguments: /// ```rustbook /// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<(&str, &str)>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_stream(input_recv) /// -> reduce_keyed::<'tick, &str>(|old: &mut _, val| *old = std::cmp::max(*old, val)) /// -> for_each(|(k, v)| println!("({:?}, {:?})", k, v)); diff --git a/hydroflow_lang/src/graph/ops/source_interval.rs b/hydroflow_lang/src/graph/ops/source_interval.rs index 4f77fd526958..a7097ff16a28 100644 --- a/hydroflow_lang/src/graph/ops/source_interval.rs +++ b/hydroflow_lang/src/graph/ops/source_interval.rs @@ -20,11 +20,11 @@ use super::{ /// ```rustbook /// use std::time::Duration; /// use std::time::Instant; -/// use hydroflow::hydroflow_syntax; +///use hydroflow::dfir_syntax; /// /// #[hydroflow::main] /// async fn main() { -/// let mut hf = hydroflow_syntax! { +/// let mut hf = dfir_syntax! { /// source_interval(Duration::from_secs(1)) /// -> map(|_| { Instant::now() } ) /// -> for_each(|time| println!("This runs every second: {:?}", time)); diff --git a/hydroflow_lang/src/graph/ops/source_stream.rs b/hydroflow_lang/src/graph/ops/source_stream.rs index 8a5b7f392e3a..31ddf698a2ff 100644 --- a/hydroflow_lang/src/graph/ops/source_stream.rs +++ b/hydroflow_lang/src/graph/ops/source_stream.rs @@ -16,7 +16,7 @@ use super::{ /// /// ```rustbook /// let (input_send, input_recv) = hydroflow::util::unbounded_channel::<&str>(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_stream(input_recv) -> map(|x| x.to_uppercase()) /// -> for_each(|x| println!("{}", x)); /// }; diff --git a/hydroflow_lang/src/graph/ops/source_stream_serde.rs b/hydroflow_lang/src/graph/ops/source_stream_serde.rs index 4c4fbf51d6f8..2c05069dd700 100644 --- a/hydroflow_lang/src/graph/ops/source_stream_serde.rs +++ b/hydroflow_lang/src/graph/ops/source_stream_serde.rs @@ -17,7 +17,7 @@ use super::{ /// async fn serde_in() { /// let addr = hydroflow::util::ipv4_resolve("localhost:9000".into()).unwrap(); /// let (outbound, inbound, _) = hydroflow::util::bind_udp_bytes(addr).await; -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_stream_serde(inbound) -> map(Result::unwrap) -> map(|(x, a): (String, std::net::SocketAddr)| x.to_uppercase()) /// -> for_each(|x| println!("{}", x)); /// }; diff --git a/hydroflow_lang/src/graph/ops/spin.rs b/hydroflow_lang/src/graph/ops/spin.rs index c686d03d0c95..3eff69f381d0 100644 --- a/hydroflow_lang/src/graph/ops/spin.rs +++ b/hydroflow_lang/src/graph/ops/spin.rs @@ -10,7 +10,7 @@ use super::{ /// so in the example below we illustrate running manually for 100 ticks. /// /// ```rustbook -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// spin() -> for_each(|x| println!("tick {}: {:?}", context.current_tick(), x)); /// }; /// for _ in 1..100 { diff --git a/hydroflow_lang/src/graph/ops/unique.rs b/hydroflow_lang/src/graph/ops/unique.rs index 28b44a049e4f..b93379901fa9 100644 --- a/hydroflow_lang/src/graph/ops/unique.rs +++ b/hydroflow_lang/src/graph/ops/unique.rs @@ -23,7 +23,7 @@ use crate::diagnostic::{Diagnostic, Level}; /// /// ```rustbook /// let (input_send, input_recv) = hydroflow::util::unbounded_channel::(); -/// let mut flow = hydroflow::hydroflow_syntax! { +/// let mut flow = hydroflow::dfir_syntax! { /// source_stream(input_recv) /// -> unique::<'tick>() /// -> for_each(|n| println!("{}", n)); diff --git a/template/hydroflow/src/client.rs b/template/hydroflow/src/client.rs index ab5ea2aba20e..a58e8dfd993b 100644 --- a/template/hydroflow/src/client.rs +++ b/template/hydroflow/src/client.rs @@ -2,7 +2,7 @@ use crate::helpers::print_graph; use crate::protocol::Message; use crate::{Opts, DEFAULT_SERVER_ADDRESS}; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; use std::net::SocketAddr; @@ -33,7 +33,7 @@ pub(crate) async fn run_client(opts: Opts) { ); // The skeletal hydroflow spec for a client. - let mut flow = hydroflow_syntax! { + let mut flow = dfir_syntax! { // Whenever a serialized message is received by the application from a particular address, // a (serialized_payload, address_of_sender) pair is emitted by the `inbound` stream. diff --git a/template/hydroflow/src/server.rs b/template/hydroflow/src/server.rs index 7624a614af3b..26ae2f05476a 100644 --- a/template/hydroflow/src/server.rs +++ b/template/hydroflow/src/server.rs @@ -2,7 +2,7 @@ use crate::helpers::print_graph; use crate::protocol::Message; use crate::DEFAULT_SERVER_ADDRESS; use chrono::prelude::*; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::{bind_udp_bytes, ipv4_resolve}; use std::net::SocketAddr; @@ -30,7 +30,7 @@ pub(crate) async fn run_server(opts: crate::Opts) { println!("Server is live! Listening on {:?}", actual_server_addr); // The skeletal hydroflow spec for a server. - let mut flow: Hydroflow = hydroflow_syntax! { + let mut flow: Hydroflow = dfir_syntax! { // Whenever a serialized message is received by the application from a particular address, // a (serialized_payload, address_of_sender) pair is emitted by the `inbound` stream. diff --git a/topolotree/src/main.rs b/topolotree/src/main.rs index 74a2fdfb30d6..0a0bbf5fa4eb 100644 --- a/topolotree/src/main.rs +++ b/topolotree/src/main.rs @@ -10,7 +10,7 @@ use std::time::Duration; use futures::{SinkExt, Stream}; use hydroflow::bytes::{Bytes, BytesMut}; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::graph::Hydroflow; use hydroflow::util::deploy::{ ConnectedDemux, ConnectedDirect, ConnectedSink, ConnectedSource, ConnectedTagged, @@ -58,7 +58,7 @@ fn run_topolotree( // we use current tick to keep track of which *keys* have been modified - hydroflow_syntax! { + dfir_syntax! { parsed_input = source_stream(input_recv) -> map(Result::unwrap) -> map(|(src, x)| (NodeId(src), deserialize_from_bytes::(&x).unwrap())) diff --git a/topolotree/src/pn.rs b/topolotree/src/pn.rs index 6d28dc9cf08e..f67ce3a92780 100644 --- a/topolotree/src/pn.rs +++ b/topolotree/src/pn.rs @@ -3,7 +3,7 @@ use std::collections::{HashMap, HashSet}; use std::ops::Deref; use std::rc::Rc; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::ticks::TickInstant; use hydroflow::serde::{Deserialize, Serialize}; use hydroflow::util::deploy::{ @@ -65,7 +65,7 @@ async fn main() { } }; - let df = hydroflow_syntax! { + let df = dfir_syntax! { next_state = union() -> fold::<'static>(|| (HashMap::, Vec)>>>::new(), HashSet::new(), TickInstant::default()), |(cur_state, modified_tweets, last_tick): &mut (HashMap<_, _>, HashSet<_>, _), goi| { if context.current_tick() != *last_tick { diff --git a/topolotree/src/pn_delta.rs b/topolotree/src/pn_delta.rs index 23ddeee5e73a..7f0062b58140 100644 --- a/topolotree/src/pn_delta.rs +++ b/topolotree/src/pn_delta.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use std::ops::Deref; use std::rc::Rc; -use hydroflow::hydroflow_syntax; +use hydroflow::dfir_syntax; use hydroflow::scheduled::ticks::TickInstant; use hydroflow::serde::{Deserialize, Serialize}; use hydroflow::util::deploy::{ @@ -65,7 +65,7 @@ async fn main() { } }; - let df = hydroflow_syntax! { + let df = dfir_syntax! { next_state = union() -> fold::<'static>(|| (HashMap::, Vec)>>>::new(), HashMap::new(), TickInstant::default()), |(cur_state, modified_tweets, last_tick): &mut (HashMap<_, _>, HashMap<_, _>, _), goi| { if context.current_tick() != *last_tick {